Intel® Stratix® 10嵌入式存储器用户指南

ID 683423
日期 11/19/2019
Public
文档目录

4.3.11. 手动例化的编码实例

本节提供一个用于创建DCFIFO实例的Verilog HDL编码实例。此实例不是供您编译的完整编码,但它为例化的要求结构提供指南和一些注释。您可以使用相同的结构例化其他IP核,但只能使用适用于您已例化的IP核端口和参数。

例化DCFIFO的Verilog HDL编码示例

//module declaration
module dcfifo8x32 (aclr, data, …… ,wfull);
//Module's port declarations
input aclr;
input [31:0] data;
.
.
output wrfull;
//Module’s data type declarations and assignments
wire rdempty_w;
.
.
wire wrfull = wrfull_w; wire [31:0] q = q_w;
/*Instantiates dcfifo megafunction. Must declare all the ports available from the megafunction and 
define the connection to the module's ports.
Refer to the ports specification from the user guide for more information about the megafunction's 
ports*/
//syntax: <megafunction's name> <given an instance name>
dcfifo inst1 (
//syntax: .<dcfifo's megafunction's port>(<module's port/wire>)
.wrclk (wrclk),
.rdclk (rdclk),
.
.
.wrusedw ()); //left the output open if it's not used
/*Start with the keyword “defparam”, defines the parameters and value assignments. Refer to 
parameters specifications from the user guide for more information about the megafunction's 
parameters*/
defparam
//syntax: <instance name>.<parameter> = <value>
inst1.intended_device_family = "Stratix 10", 
inst1.lpm_numwords = 8,
.
.
inst1.wrsync_delaypipe = 4;
endmodule