forked from M-Labs/artiq
serwb: transmit zeroes when nothing to transmit (for prbs), improve rx idle detection
This commit is contained in:
parent
7296a76f18
commit
53e9e475d0
@ -185,11 +185,13 @@ class RXDatapath(Module):
|
||||
]
|
||||
|
||||
# idle decoding
|
||||
idle_timer = WaitTimer(256)
|
||||
idle_timer = WaitTimer(32)
|
||||
self.submodules += idle_timer
|
||||
self.comb += [
|
||||
idle_timer.wait.eq(1),
|
||||
idle.eq(idle_timer.done & ((converter.source.data == 0) | (converter.source.data == (2**40-1))))
|
||||
self.sync += [
|
||||
If(converter.source.stb,
|
||||
idle_timer.wait.eq((converter.source.data == 0) | (converter.source.data == (2**40-1)))
|
||||
),
|
||||
idle.eq(idle_timer.done)
|
||||
]
|
||||
# comma decoding
|
||||
self.sync += \
|
||||
|
@ -313,7 +313,9 @@ class SERWBPHY(Module, AutoCSR):
|
||||
# tx/rx dataflow
|
||||
self.comb += [
|
||||
If(self.init.ready,
|
||||
sink.connect(self.serdes.tx.sink),
|
||||
If(sink.stb,
|
||||
sink.connect(self.serdes.tx.sink),
|
||||
),
|
||||
self.serdes.rx.source.connect(source)
|
||||
).Else(
|
||||
self.serdes.rx.source.ack.eq(1)
|
||||
|
@ -362,7 +362,9 @@ class SERWBPHY(Module, AutoCSR):
|
||||
# tx/rx dataflow
|
||||
self.comb += [
|
||||
If(self.init.ready,
|
||||
sink.connect(self.serdes.tx.sink),
|
||||
If(sink.stb,
|
||||
sink.connect(self.serdes.tx.sink),
|
||||
),
|
||||
self.serdes.rx.source.connect(source)
|
||||
).Else(
|
||||
self.serdes.rx.source.ack.eq(1)
|
||||
|
Loading…
Reference in New Issue
Block a user