微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > 求助!rom调用时只能读取两个数

求助!rom调用时只能读取两个数

时间:10-02 整理:3721RD 点击:
求指导!在quartus中调用ROM时编写如下代码
module data_address(clk,rst_n,address);
input clk,rst_n;
output [13:0]address;
reg [13:0]address;
reg[13:0]count;
always@(posedge clk or negedge rst_n)
if (!rst_n)
count<=0;
else
count<=count+1;
always@(posedge clk or negedge rst_n)
if (!rst_n)
address<=0;
else
begin
if (count<14'd16385)
address<=address+1'd1;
else;
end
endmodule
存入数据为16384个,但只能读取两个数
但去掉条件判断语句就能全部读出,并且还有下面的warning
Warning: Ignored node in vector source file. Can't find corresponding node name "address[2]" in design.
有没有人指导一下?

reg[13:0]count; 这个位宽不够计到16385

16385二进制是100 0000 0000 0001,一共15位,count只有14位,所以比较的时候只比较前14位,即count<00 0000 0000 0001

莫有simulation带来的苦恼啊。
哥哥弟弟们,千万不要忽略verification啊。

谢谢各位

谢谢各位了

谢谢各位

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top