phy/pcs_1000basex: Cleanup PCSRX buffer and fix PCS TX ready on Start-of-packet.
This commit is contained in:
parent
a58e25c2f0
commit
1bbb735f9f
|
@ -107,6 +107,7 @@ class PCSTX(LiteXModule):
|
||||||
# Wait for valid Data.
|
# Wait for valid Data.
|
||||||
).Else(
|
).Else(
|
||||||
If(sink.valid,
|
If(sink.valid,
|
||||||
|
sink.ready.eq(timer.done),
|
||||||
self.encoder.d[0].eq(K(27, 7)), # Start-of-packet /S/.
|
self.encoder.d[0].eq(K(27, 7)), # Start-of-packet /S/.
|
||||||
NextState("DATA")
|
NextState("DATA")
|
||||||
).Else(
|
).Else(
|
||||||
|
@ -186,9 +187,9 @@ class PCSRX(LiteXModule):
|
||||||
|
|
||||||
# Buffer.
|
# Buffer.
|
||||||
# -------
|
# -------
|
||||||
self.buffer = buffer = stream.Buffer([("data", 8)])
|
self.buffer = buffer = stream.Buffer([("data", 8)], pipe_valid=True, pipe_ready=False)
|
||||||
self.comb += If(timer.done,
|
self.comb += If(timer.done,
|
||||||
buffer.source.connect(source),
|
buffer.source.connect(source, omit={"last"}),
|
||||||
source.last.eq(buffer.source.valid & ~buffer.sink.valid), # Last when next is not valid.
|
source.last.eq(buffer.source.valid & ~buffer.sink.valid), # Last when next is not valid.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue