|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
最近自己装了一个DC2007.12,在做综合的时候一般情况下都没有什么问题,但是如果代码中出现了加1的情况就会报错。
错误具体就是:the architecture of 'rpl' of DW01_add cannot be found.
我做了试验,下面的代码会报错:
module (clk, reset, out);
input clk;
input reset;
output[7:0] out;
always @(posedge clk or negedge reset)
if(~reset)
out <= 0;
else
out <= out + 1'b1; //我写1, 8'h01, 8'b00000001等都会出现同样的错误。
endmodule
而下面的代码则不会出现上面的错误
module (clk, reset, out);
input clk;
input reset;
output[7:0] out;
always @(posedge clk or negedge reset)
if(~reset)
out <= 0;
else
out <= out + 8'b00000011; //仅仅是这个数字不一样。
endmodule
我感觉上面的不同就是第一采用了加1的加法器,而第二个采用的是普通的加法器。但是,我不明白,这怎么就能错了呢?
请大虾们不吝赐教!!!
感谢!! |
|