From d61d7a5a950dd5424fc58530584bedc9a8304411 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 3 Jun 2024 15:58:44 +0800 Subject: [PATCH] zc706: add CXP FMC variant --- src/gateware/zc706.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/gateware/zc706.py b/src/gateware/zc706.py index 92c9208..3b304d9 100755 --- a/src/gateware/zc706.py +++ b/src/gateware/zc706.py @@ -25,6 +25,7 @@ import analyzer import acpki import drtio_aux_controller import zynq_clocking +import coaxpress_4r from config import write_csr_file, write_mem_file, write_rustc_cfg_file class SMAClkinForward(Module): @@ -648,6 +649,14 @@ class _NIST_QC2_RTIO: self.add_rtio(rtio_channels) +class _CXP_FMC_RTIO(): + """ + CoaXpress FMC with 4 CXP channel and 1 SMA trigger + """ + def __init__(self): + platform = self.platform + platform.add_extension(coaxpress_4r.fmc_adapter_io) + class NIST_CLOCK(ZC706, _NIST_CLOCK_RTIO): def __init__(self, acpki, drtio100mhz): ZC706.__init__(self, acpki) @@ -680,8 +689,14 @@ class NIST_QC2_Satellite(_SatelliteBase, _NIST_QC2_RTIO): _SatelliteBase.__init__(self, acpki, drtio100mhz) _NIST_QC2_RTIO.__init__(self) +class CXP_FMC(ZC706, _CXP_FMC_RTIO): + def __init__(self, acpki, drtio100mhz): + ZC706.__init__(self, acpki) + self.submodules += SMAClkinForward(self.platform) + _CXP_FMC_RTIO.__init__(self) + VARIANTS = {cls.__name__.lower(): cls for cls in [NIST_CLOCK, NIST_CLOCK_Master, NIST_CLOCK_Satellite, - NIST_QC2, NIST_QC2_Master, NIST_QC2_Satellite]} + NIST_QC2, NIST_QC2_Master, NIST_QC2_Satellite, CXP_FMC]} def main(): parser = argparse.ArgumentParser(