原创 如何利用altera 给出的megafunction配置成自己想要的FIFO和RAM

2009-2-19 11:39 7417 8 8 分类: FPGA/CPLD

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 


FPGA设计过程中,一般都要用到FIFORAM,如何利用altera 给出的megafunction配置成自己想要的FIFORAM,就得从自己的设计的RAM功能来看。主要考虑:端口数目、宽度和深度、时钟、时钟使能、读端口使能、输出端口是否寄存、复位(portWidths and depthsClks readenRegs 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


<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />


时钟:可配置成单一时钟、读\写双时钟、端口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 megafunctionAltera 推荐用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 megafunctionAltera 推荐用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.

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
8
关闭 站长推荐上一条 /3 下一条