[英]Can we synthesis a simple generic memory?
I'm trying to synthesis with simple generic memory model within design compiler. 我正在尝试在设计编译器中使用简单的通用内存模型进行综合。
but I do find that some error messages as the below, 但我确实发现了以下一些错误消息,
and I used the simple generic memory model as the below 我使用了如下的简单通用内存模型
module RAM_generic
(clk,
enb,
wr_din,
wr_addr,
wr_en,
rd_addr,
rd_dout);
parameter AddrWidth = 1;
parameter DataWidth = 1;
input clk;
input enb;
input signed [DataWidth - 1:0] wr_din;
input [AddrWidth - 1:0] wr_addr;
input wr_en;
input [AddrWidth - 1:0] rd_addr;
output signed [DataWidth - 1:0] rd_dout;
reg [DataWidth - 1:0] ram [2**AddrWidth - 1:0];
reg [DataWidth - 1:0] data_int;
always @(posedge clk)
begin
if (enb == 1'b1) begin
if (wr_en == 1'b1) begin
ram[wr_addr] <= wr_din;
end
data_int <= ram[rd_addr];
end
end
assign rd_dout = data_int;
endmodule
I want to know Can't we synthesis a simple generic memory? 我想知道我们不能合成一个简单的通用内存吗? If yes, What am I supposed to do to synthesis the generic memory synthesis error? 如果是,我应该怎么做以综合通用内存综合错误?
Yes you can. 是的你可以。
In FPGA's a single or dual ported memory will be mapped on the internal memory structures. 在FPGA中,单端口或双端口存储器将映射到内部存储器结构上。 (At least if you use the right syntax! Look for the FPGA application notes how to do that) (至少如果您使用正确的语法!请查找FPGA应用笔记中的操作方法)
In an ASIC it will be made from registers. 在ASIC中,它将由寄存器组成。 I needed a small triple ported memory (Two read and a write port all simultaneous) a few years back and it came out fine. 几年前,我需要一个很小的三端口内存(两个读和一个写端口同时进行),结果还不错。 Most FIFO's have a memory in them and 90% of them are made from registers. 大多数FIFO中都有一个存储器,其中90%由寄存器组成。
Your code is missing 'endmodule'. 您的代码缺少“ endmodule”。 I don't spot any other obvious errors. 我没有发现其他明显的错误。
Some tips: 一些技巧:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.