代码改变世界

fpga错误总结

2016-01-05 15:50  工匠小建  阅读(632)  评论(0编辑  收藏  举报

Error (10200): Verilog HDL Conditional Statement error at ps2_con_cmd.v(11): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct

 

一个进程有两个驱动信号。

 

错误如下:

always@(posedge i_clk or negedge i_rst)
if(i_rst) //修改为if(!i_rst)
begin
r_ps2_data<=4'b0001;
end
else if(r_ps2_data)

case(i_ps2_data)
8'h1d:
r_ps2_data<={r_ps2_data[2:0],r_ps2_data[3]};
8'h22:
r_ps2_data<={r_ps2_data[0],r_ps2_data[3:1]};
8'h14:
r_ps2_data<={r_ps2_data[0],r_ps2_data[1],r_ps2_data[2],r_ps2_data[3]};
endcase

工匠小建