位置:51电子网 » 技术资料 » 其它综合

Instantiating LPMs in Verilog

发布时间:2008/6/5 0:00:00 访问次数:359

the example in this section defines a black box for an altera lpm_ram_dq,
which is then instantiated at a higher level. the lpm_ram_dq is a parameterized
ram with separate input and output ports. altera recommends
using the lpm_ram_dq to implement asynchronous memory or memory
with synchronous inputs and/or outputs. the lpm_ram_dq function uses
eabs in flex10k devices, and latch arrays in other device families. if you
are using a flex10k device, altera recommends that you use synchronous
rather than asynchronous ram functions.
1. define a black box with the name myram_64x16. notice that
immediately after the port list, but before the semicolon ';' is the
syn_black_box synthesis directive with the lpm_type specified as
lpm_ram_dq, along with other specified arguments.
module myram_64x16 (data, address, inclock, outclock, we, q)
/* synthesis syn_black_box
lpm_width=16
lpm_widthad=6
lpm_type="lpm_ram_dq" */ ;
input [15:0] data;w
input [5:0] address;
input inclock, outclock;
input we;
output [15:0] q;
// this is an empty module
endmodule
2. now instantiate the lpm in a higher-level module.
module myram(clock, we, data, address, q);
input clock, we;
input [15:0] data;
input [5:0] address;
output [15:0] q;
myram_64x16 inst1 (data, address, clock, clock, we, q);
endmodule


the example in this section defines a black box for an altera lpm_ram_dq,
which is then instantiated at a higher level. the lpm_ram_dq is a parameterized
ram with separate input and output ports. altera recommends
using the lpm_ram_dq to implement asynchronous memory or memory
with synchronous inputs and/or outputs. the lpm_ram_dq function uses
eabs in flex10k devices, and latch arrays in other device families. if you
are using a flex10k device, altera recommends that you use synchronous
rather than asynchronous ram functions.
1. define a black box with the name myram_64x16. notice that
immediately after the port list, but before the semicolon ';' is the
syn_black_box synthesis directive with the lpm_type specified as
lpm_ram_dq, along with other specified arguments.
module myram_64x16 (data, address, inclock, outclock, we, q)
/* synthesis syn_black_box
lpm_width=16
lpm_widthad=6
lpm_type="lpm_ram_dq" */ ;
input [15:0] data;w
input [5:0] address;
input inclock, outclock;
input we;
output [15:0] q;
// this is an empty module
endmodule
2. now instantiate the lpm in a higher-level module.
module myram(clock, we, data, address, q);
input clock, we;
input [15:0] data;
input [5:0] address;
output [15:0] q;
myram_64x16 inst1 (data, address, clock, clock, we, q);
endmodule


相关IC型号

热门点击

 

推荐技术资料

罗盘误差及补偿
    造成罗盘误差的主要因素有传感器误差、其他磁材料干扰等。... [详细]
版权所有:51dzw.COM
深圳服务热线:13692101218  13751165337
粤ICP备09112631号-6(miitbeian.gov.cn)
公网安备44030402000607
深圳市碧威特网络技术有限公司
付款方式


 复制成功!