3系列FPGA中使用LUT构建分布式RAM(4)

前面讲了分布式RAM的方方面面,下面以RAM_16S为例,分别给出其在VHDL和Verilog HDL下面的模板代码(在ISE Project Navigator中选择 Edit--- Language Templates,然后选择VHDL 或者Verilog, 最后是Synthesis Templates --- RAM,在中也有具体调用过程的描述)。CORE Generator可以产生类似的代码以供行为仿真使用,它们可以在ISE Project Navigator中双击.coe文件看到。

VHDL Template Example
--
-- Module: RAM_16S
--
-- Descrip  TI on: VHDL instan  TI a  TI on template
-- Distributed RAM
-- Single Port 16 x 1
-- Can also be used for RAM16X1S_1
--
-- Device: Spartan-3 Family
--
---------------------------------------------------------------------
--
-- Components Declara  TI ons:
--
component RAM16X1S
-- pragma translate_off
generic (
-- RAM initialization (“0” by default) for functional simulation:
INIT : bit_vector := X"0000"
);
-- pragma translate_on
port (
D : in std_logic;
WE : in std_logic;
WCLK : in std_logic;
A0 : in std_logic;
A1 : in std_logic;
A2 : in std_logic;
A3 : in std_logic;
O : out std_logic
);
end component;
--
---------------------------------------------------------------------
--
-- Architecture section:
--
-- Attributes for RAM initialization ("0" by default):
attribute INIT: string;
--
attribute INIT of U_RAM16X1S: label is "0000";
--
-- Distributed RAM Instantiation
U_RAM16X1S: RAM16X1S
port map (
D => , -- insert Data input signal
WE => , -- insert Write Enable signal
WCLK => , -- insert Write Clock signal
A0 => , -- insert Address 0 signal
A1 => , -- insert Address 1 signal
A2 => , -- insert Address 2 signal
A3 => , -- insert Address 3 signal
O => -- insert Data output signal
);
--
---------------------------------------------------------------------
R
Verilog Template Example
//
// Module: RAM_16S
//
// Description: Verilog instantiation template
// Distributed RAM
// Single Port 16 x 1
// Can also be used for RAM16X1S_1
//
// Device: Spartan-3 Family
//
//-------------------------------------------------------------------
//
// Syntax for Synopsys FPGA Express
// synopsys translate_off
defparam
//RAM initialization (“0” by default) for functional simulation:
U_RAM16X1S.INIT = 16'h0000;
// synopsys translate_on
//Distributed RAM Instantiation
RAM16X1S U_RAM16X1S (
.D(), // insert input signal
.WE(), // insert Write Enable signal
.WCLK(), // insert Write Clock signal
.A0(), // insert Address 0 signal
.A1(), // insert Address 1 signal
.A2(), // insert Address 2 signal
.A3(), // insert Address 3 signal
.O() // insert output signal
);
// synthesis attribute declarations
/* synopsys attribute
INIT "0000"
*/

CORE Generator产生分布式RAM、同步FIFO和异步FIFO的说明文档可以分别在如下网址找到。
? CORE Generator: 分布式RAM模块

? CORE Generator: 同步FIFO模块

? CORE Generator: 异步FIFO模块

3系列FPGA中使用LUT构建分布式RAM(4)_设计制作_EMC/EMI设计
99
142
0
94

相关资讯

  1. 1、任志强《就等你来》纳贤众老板为冠军提供岗位4115
  2. 2、陈乔恩谈选夫标准:其外表不放首位要待人真诚640
  3. 3、《狄仁杰2》北美率先公映华人观众为观影主力870
  4. 4、《美人鱼》中出场不到一分钟,却在《美人鱼2》中成了男二号!4473
  5. 5、当年最火的8部剧,追过3部就证明你老了!1745
  6. 6、又一部顶级烂剧诞生,关晓彤一出手就奉上辣眼睛力作!4623
  7. 7、难逃中年发福?靳东新剧开机现场图曝光,脸部圆润发胖明显3984
  8. 8、曾怀孕7个月还吸毒,屡教不改被老公抛弃,如今整成“面瘫脸”!5022
  9. 9、周润发有三个秘密,有一个与小龙女有关,另外两个感动很多人3070
  10. 10、《大力神》曝菲特律王定妆照戏中被戴绿帽3564
全部评论(0)
我也有话说
0
收藏
点赞
顶部