关于always @ () 的问题
always @(posedge clk or posedge busy or negedge reset_n) beginif (reset_n == 1'b0)
begin
busy_posedge_reg <= 1'b0;
end
else if(stage_reg == EDLE)
begin
busy_posedge_reg <= 1'b0;
end
else
begin
busy_posedge_reg <= 1'b1;
end
end
代码如上,目的是为了记录busy信号的上升沿,同时在EDLE状态或者复位时对busy_posedge_reg寄存器清零 ,在Modelsim中仿真没有问题,但是在Quartus II中综合,错误提示如下,请各位给点帮助
Error (10200): Verilog HDL Conditional Statement error at s1_slave.v(176): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct 因为计算姬说你写的这玩意她没法给你搞成硬件。 LS头像不是东方笨蛋⑨么? 回复【1楼】ngzhang 兽哥
-----------------------------------------------------------------------
那么所描述的功能应该怎么写计算机才能给我弄成硬件呢? http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=4409079&bbs_page_no=1&search_mode=4&search_text=470036398&bbs_id=9999 在error上右键 可以看看帮助 回复【3楼】stone_xiyi
回复【1楼】ngzhang 兽哥
-----------------------------------------------------------------------
那么所描述的功能应该怎么写计算机才能给我弄成硬件呢?
-----------------------------------------------------------------------
always@ 后面,只描述一个时钟敏感沿,需要时可以有一个reset敏感沿。
下面跟着就是if (reset 条件),然后写reset的内容。
然后else,开始处理其他输入。
只要你这么写,没有综合不了的东西。
页:
[1]