|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
module CNT3 (RST,EN,CLK,OUT,OUT_EN,OUT_RES);
inputEN,RST,CLK;
outputOUT_EN,OUT_RES;
output[7:0]OUT;
reg[7:0]OUT;
regOUT_EN,OUT_RES;
always@(posedge CLK or posedge EN) begin
if(RST) begin
OUT<=0;
OUT_EN<=0;
OUT_RES<=0;
end
else if (EN)
//fork
begin
if (OUT ==8'b001100100)begin//Na=100
OUT<=0;OUT_EN<=0;
end
else
OUT<=OUT+1;
end
if (OUT==1)
OUT_EN<=1;
if (OUT==0)
OUT_RES<=1;
else
OUT_RES<=0;
//join
end
endmodule
error:
ERROR:Xst:899 - N.v line 879: The logic for <OUT> does not match a known FF or Latch template.
ERROR:Xst:899 - N.v line 893: The logic for <OUT_EN> does not match a known FF or Latch template.
ERROR:Xst:899 - N.v line 896: The logic for <OUT_RES> does not match a known FF or Latch template.
Found 3 error(s). Aborting synthesis.
-->
|
|