在做包文练习时遇到的错误:
Error (10200): Verilog HDL Conditional Statement error at baowen3.v(130): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct
错误的代码段出现在
//dout_err
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
dout_err <= 0;
end
if(din_vld == 1'b1)begin//错误出现在这里
if(flag==1 && din_sop==1 && din_eop==1)begin
dout_err <= 1;

在FPGA学习中遇到QuartusII报错10200,该错误涉及到Verilog HDL条件语句在always构造中的敏感列表匹配问题。错误起因是尝试用多个控制信号建模DFF,解决方法是确保每个if条件只包含一个边沿信号。通过修改代码,将if语句改为else if,或者在Always构造外生成rst1和rst2的OR,成功解决了问题。
最低0.47元/天 解锁文章
2423

被折叠的 条评论
为什么被折叠?



