pcs: Assert CRS after TX_EN sooner

24.6.1 requires that CRS goes high fewer than 4 cycles after TX_EN goes
high. This means we need to assert tx when we enter then START_J state,
not when we actually transmit a /J/. This also has the upside of
simplifying the logic a bit.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2022-08-24 12:10:52 -04:00
parent 86aee33477
commit cbbdbeef1c
1 changed files with 1 additions and 2 deletions

View File

@ -166,6 +166,7 @@ module pcs_tx (
code_next = `CODE_I; code_next = `CODE_I;
state_next = IDLE; state_next = IDLE;
if (enable) begin if (enable) begin
tx_next = 1;
if (err) if (err)
state_next = ERROR_J; state_next = ERROR_J;
else else
@ -173,7 +174,6 @@ module pcs_tx (
end end
end end
START_J: begin START_J: begin
tx_next = 1;
code_next = `CODE_J; code_next = `CODE_J;
if (err) if (err)
state_next = ERROR_K; state_next = ERROR_K;
@ -184,7 +184,6 @@ module pcs_tx (
code_next = `CODE_K; code_next = `CODE_K;
end end
ERROR_J: begin ERROR_J: begin
tx_next = 1;
code_next = `CODE_J; code_next = `CODE_J;
state_next = ERROR_K; state_next = ERROR_K;
end end