同步复位和异步复位
看下面这段程序:always @(posedge clk_in or negedge en) begin
if((!rst_n)|(!en))i<=4'b0;
else i<=i+4'b1;
end
一个同步复位:rst_n;一个异步复位:en
怎么老提示:Error (10200): Verilog HDL Conditional Statement error at clock.v(10): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct
哪位大虾能解释一下,最好从硬件角度,先谢过了! 你到底是要同步还是异步复位?编译器已经叫你整晕了。 都要,不行吗?理论上应该可以的啊! quartus II不支持此类的编译,所以最好还是分开写比较合理。
PS:Synplify 9.6.2没问题 通常异步复位会节省资源,而同步复位是防止毛刺。
如果采用异步复位,同步释放方式,能不能解决你的问题?
页:
[1]