K
Kausi
Guest
I get the following error for the particular line given below-
Code- always @(state or posedge Valid or posedge Restart)
begin
case(state)
3'b000 : begin if(Valid)
next_state<=3'b001; end
3'b001 : begin if(Valid)
next_state<=3'b010;
else Seg1=7'b1111001; end
3'b010 : begin if(Valid)
next_state<=3'b011;
else Seg1=7'b0100100; end
3'b011 : begin if(Valid)
next_state<=3'b100;
else Seg1=7'b0110000;
end
3'b100 : begin Done<=1'b1;
Seg1=7'b0011011;
next_state<=3'b101; end
3'b101 : begin if(Restart)
next_state<=3'b000;
else Seg1=7'b0010010; end
endcase
end
Error (10122): Verilog HDL Event Control error at safe.v(16): mixed
single- and double-edge expressions are not supported.
When i check up the help section it says i cant use a positive edge
controlled and a negative edge controlled signal in the event list. A
further suggession is given to split the event control into multiple
statements. How can i achieve that ?
Code- always @(state or posedge Valid or posedge Restart)
begin
case(state)
3'b000 : begin if(Valid)
next_state<=3'b001; end
3'b001 : begin if(Valid)
next_state<=3'b010;
else Seg1=7'b1111001; end
3'b010 : begin if(Valid)
next_state<=3'b011;
else Seg1=7'b0100100; end
3'b011 : begin if(Valid)
next_state<=3'b100;
else Seg1=7'b0110000;
end
3'b100 : begin Done<=1'b1;
Seg1=7'b0011011;
next_state<=3'b101; end
3'b101 : begin if(Restart)
next_state<=3'b000;
else Seg1=7'b0010010; end
endcase
end
Error (10122): Verilog HDL Event Control error at safe.v(16): mixed
single- and double-edge expressions are not supported.
When i check up the help section it says i cant use a positive edge
controlled and a negative edge controlled signal in the event list. A
further suggession is given to split the event control into multiple
statements. How can i achieve that ?