Commit fba24c05 authored by Mike Lyons's avatar Mike Lyons

Fixed bug where switching states combinationally rather than using latched logic

parent 2ecfb943
...@@ -132,8 +132,9 @@ end ...@@ -132,8 +132,9 @@ end
always @(*) begin always @(*) begin
if (Reset || packetStart) begin if (Reset || packetStart) begin
state <= `STATE_GET_CMD; state <= `STATE_GET_CMD;
end else if (state_reg == `STATE_GET_CMD && rcByteValid) begin // Handled in state_reg logic, should be latched, not immediate.
state <= rcByte; // end else if (state_reg == `STATE_GET_CMD && rcByteValid) begin
// state <= rcByte;
end else begin end else begin
state <= state_reg; state <= state_reg;
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment