pcs: tx: Calculate idle correctly when there is no new data

When the PMA has no new data for us, idle should be determined based on
raw_bits[11:2]. However, we just calculated that last cycle, so we can
reuse it.

Fixes: d351291 ("Initial commit")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2022-08-06 14:54:04 -04:00
parent 0dea0304af
commit e4bbc08620
1 changed files with 3 additions and 1 deletions

View File

@ -334,7 +334,9 @@ module pcs_rx_bits (
endfunction
always @(*) begin
idle_next = &raw_bits[10:1];
idle_next = idle;
if (bits_valid != 0)
idle_next = &raw_bits[10:1];
if (bits_valid & 2)
idle_next = idle_next || &raw_bits[9:0];