forked from M-Labs/artiq
drtio-eem: remove unnecessary rtio_rx clock domain
This commit is contained in:
parent
9bee4b9697
commit
5d38db19d0
|
@ -27,9 +27,10 @@ class ChannelInterface:
|
||||||
|
|
||||||
|
|
||||||
class TransceiverInterface(AutoCSR):
|
class TransceiverInterface(AutoCSR):
|
||||||
def __init__(self, channel_interfaces):
|
def __init__(self, channel_interfaces, *, async_rx=True):
|
||||||
self.stable_clkin = CSRStorage()
|
self.stable_clkin = CSRStorage()
|
||||||
self.txenable = CSRStorage(len(channel_interfaces))
|
self.txenable = CSRStorage(len(channel_interfaces))
|
||||||
|
if async_rx:
|
||||||
for i in range(len(channel_interfaces)):
|
for i in range(len(channel_interfaces)):
|
||||||
name = "rtio_rx" + str(i)
|
name = "rtio_rx" + str(i)
|
||||||
setattr(self.clock_domains, "cd_"+name, ClockDomain(name=name))
|
setattr(self.clock_domains, "cd_"+name, ClockDomain(name=name))
|
||||||
|
|
|
@ -2,6 +2,12 @@ from migen import *
|
||||||
from migen.genlib.cdc import ElasticBuffer
|
from migen.genlib.cdc import ElasticBuffer
|
||||||
|
|
||||||
|
|
||||||
|
class NoRXSynchronizer:
|
||||||
|
"""To be used when RX is already synchronous (e.g. IOSERDES based PHY)."""
|
||||||
|
def resync(self, signal):
|
||||||
|
return signal
|
||||||
|
|
||||||
|
|
||||||
class GenericRXSynchronizer(Module):
|
class GenericRXSynchronizer(Module):
|
||||||
"""Simple RX synchronizer based on the portable Migen elastic buffer.
|
"""Simple RX synchronizer based on the portable Migen elastic buffer.
|
||||||
|
|
||||||
|
|
|
@ -472,10 +472,4 @@ class EEMSerdes(Module, TransceiverInterface, AutoCSR):
|
||||||
|
|
||||||
self.submodules += serdes_list
|
self.submodules += serdes_list
|
||||||
|
|
||||||
TransceiverInterface.__init__(self, channel_interfaces)
|
TransceiverInterface.__init__(self, channel_interfaces, async_rx=False)
|
||||||
|
|
||||||
for i in range(len(serdes_list)):
|
|
||||||
self.comb += [
|
|
||||||
getattr(self, "cd_rtio_rx" + str(i)).clk.eq(ClockSignal()),
|
|
||||||
getattr(self, "cd_rtio_rx" + str(i)).rst.eq(ResetSignal())
|
|
||||||
]
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ from artiq.gateware import rtio
|
||||||
from artiq.gateware.rtio.xilinx_clocking import fix_serdes_timing_path
|
from artiq.gateware.rtio.xilinx_clocking import fix_serdes_timing_path
|
||||||
from artiq.gateware.rtio.phy import ttl_simple
|
from artiq.gateware.rtio.phy import ttl_simple
|
||||||
from artiq.gateware.drtio.transceiver import eem_serdes
|
from artiq.gateware.drtio.transceiver import eem_serdes
|
||||||
from artiq.gateware.drtio.rx_synchronizer import XilinxRXSynchronizer
|
from artiq.gateware.drtio.rx_synchronizer import NoRXSynchronizer
|
||||||
from artiq.gateware.drtio import *
|
from artiq.gateware.drtio import *
|
||||||
from artiq.build_soc import *
|
from artiq.build_soc import *
|
||||||
|
|
||||||
|
@ -69,11 +69,10 @@ class Satellite(BaseSoC, AMPSoC):
|
||||||
|
|
||||||
self.submodules.rtio_tsc = rtio.TSC(glbl_fine_ts_width=3)
|
self.submodules.rtio_tsc = rtio.TSC(glbl_fine_ts_width=3)
|
||||||
|
|
||||||
cdr = ClockDomainsRenamer({"rtio_rx": "rtio_rx0"})
|
cdr = ClockDomainsRenamer({"rtio_rx": "sys"})
|
||||||
self.submodules.rx_synchronizer = cdr(XilinxRXSynchronizer())
|
|
||||||
core = cdr(DRTIOSatellite(
|
core = cdr(DRTIOSatellite(
|
||||||
self.rtio_tsc, self.eem_transceiver.channels[0],
|
self.rtio_tsc, self.eem_transceiver.channels[0],
|
||||||
self.rx_synchronizer))
|
NoRXSynchronizer()))
|
||||||
self.submodules.drtiosat = core
|
self.submodules.drtiosat = core
|
||||||
self.csr_devices.append("drtiosat")
|
self.csr_devices.append("drtiosat")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue