pcs: rx: Add premature end state
Without this state, receiving would immediately go low. However, figure
24-11 shows that receiving should go low only after an additional code
group (the second idle) is received.
Fixes: d351291
("Initial commit")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
e4bbc08620
commit
d2b4f9b061
11
rtl/pcs.v
11
rtl/pcs.v
|
@ -439,7 +439,8 @@ module pcs_rx (
|
||||||
localparam START_K = 2;
|
localparam START_K = 2;
|
||||||
localparam BAD_SSD = 3;
|
localparam BAD_SSD = 3;
|
||||||
localparam DATA = 4;
|
localparam DATA = 4;
|
||||||
localparam FAILED = 5;
|
localparam PREMATURE = 5;
|
||||||
|
localparam FAILED = 6;
|
||||||
|
|
||||||
reg start, flush;
|
reg start, flush;
|
||||||
wire activity, idle, indicate;
|
wire activity, idle, indicate;
|
||||||
|
@ -570,7 +571,7 @@ end
|
||||||
`CODE_I: begin
|
`CODE_I: begin
|
||||||
err_next = 1;
|
err_next = 1;
|
||||||
if (aligned[4:0] == `CODE_I)
|
if (aligned[4:0] == `CODE_I)
|
||||||
state_next = IDLE;
|
state_next = PREMATURE;
|
||||||
end
|
end
|
||||||
default:
|
default:
|
||||||
err_next = 1;
|
err_next = 1;
|
||||||
|
@ -579,6 +580,11 @@ end
|
||||||
if (!indicate)
|
if (!indicate)
|
||||||
state_next = DATA;
|
state_next = DATA;
|
||||||
end
|
end
|
||||||
|
PREMATURE: begin
|
||||||
|
valid_next = 0;
|
||||||
|
if (indicate)
|
||||||
|
state_next = IDLE;
|
||||||
|
end
|
||||||
FAILED: begin
|
FAILED: begin
|
||||||
err_next = 1;
|
err_next = 1;
|
||||||
rx_next = 0;
|
rx_next = 0;
|
||||||
|
@ -623,6 +629,7 @@ end
|
||||||
START_K: state_text = "START_K";
|
START_K: state_text = "START_K";
|
||||||
BAD_SSD: state_text = "BAD_SSD";
|
BAD_SSD: state_text = "BAD_SSD";
|
||||||
DATA: state_text = "DATA";
|
DATA: state_text = "DATA";
|
||||||
|
PREMATURE: state_text = "PREMATURE";
|
||||||
FAILED: state_text = "FAILED";
|
FAILED: state_text = "FAILED";
|
||||||
endcase
|
endcase
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue