forked from M-Labs/artiq
gateware/serwb/core: cleanup and increase fifo depth
This commit is contained in:
parent
5dc131636d
commit
db82b11f29
|
@ -12,10 +12,10 @@ class SERWBCore(Module):
|
||||||
depacketizer = Depacketizer(clk_freq)
|
depacketizer = Depacketizer(clk_freq)
|
||||||
packetizer = Packetizer()
|
packetizer = Packetizer()
|
||||||
self.submodules += depacketizer, packetizer
|
self.submodules += depacketizer, packetizer
|
||||||
tx_cdc = stream.AsyncFIFO([("data", 32)], 8)
|
tx_cdc = stream.AsyncFIFO([("data", 32)], 32)
|
||||||
tx_cdc = ClockDomainsRenamer({"write": "sys", "read": "serwb_serdes"})(tx_cdc)
|
tx_cdc = ClockDomainsRenamer({"write": "sys", "read": "serwb_serdes"})(tx_cdc)
|
||||||
self.submodules += tx_cdc
|
self.submodules += tx_cdc
|
||||||
rx_cdc = stream.AsyncFIFO([("data", 32)], 8)
|
rx_cdc = stream.AsyncFIFO([("data", 32)], 32)
|
||||||
rx_cdc = ClockDomainsRenamer({"write": "serwb_serdes", "read": "sys"})(rx_cdc)
|
rx_cdc = ClockDomainsRenamer({"write": "serwb_serdes", "read": "sys"})(rx_cdc)
|
||||||
self.submodules += rx_cdc
|
self.submodules += rx_cdc
|
||||||
self.comb += [
|
self.comb += [
|
||||||
|
@ -25,10 +25,12 @@ class SERWBCore(Module):
|
||||||
|
|
||||||
# core --> serdes
|
# core --> serdes
|
||||||
packetizer.source.connect(tx_cdc.sink),
|
packetizer.source.connect(tx_cdc.sink),
|
||||||
If(tx_cdc.source.stb & phy.init.ready,
|
If(phy.init.ready,
|
||||||
|
If(tx_cdc.source.stb,
|
||||||
phy.serdes.tx_data.eq(tx_cdc.source.data)
|
phy.serdes.tx_data.eq(tx_cdc.source.data)
|
||||||
),
|
),
|
||||||
tx_cdc.source.ack.eq(phy.init.ready),
|
tx_cdc.source.ack.eq(1)
|
||||||
|
),
|
||||||
|
|
||||||
# serdes --> core
|
# serdes --> core
|
||||||
rx_cdc.sink.stb.eq(phy.init.ready),
|
rx_cdc.sink.stb.eq(phy.init.ready),
|
||||||
|
|
Loading…
Reference in New Issue