pcs: rx: Only flush on state change
The PCS state machine is evaluated every cycle, but its outputs are only
registers when the rx_bits module indicates. However, the flush signal
is not registered and is instead combinatorial. Although it's OK to
evaluate the other outputs every cycle, we should only indicate if we
are actually going to change state.
Fixes: d351291
("Initial commit")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
f8bb110caa
commit
03715d4a83
12
rtl/pcs.v
12
rtl/pcs.v
|
@ -395,9 +395,9 @@ module pcs_rx_bits (
|
|||
end
|
||||
|
||||
/*
|
||||
* If we are flushing flush then activity is based on stale
|
||||
* data. Ignore it so we don't accidentally detect activity for
|
||||
* data we are going to flush anyway.
|
||||
* If we are flushing then activity is based on stale data.
|
||||
* Ignore it so we don't accidentally detect activity for data
|
||||
* we are going to flush anyway.
|
||||
*/
|
||||
if (flush)
|
||||
activity_next = 0;
|
||||
|
@ -491,6 +491,11 @@ module pcs_rx (
|
|||
endcase
|
||||
|
||||
start = 0;
|
||||
/*
|
||||
* XXX: flush (unlike everything else here) is combinatorial;
|
||||
* we should only flush if we are actually evaluating the
|
||||
* state.
|
||||
*/
|
||||
flush = 0;
|
||||
rx_next = rx;
|
||||
ce_next = indicate;
|
||||
|
@ -560,6 +565,7 @@ end
|
|||
;
|
||||
`CODE_T:
|
||||
if (aligned[4:0] == `CODE_R) begin
|
||||
if (indicate)
|
||||
flush = 1;
|
||||
state_next = IDLE;
|
||||
valid_next = 0;
|
||||
|
|
Loading…
Reference in New Issue