高手进来?
我的程序module liyan10(clock,clear,EN,Q4,Q);
input clock,clear,EN;
output Q4;
output Q;
reg Q4;
reg Q;
always@(posedge clock or negedge clear or posedge EN)
begin
if(EN)
begin
Q4<=Q4;
Q<=Q;
end
else
begin
if(!clear)
begin
Q4<=4'b0000;
Q<='b0;
end
else
begin
if(Q4==4'b1010)
begin
Q4<=4'b0000;
Q<='b1;
end
else
begin
Q4<=Q4+4'b0001;
Q<='b0;
end
end
end
end
endmodule
在我用quartus编译时候出来这样的警告
Warning: Found pins functioning as undefined clocks and/or memory enables
Info: Assuming node "clk" is an undefined clock
在时间仿真时出现这样的错误
Error: Can't continue timing simulation because delay annotation information for design is missing
这些都是什么原因啊,我一直查不出来的,如果用功能仿真是可以仿真成功的。
望高手指教 怎么解决啊? 回复【1楼】wuhenyouyu
-----------------------------------------------------------------------
你给clock分配的引脚不是芯片的全局时钟引脚 always@(posedge clock or negedge clear or posedge EN) 你想让它做成一个怎样的电路呢,一般的时序电路只有一个CLK,最多加一个复位端,建议,把clear和EN做成一个组合电路,再输到整个时序电路模块中 怎么组合成组合电路,书上就是这么写的,哎,郁闷了! 【3楼】 470036398 珍毅说的对,
always@(posedge clock or negedge clear or posedge EN) 这种写法不好;
又是上升沿触发又是下降沿触发,这时序就很乱了,亚稳态概率就高了。
建议:像【3楼】说的先把clear EN 组合一下再做输入。
也可以写成同步时序用仅用clock做触发,这样:always@(posedge clock )
或者干脆写成组合逻辑用电平触发,这样:always@(clock or clear orEN)
页:
[1]