如何利用altera 给出的megafunction配置成自己想要的FIFO和RAM ——本文为转载

 

 

在FPGA设计过程中,一般都要用到FIFO和RAM,如何利用altera 给出的megafunction配置成自己想要的FIFO和RAM,就得从自己的设计的RAM功能来看。主要考虑:端口数目、宽度和深度、时钟、时钟使能、读端口使能、输出端口是否寄存、复位(port、Widths and depths、Clks 、readen、Regs 、clkens、 Aclrs)。

 

这里强调下:
Asychronous Clear,只复位输入/输出端口的寄存器,不复位RAM块里的数据。对altera 的不同芯片,有的只复位输出寄存器,有的复位输入和输出寄存器。
还要注意:Write and Read Operations Triggering, 即读/写操作的时序,比如用M4K 的Memory Blocks作为RAM的话,下降沿写入数据,上升沿读出数据。
详细可以看:http://www.altera.com/literature/ug/ug_ram.pdf

 

 

下面就介绍几种常用的storage megafunction。

 

1. altsyncram

Parameterized true dual-port synchronous RAM megafunction。

端口:可配置成:一端口读(或一端读、一端写;一端读、双端写;双端口读、双端口读写)的异步复位RAM。

 

时钟:可配置成单一时钟、读/写双时钟、端口A/B双时钟。

 

 

 

2. lpm_fifo _dc

--------------------------------------------------------------------------------

Parameterized dual-clock FIFO megafunction.

读数据端口:可配置成Legacy synchronour FIFO mode 和Show-ahead synchronous FIFO mode.

 

3. lpm_fifo

--------------------------------------------------------------------------------

Parameterized single-clock FIFO megafunction.

 

4. lpm_shiftreg

--------------------------------------------------------------------------------

Parameterized shift register megafunction. Altera recommends that you use the lpm_shiftreg function to replace all other types of shift register functions.

 

5. lpm_tff

--------------------------------------------------------------------------------

Parameterized T-type flipflop megafunction. Altera recommends that you use lpm_ff rather than lpm_tff

 

 

 

 

下列的RAM megafunction,Altera 推荐用altsyncram

 

1. Alt3pram :

Parameterized triple-port RAM megafunction.

 

2. Altdpram

Parameterized dual-port RAM megafunction. This megafunction is provided only for backward compatibility in Cyclone, Cyclone II, HardCopy Stratix, Stratix, and Stratix GX designs; instead, Altera recommends using the altsyncram megafunction.

3. csdpram Parameterized cycle-shared dual-port RAM megafunction. Altera recommends using lpm_ram_dp for dual-port RAM functions in ACEX 1K, APEX 20K, APEX II, FLEX 10KE, and Mercury projects.

 

4. lpm_ram_dp

Parameterized dual-port RAM megafunction. This megafunction is provided only for backward compatibility in Cyclone, Cyclone II, HardCopy Stratix, Stratix, and Stratix GX designs; instead, Altera recommends using the altsyncram megafunction.

 

5. lpm_ram_dq Parameterized RAM with separate input and output ports megafunction. Altera recommends using lpm_ram_dq to implement asynchronous memory or memory with synchronous inputs and/or outputs. This megafunction is provided only for backward compatibility in Cyclone, Cyclone II, HardCopy Stratix, Stratix, and Stratix GX designs; instead, Altera recommends using the altsyncram megafunction.

 

6. lpm_ram_io Parameterized RAM with a single I/O port megafunction. This megafunction is provided only for backward compatibility in Cyclone, Cyclone II, HardCopy Stratix, Stratix, and Stratix GX design; instead, Altera recommends using the altsyncram megafunction.

 

7. pm_rom Megafunction

Parameterized ROM megafunction. Altera recommends that you use the lpm_rom function to implement all ROM functions. This megafunction is provided only for backward compatibility for Cyclone, Cyclone II, HardCopy Stratix, Stratix, and Stratix GX devices; instead, Altera recommends using the altsyncram megafunction.

 

下列的FIFO megafunction,Altera 推荐用lpm_fifo_dc

 

1. csfifo Megafunction

Parameterized cycle-shared FIFO megafunction. Altera recommends that you use lpm_fifo instead of csfifo for single-clock FIFO functions, and that you use lpm_fifo_dc instead of csfifo for dual-clock FIFO functions.

2. dcfifo Megafunction

Parameterized dual-clock FIFO megafunction

3. scfifo Megafunction

Parameterized single-clock FIFO megafunction

转载于:https://www.cnblogs.com/zhm374923914/archive/2013/04/08/3008407.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值