From a1c641703a3140ad99cd316cb9dc49c8193a3658 Mon Sep 17 00:00:00 2001 From: tfcollins Date: Wed, 11 Dec 2024 01:54:38 +0200 Subject: [PATCH] Initial work on Jupiter MCS demo --- adi/__init__.py | 1 + adi/adrv9002.py | 11 + adi/adrv9002_multi.py | 144 ++ .../adrv9002_mcs_sync/MCS_30_72_pin_en.json | 1328 +++++++++++++++++ examples/adrv9002_mcs_sync/jupiter_sync.py | 185 +++ 5 files changed, 1669 insertions(+) create mode 100644 adi/adrv9002_multi.py create mode 100755 examples/adrv9002_mcs_sync/MCS_30_72_pin_en.json create mode 100644 examples/adrv9002_mcs_sync/jupiter_sync.py diff --git a/adi/__init__.py b/adi/__init__.py index 2db3ec9ee..7e0a84087 100644 --- a/adi/__init__.py +++ b/adi/__init__.py @@ -82,6 +82,7 @@ from adi.adpd1080 import adpd1080 from adi.adrf5720 import adrf5720 from adi.adrv9002 import adrv9002 +from adi.adrv9002_multi import adrv9002_multi from adi.adrv9009 import adrv9009 from adi.adrv9009_zu11eg import adrv9009_zu11eg from adi.adrv9009_zu11eg_fmcomms8 import adrv9009_zu11eg_fmcomms8 diff --git a/adi/adrv9002.py b/adi/adrv9002.py index ac1ae068b..46147094f 100644 --- a/adi/adrv9002.py +++ b/adi/adrv9002.py @@ -148,6 +148,17 @@ def tx_dma_mode(self): """ return self._tx_dma_mode + def mcs(self, value): + """Trigger Multi-chip Sync stage""" + self._set_iio_dev_attr("multi_chip_sync", value) + + mcs = property(None, mcs) + + @property + def temperature(self): + """temperature: Get temperature of the device""" + return self._get_iio_attr("temp0", "input", False) + @property def rx_ensm_mode_chan0(self): """rx_ensm_mode_chan0: RX Enable State Machine State Channel 0. Options are: diff --git a/adi/adrv9002_multi.py b/adi/adrv9002_multi.py new file mode 100644 index 000000000..32ca70f94 --- /dev/null +++ b/adi/adrv9002_multi.py @@ -0,0 +1,144 @@ +"""Multi-chip synchronization for ADRV9002 transceivers across FPGAs""" +import logging + +from .adrv9002 import adrv9002 +from .context_manager import context_manager +from .attribute import attribute +from .sshfs import sshfs + +logger = logging.getLogger(__name__) + +class synchrona(attribute, context_manager): + + def __init__(self, uri="", _device_name=""): + super().__init__(uri, _device_name) + self._ctrl = self._ctx.find_device("hmc7044") + if self._ctrl is None: + raise Exception("No HMC7044 found") + + def sysref_request(self, value): + self._set_iio_dev_attr("sysref_request", value, self._ctrl) + + sysref_request = property(None, sysref_request) + + +def _get_ctrl(ctrl, dev): + if ctrl is None: + return None + _dev_ctrl = dev.ctx.find_device(ctrl.name) + return _dev_ctrl + + +class map_to_multi_devices(object): + """This class intercepts singleton attribute access + and maps it to multiple devices""" + + _enable_interception = True + + @property + def _devices(self): + return [self.primary] + self.secondaries + + # Intercept methods + def _set_iio_dev_attr_str(self, attr, val, _ctrl=None): + for dev in self._devices: + logger.debug(f"Setting {attr} on {dev.uri}") + dev._set_iio_dev_attr_str(attr, val, _get_ctrl(_ctrl, dev)) + + def _get_iio_dev_attr_str(self, attr, _ctrl=None): + return [ + dev._get_iio_dev_attr_str(attr, _get_ctrl(_ctrl, dev)) + for dev in self._devices + ] + + def _set_iio_dev_attr(self, attr, val, _ctrl=None): + for dev in self._devices: + logger.debug(f"Setting {attr} on {dev.uri}") + dev._set_iio_dev_attr(attr, val, _get_ctrl(_ctrl, dev)) + + def _get_iio_dev_attr(self, attr, _ctrl=None): + return [ + dev._get_iio_dev_attr(attr, _get_ctrl(_ctrl, dev)) + for dev in self._devices + ] + + def _set_iio_attr(self, channel, attr, output, val, _ctrl=None): + for dev in self._devices: + logger.debug(f"Setting {attr} on {dev.uri}") + dev._set_iio_attr(channel, attr, output, val, _get_ctrl(_ctrl, dev)) + + def _get_iio_attr_str(self, channel, attr, output, _ctrl=None): + return [ + dev._get_iio_attr_str(channel, attr, output, _get_ctrl(_ctrl, dev)) + for dev in self._devices + ] + + def _get_iio_attr(self, channel, attr, output, _ctrl=None): + return [ + dev._get_iio_attr(channel, attr, output, _get_ctrl(_ctrl, dev)) + for dev in self._devices + ] + +class adrv9002_multi(map_to_multi_devices, adrv9002): + + primary = None + secondaries = [] + + def __init__( + self, + primary_uri="ip:analog.local", + secondary_uris=[], + sync_uri="ip:synchrona.local", + enable_ssh=False, + sshargs=None, + ): + + # Mirror top level design off single device + adrv9002.__init__(self, uri=primary_uri) + + # Reuse context for primary + class adrv9002_primary(adrv9002): + def __init__(self, ctx, uri) -> None: + self._ctx = ctx + self.uri = uri + super().__init__(uri) + logger.debug(f"Creating primary device: {primary_uri}") + self.primary = adrv9002_primary(self.ctx, primary_uri) + self.secondaries = [] + for uri in secondary_uris: + logger.debug(f"Creating secondary device: {uri}") + self.secondaries.append(adrv9002(uri=uri)) + + self.sync = synchrona(uri=sync_uri) + + self._dma_show_arming = False + self._jesd_show_status = False + self._jesd_fsm_show_status = False + self._clk_chip_show_cap_bank_sel = False + self._resync_tx = False + self._rx_initialized = False + self._request_sysref_carrier = False + + if enable_ssh: + self.primary_ssh = sshfs(address=primary_uri, **sshargs) + self.secondaries_ssh = [ + sshfs(address=uri, **sshargs) for uri in secondary_uris + ] + # self.sync_ssh = sshfs(address=sync_uri, **sshargs) + + def __del__(self): + # self.primary.__del__() + for secondary in self.secondaries: + secondary.__del__() + # self.sync.__del__() + + def _run(self, cmd): + output = {} + errors = {} + for ssh_dev in [self.primary_ssh] + self.secondaries_ssh: + o, e = ssh_dev._run(cmd) + output[ssh_dev.address] = o + errors[ssh_dev.address] = e + + return output, errors + diff --git a/examples/adrv9002_mcs_sync/MCS_30_72_pin_en.json b/examples/adrv9002_mcs_sync/MCS_30_72_pin_en.json new file mode 100755 index 000000000..b19690404 --- /dev/null +++ b/examples/adrv9002_mcs_sync/MCS_30_72_pin_en.json @@ -0,0 +1,1328 @@ +{ + "clocks": { + "deviceClock_kHz": 30720, + "clkPllVcoFreq_daHz": 884736000, + "clkPllHsDiv": 0, + "clkPllMode": 0, + "clk1105Div": 2, + "armClkDiv": 6, + "armPowerSavingClkDiv": 1, + "refClockOutEnable": true, + "auxPllPower": 2, + "clkPllPower": 2, + "padRefClkDrv": 0, + "extLo1OutFreq_kHz": 0, + "extLo2OutFreq_kHz": 0, + "rfPll1LoMode": 0, + "rfPll2LoMode": 0, + "ext1LoType": 0, + "ext2LoType": 0, + "rx1RfInputSel": 0, + "rx2RfInputSel": 0, + "extLo1Divider": 2, + "extLo2Divider": 2, + "rfPllPhaseSyncMode": 0, + "rx1LoSelect": 2, + "rx2LoSelect": 2, + "tx1LoSelect": 1, + "tx2LoSelect": 1, + "rx1LoDivMode": 1, + "rx2LoDivMode": 1, + "tx1LoDivMode": 1, + "tx2LoDivMode": 1, + "loGen1Select": 1, + "loGen2Select": 1 + }, + "rx": { + "rxInitChannelMask": 195, + "rxChannelCfg": [ { + "profile": { + "primarySigBandwidth_Hz": 38000000, + "rxOutputRate_Hz": 61440000, + "rxInterfaceSampleRate_Hz": 61440000, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 20000000, + "lpAdcCorner": 0, + "adcClk_kHz": 2211840, + "rxCorner3dB_kHz": 40000, + "rxCorner3dBLp_kHz": 40000, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 1, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 1, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 1, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 4, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 1, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 61440000, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 0, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 1 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 38000000, + "rxOutputRate_Hz": 61440000, + "rxInterfaceSampleRate_Hz": 61440000, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 20000000, + "lpAdcCorner": 0, + "adcClk_kHz": 2211840, + "rxCorner3dB_kHz": 40000, + "rxCorner3dBLp_kHz": 40000, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 2, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 1, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 1, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 4, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 1, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 61440000, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 2, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 1 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 12500, + "rxOutputRate_Hz": 0, + "rxInterfaceSampleRate_Hz": 0, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 0, + "lpAdcCorner": 0, + "adcClk_kHz": 0, + "rxCorner3dB_kHz": 0, + "rxCorner3dBLp_kHz": 0, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 0, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 0, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 0, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 0, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 0, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 0, + "ssiDataFormatSel": 0, + "numLaneSel": 0, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": false, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 12500, + "rxOutputRate_Hz": 0, + "rxInterfaceSampleRate_Hz": 0, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 0, + "lpAdcCorner": 0, + "adcClk_kHz": 0, + "rxCorner3dB_kHz": 0, + "rxCorner3dBLp_kHz": 0, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 0, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 0, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 0, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 0, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 0, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 0, + "ssiDataFormatSel": 0, + "numLaneSel": 0, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": false, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 38000000, + "rxOutputRate_Hz": 61440000, + "rxInterfaceSampleRate_Hz": 61440000, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 50000000, + "lpAdcCorner": 0, + "adcClk_kHz": 2211840, + "rxCorner3dB_kHz": 100000, + "rxCorner3dBLp_kHz": 100000, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 64, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 1, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 1, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 4, + "hbMux": 2, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 1, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 38000000, + "rxOutputRate_Hz": 61440000, + "rxInterfaceSampleRate_Hz": 61440000, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 50000000, + "lpAdcCorner": 0, + "adcClk_kHz": 2211840, + "rxCorner3dB_kHz": 100000, + "rxCorner3dBLp_kHz": 100000, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 128, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 1, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 1, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 4, + "hbMux": 2, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 3, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 12500, + "rxOutputRate_Hz": 0, + "rxInterfaceSampleRate_Hz": 0, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 0, + "lpAdcCorner": 0, + "adcClk_kHz": 0, + "rxCorner3dB_kHz": 0, + "rxCorner3dBLp_kHz": 0, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 0, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 0, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 0, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 0, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 0, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 0, + "ssiDataFormatSel": 0, + "numLaneSel": 0, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": false, + "rxMaskStrobeEn": false + } + } + }, { + "profile": { + "primarySigBandwidth_Hz": 12500, + "rxOutputRate_Hz": 0, + "rxInterfaceSampleRate_Hz": 0, + "rxOffsetLo_kHz": 0, + "rxNcoEnable": false, + "outputSignaling": 0, + "filterOrder": 1, + "filterOrderLp": 1, + "hpAdcCorner": 0, + "lpAdcCorner": 0, + "adcClk_kHz": 0, + "rxCorner3dB_kHz": 0, + "rxCorner3dBLp_kHz": 0, + "tiaPower": 2, + "tiaPowerLp": 2, + "channelType": 0, + "adcType": 1, + "lpAdcCalMode": 0, + "gainTableType": 0, + "rxDpProfile": { + "rxNbDecTop": { + "scicBlk23En": 0, + "scicBlk23DivFactor": 0, + "scicBlk23LowRippleEn": 0, + "decBy2Blk35En": 0, + "decBy2Blk37En": 0, + "decBy2Blk39En": 0, + "decBy2Blk41En": 0, + "decBy2Blk43En": 0, + "decBy3Blk45En": 0, + "decBy2Blk47En": 0 + }, + "rxWbDecTop": { + "decBy2Blk25En": 0, + "decBy2Blk27En": 0, + "decBy2Blk29En": 0, + "decBy2Blk31En": 0, + "decBy2Blk33En": 0, + "wbLpfBlk33p1En": 0 + }, + "rxDecTop": { + "decBy3Blk15En": 0, + "decBy2Hb3Blk17p1En": 0, + "decBy2Hb4Blk17p2En": 0, + "decBy2Hb5Blk19p1En": 0, + "decBy2Hb6Blk19p2En": 0 + }, + "rxSincHBTop": { + "sincGainMux": 1, + "sincMux": 0, + "hbMux": 4, + "isGainCompEnabled": 0, + "gainComp9GainI": [ 16384, 16384, 16384, 16384, 16384, 16384 ], + "gainComp9GainQ": [ 0, 0, 0, 0, 0, 0 ] + }, + "rxNbDem": { + "dpInFifo": { + "dpInFifoEn": 0, + "dpInFifoMode": 0, + "dpInFifoTestDataSel": 0 + }, + "rxNbNco": { + "rxNbNcoEn": 0, + "rxNbNcoConfig": { + "freq": 0, + "sampleFreq": 0, + "phase": 0, + "realOut": 0 + } + }, + "rxWbNbCompPFir": { + "bankSel": 0, + "rxWbNbCompPFirInMuxSel": 0, + "rxWbNbCompPFirEn": 0 + }, + "resamp": { + "rxResampEn": 0, + "resampPhaseI": 0, + "resampPhaseQ": 0 + }, + "gsOutMuxSel": 1, + "rxOutSel": 0, + "rxRoundMode": 0, + "dpArmSel": 0 + } + }, + "lnaConfig": { + "externalLnaPresent": false, + "gpioSourceSel": 0, + "externalLnaPinSel": 0, + "settlingDelay": 0, + "numberLnaGainSteps": 0, + "lnaGainSteps_mdB": [ 0, 0, 0, 0 ], + "lnaDigitalGainDelay": 0, + "minGainIndex": 0, + "lnaType": 0 + }, + "rxSsiConfig": { + "ssiType": 0, + "ssiDataFormatSel": 0, + "numLaneSel": 0, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 0, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": false, + "rxMaskStrobeEn": false + } + } + } ] + }, + "tx": { + "txInitChannelMask": 12, + "txProfile": [ { + "primarySigBandwidth_Hz": 38000000, + "txInputRate_Hz": 61440000, + "txInterfaceSampleRate_Hz": 61440000, + "txOffsetLo_kHz": 0, + "validDataDelay": 0, + "txBbf3dBCorner_kHz": 50000, + "outputSignaling": 0, + "txPdBiasCurrent": 1, + "txPdGainEnable": 0, + "txPrePdRealPole_kHz": 1000000, + "txPostPdRealPole_kHz": 530000, + "txBbfPower": 2, + "txExtLoopBackType": 0, + "txExtLoopBackForInitCal": 0, + "txPeakLoopBackPower": 0, + "frequencyDeviation_Hz": 0, + "txDpProfile": { + "txPreProc": { + "txPreProcSymbol0": 0, + "txPreProcSymbol1": 0, + "txPreProcSymbol2": 0, + "txPreProcSymbol3": 0, + "txPreProcSymMapDivFactor": 1, + "txPreProcMode": 1, + "txPreProcWbNbPfirIBankSel": 0, + "txPreProcWbNbPfirQBankSel": 1 + }, + "txWbIntTop": { + "txInterpBy2Blk30En": 0, + "txInterpBy2Blk28En": 0, + "txInterpBy2Blk26En": 0, + "txInterpBy2Blk24En": 0, + "txInterpBy2Blk22En": 0, + "txWbLpfBlk22p1En": 0 + }, + "txNbIntTop": { + "txInterpBy2Blk20En": 0, + "txInterpBy2Blk18En": 0, + "txInterpBy2Blk16En": 0, + "txInterpBy2Blk14En": 0, + "txInterpBy2Blk12En": 0, + "txInterpBy3Blk10En": 0, + "txInterpBy2Blk8En": 0, + "txScicBlk32En": 0, + "txScicBlk32DivFactor": 1 + }, + "txIntTop": { + "interpBy3Blk44p1En": 1, + "sinc3Blk44En": 0, + "sinc2Blk42En": 0, + "interpBy3Blk40En": 1, + "interpBy2Blk38En": 0, + "interpBy2Blk36En": 0 + }, + "txIntTopFreqDevMap": { + "rrc2Frac": 0, + "mpll": 0, + "nchLsw": 0, + "nchMsb": 0, + "freqDevMapEn": 0, + "txRoundEn": 1 + }, + "txIqdmDuc": { + "iqdmDucMode": 0, + "iqdmDev": 0, + "iqdmDevOffset": 0, + "iqdmScalar": 0, + "iqdmThreshold": 0, + "iqdmNco": { + "freq": 0, + "sampleFreq": 61440000, + "phase": 0, + "realOut": 0 + } + } + }, + "txSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 1, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + }, { + "primarySigBandwidth_Hz": 38000000, + "txInputRate_Hz": 61440000, + "txInterfaceSampleRate_Hz": 61440000, + "txOffsetLo_kHz": 0, + "validDataDelay": 0, + "txBbf3dBCorner_kHz": 50000, + "outputSignaling": 0, + "txPdBiasCurrent": 1, + "txPdGainEnable": 0, + "txPrePdRealPole_kHz": 1000000, + "txPostPdRealPole_kHz": 530000, + "txBbfPower": 2, + "txExtLoopBackType": 0, + "txExtLoopBackForInitCal": 0, + "txPeakLoopBackPower": 0, + "frequencyDeviation_Hz": 0, + "txDpProfile": { + "txPreProc": { + "txPreProcSymbol0": 0, + "txPreProcSymbol1": 0, + "txPreProcSymbol2": 0, + "txPreProcSymbol3": 0, + "txPreProcSymMapDivFactor": 1, + "txPreProcMode": 1, + "txPreProcWbNbPfirIBankSel": 2, + "txPreProcWbNbPfirQBankSel": 3 + }, + "txWbIntTop": { + "txInterpBy2Blk30En": 0, + "txInterpBy2Blk28En": 0, + "txInterpBy2Blk26En": 0, + "txInterpBy2Blk24En": 0, + "txInterpBy2Blk22En": 0, + "txWbLpfBlk22p1En": 0 + }, + "txNbIntTop": { + "txInterpBy2Blk20En": 0, + "txInterpBy2Blk18En": 0, + "txInterpBy2Blk16En": 0, + "txInterpBy2Blk14En": 0, + "txInterpBy2Blk12En": 0, + "txInterpBy3Blk10En": 0, + "txInterpBy2Blk8En": 0, + "txScicBlk32En": 0, + "txScicBlk32DivFactor": 1 + }, + "txIntTop": { + "interpBy3Blk44p1En": 1, + "sinc3Blk44En": 0, + "sinc2Blk42En": 0, + "interpBy3Blk40En": 1, + "interpBy2Blk38En": 0, + "interpBy2Blk36En": 0 + }, + "txIntTopFreqDevMap": { + "rrc2Frac": 0, + "mpll": 0, + "nchLsw": 0, + "nchMsb": 0, + "freqDevMapEn": 0, + "txRoundEn": 1 + }, + "txIqdmDuc": { + "iqdmDucMode": 0, + "iqdmDev": 0, + "iqdmDevOffset": 0, + "iqdmScalar": 0, + "iqdmThreshold": 0, + "iqdmNco": { + "freq": 0, + "sampleFreq": 61440000, + "phase": 0, + "realOut": 0 + } + } + }, + "txSsiConfig": { + "ssiType": 2, + "ssiDataFormatSel": 4, + "numLaneSel": 1, + "strobeType": 0, + "lsbFirst": 0, + "qFirst": 0, + "txRefClockPin": 1, + "lvdsIBitInversion": false, + "lvdsQBitInversion": false, + "lvdsStrobeBitInversion": false, + "lvdsUseLsbIn12bitMode": 0, + "lvdsRxClkInversionEn": false, + "cmosDdrPosClkEn": false, + "cmosClkInversionEn": false, + "ddrEn": true, + "rxMaskStrobeEn": false + } + } ] + }, + "sysConfig": { + "duplexMode": 1, + "fhModeOn": 0, + "numDynamicProfiles": 1, + "mcsMode": 2, + "mcsInterfaceType": 2, + "adcTypeMonitor": 1, + "pllLockTime_us": 400, + "pllPhaseSyncWait_us": 0, + "pllModulus": { + "modulus": [ 8388593, 8388593, 8388593, 8388593, 8388593 ], + "dmModulus": [ 8388593, 8388593 ] + }, + "warmBootEnable": false + }, + "pfirBuffer": { + "pfirRxWbNbChFilterCoeff_A": { + "numCoeff": 128, + "symmetricSel": 0, + "tapsSel": 3, + "gainSel": 2, + "coefficients": [ 475, 312, -782, -39, 1201, -777, -1182, 1981, 177, -2874, 1941, 2393, -4416, 225, 5594, -4581, -3668, 8650, -1992, -9342, 9646, 4213, -15137, 6404, 13615, -18199, -2610, 23969, -15142, -17198, 31204, -3269, -34604, 30213, 17955, -49337, 16361, 45636, -53954, -12567, 72920, -40769, -54562, 89506, -4148, -102269, 83183, 57280, -142874, 41767, 139213, -158628, -45955, 231679, -125964, -193870, 320642, -4532, -442087, 390927, 347244, -1055854, 429729, 4391599, 4391599, 429729, -1055854, 347244, 390927, -442087, -4532, 320642, -193870, -125964, 231679, -45955, -158628, 139213, 41767, -142874, 57280, 83183, -102269, -4148, 89506, -54562, -40769, 72920, -12567, -53954, 45636, 16361, -49337, 17955, 30213, -34604, -3269, 31204, -17198, -15142, 23969, -2610, -18199, 13615, 6404, -15137, 4213, 9646, -9342, -1992, 8650, -3668, -4581, 5594, 225, -4416, 2393, 1941, -2874, 177, 1981, -1182, -777, 1201, -39, -782, 312, 0 ] + }, + "pfirRxWbNbChFilterCoeff_B": { + "numCoeff": 128, + "symmetricSel": 0, + "tapsSel": 3, + "gainSel": 2, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8388608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + }, + "pfirRxWbNbChFilterCoeff_C": { + "numCoeff": 128, + "symmetricSel": 0, + "tapsSel": 3, + "gainSel": 2, + "coefficients": [ 475, 312, -782, -39, 1201, -777, -1182, 1981, 177, -2874, 1941, 2393, -4416, 225, 5594, -4581, -3668, 8650, -1992, -9342, 9646, 4213, -15137, 6404, 13615, -18199, -2610, 23969, -15142, -17198, 31204, -3269, -34604, 30213, 17955, -49337, 16361, 45636, -53954, -12567, 72920, -40769, -54562, 89506, -4148, -102269, 83183, 57280, -142874, 41767, 139213, -158628, -45955, 231679, -125964, -193870, 320642, -4532, -442087, 390927, 347244, -1055854, 429729, 4391599, 4391599, 429729, -1055854, 347244, 390927, -442087, -4532, 320642, -193870, -125964, 231679, -45955, -158628, 139213, 41767, -142874, 57280, 83183, -102269, -4148, 89506, -54562, -40769, 72920, -12567, -53954, 45636, 16361, -49337, 17955, 30213, -34604, -3269, 31204, -17198, -15142, 23969, -2610, -18199, 13615, 6404, -15137, 4213, 9646, -9342, -1992, 8650, -3668, -4581, 5594, 225, -4416, 2393, 1941, -2874, 177, 1981, -1182, -777, 1201, -39, -782, 312, 0 ] + }, + "pfirRxWbNbChFilterCoeff_D": { + "numCoeff": 128, + "symmetricSel": 0, + "tapsSel": 3, + "gainSel": 2, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0 ] + } ], + "pfirRxMagLowTiaLowSRHp": [ { + "numCoeff": 21, + "coefficients": [ -12, 83, -293, 734, -1489, 2594, -3965, 5403, -6516, 5868, 27957, 5868, -6516, 5403, -3965, 2594, -1489, 734, -293, 83, -12 ] + }, { + "numCoeff": 21, + "coefficients": [ -12, 83, -293, 734, -1489, 2594, -3965, 5403, -6516, 5868, 27957, 5868, -6516, 5403, -3965, 2594, -1489, 734, -293, 83, -12 ] + } ], + "pfirRxMagLowTiaHighSRHp": [ { + "numCoeff": 21, + "coefficients": [ -62, 194, 80, -829, 201, 1857, -179, -4602, -1259, 11431, 19102, 11431, -1259, -4602, -179, 1857, 201, -829, 80, 194, -62 ] + }, { + "numCoeff": 21, + "coefficients": [ -62, 194, 80, -829, 201, 1857, -179, -4602, -1259, 11431, 19102, 11431, -1259, -4602, -179, 1857, 201, -829, 80, 194, -62 ] + } ], + "pfirRxMagHighTiaHighSRHp": [ { + "numCoeff": 21, + "coefficients": [ 39, -229, 714, -1485, 2134, -1844, -219, 4147, -8514, 8496, 26292, 8496, -8514, 4147, -219, -1844, 2134, -1485, 714, -229, 39 ] + }, { + "numCoeff": 21, + "coefficients": [ 39, -229, 714, -1485, 2134, -1844, -219, 4147, -8514, 8496, 26292, 8496, -8514, 4147, -219, -1844, 2134, -1485, 714, -229, 39 ] + } ], + "pfirRxMagLowTiaLowSRLp": [ { + "numCoeff": 21, + "coefficients": [ -12, 83, -293, 733, -1488, 2593, -3963, 5401, -6514, 5870, 27953, 5870, -6514, 5401, -3963, 2593, -1488, 733, -293, 83, -12 ] + }, { + "numCoeff": 21, + "coefficients": [ -12, 83, -293, 733, -1488, 2593, -3963, 5401, -6514, 5870, 27953, 5870, -6514, 5401, -3963, 2593, -1488, 733, -293, 83, -12 ] + } ], + "pfirRxMagLowTiaHighSRLp": [ { + "numCoeff": 21, + "coefficients": [ -62, 194, 80, -828, 201, 1855, -180, -4597, -1254, 11428, 19093, 11428, -1254, -4597, -180, 1855, 201, -828, 80, 194, -62 ] + }, { + "numCoeff": 21, + "coefficients": [ -62, 194, 80, -828, 201, 1855, -180, -4597, -1254, 11428, 19093, 11428, -1254, -4597, -180, 1855, 201, -828, 80, 194, -62 ] + } ], + "pfirRxMagHighTiaHighSRLp": [ { + "numCoeff": 21, + "coefficients": [ 39, -229, 712, -1481, 2128, -1841, -215, 4131, -8490, 8497, 26266, 8497, -8490, 4131, -215, -1841, 2128, -1481, 712, -229, 39 ] + }, { + "numCoeff": 21, + "coefficients": [ 39, -229, 712, -1481, 2128, -1841, -215, 4131, -8490, 8497, 26266, 8497, -8490, 4131, -215, -1841, 2128, -1481, 712, -229, 39 ] + } ], + "pfirTxMagComp1": { + "numCoeff": 21, + "coefficients": [ 69, -384, 1125, -2089, 2300, -165, -5248, 12368, -13473, 4864, 34039, 4864, -13473, 12368, -5248, -165, 2300, -2089, 1125, -384, 69 ] + }, + "pfirTxMagComp2": { + "numCoeff": 21, + "coefficients": [ 69, -384, 1125, -2089, 2300, -165, -5248, 12368, -13473, 4864, 34039, 4864, -13473, 12368, -5248, -165, 2300, -2089, 1125, -384, 69 ] + }, + "pfirTxMagCompNb": [ { + "numCoeff": 13, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + }, { + "numCoeff": 13, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + } ], + "pfirRxMagCompNb": [ { + "numCoeff": 13, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + }, { + "numCoeff": 13, + "coefficients": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + } ] + } +} \ No newline at end of file diff --git a/examples/adrv9002_mcs_sync/jupiter_sync.py b/examples/adrv9002_mcs_sync/jupiter_sync.py new file mode 100644 index 000000000..0e486bc23 --- /dev/null +++ b/examples/adrv9002_mcs_sync/jupiter_sync.py @@ -0,0 +1,185 @@ +import adi +import numpy as np +from time import sleep +import logging +import sys + +# Set up logging to only show adrv9002_multi logs +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("adi.adrv9002_multi") +logger.setLevel(logging.DEBUG) +logger = logging.getLogger("paramiko") +logger.setLevel(logging.CRITICAL) + +INTERNAL_MCS = 0 +LOOPBACK_TEST = 1 +CALIBRATE = 1 +REBOOT = False + +set_dds_upto_dev = ( + 10 # can be used to remove setting DDS to move faster through the testing process +) + +synchrona_ip = "10.48.65.214" +device_ips = ["10.48.65.158", "10.48.65.239", "10.48.65.235", "10.48.65.240"] +device_ips = [f"ip:{ip}" for ip in device_ips] + +sdrs = adi.adrv9002_multi( + primary_uri=device_ips[0], + secondary_uris=device_ips[1:], + sync_uri=f"ip:{synchrona_ip}", + enable_ssh=True, + sshargs={"username": "root", "password": "analog1"}, +) + +# Reboot all systems +if REBOOT: + print("Rebooting all systems") + for dev in [sdrs.primary_ssh] + sdrs.secondaries_ssh: + dev._run("reboot") + + sys.exit(0) +################################################################################ +# 1 Prepare MCS + +## Sync request +## sync config +# 0- internal(1) or external(0) MCS pulses +# 1- internal(1) or external(0) mcs req +# 2- manual mcs requst flag(must be toggled) +# 3- mcs requests drives mcs(1) or capture(0) +v = 0xb if INTERNAL_MCS == 1 else 0x9 +o, e = sdrs._run(f'busybox devmem 0x84A0500c 32 {v}') +print(f"0x84A0500c: {o}") +print(f'Errors: {e}') + +# ADRV9002 stuff +print("Loading profiles") +sdrs.write_profile("MCS_30_72_pin_en.json") + +sdrs.rx_ensm_mode_chan0 = 'calibrated' +sdrs.rx_ensm_mode_chan1 = 'calibrated' +sdrs.tx_ensm_mode_chan0 = 'calibrated' +sdrs.tx_ensm_mode_chan1 = 'calibrated' + +sleep(2) + +# ARM MCS +sdrs.primary.ctx.set_timeout(30000) +for sdr in sdrs.secondaries: + sdr._ctx.set_timeout(30000) +sdrs.mcs = 1 + +print("Waiting for 6 pulses") +sleep(0.1) + + +################################################################################ +# 2 Issue sync pulse + +# MCS request +if INTERNAL_MCS == 1: + out, e = sdrs.primary_ssh._run("busybox devmem 0x84A0500c 32") + print(f"0x84A0500c: {out}") + out = int(out, 16) + print("toggle internal mcs request flag") + sdrs.primary_ssh._run(f"busybox devmem 0x84A0500c 32 {out | 0x4}") + sleep(0.1) + sdrs.primary_ssh._run(f"busybox devmem 0x84A0500c 32 {out | 0xfb}") +else: + for t in range(6): + try: + print("Requesting sysref") + sdrs.sync.sysref_request = 1 + break + except Exception as e: + if t == 5: + raise Exception("Failed to request sysref") + print(e) + sleep(0.1) + +temp = sdrs.temperature +print(f"Temperatures: {temp}") + + +################################################################################ +# 3 MCS Post + +print("Enabling RF channels") +sdrs.rx_ensm_mode_chan0 = 'rf_enabled' +sdrs.rx_ensm_mode_chan1 = 'rf_enabled' +sdrs.tx_ensm_mode_chan0 = 'rf_enabled' +sdrs.tx_ensm_mode_chan1 = 'rf_enabled' + +print("Configure DDSs") +tone_freq = 500e3 +tone_scale = 0.4 +sdrs.primary.dds_single_tone(tone_freq, tone_scale) +for dev in sdrs.secondaries: + dev.dds_single_tone(tone_freq, tone_scale) + +print("ARM rx DMA and DDS cores") + +print("Set MCS request as trigger source") +# mcs req as trig source +# 0- internal(1) or external(0) MCS pulses +# 1- internal(1) or external(0) mcs req +# 2- manual mcs requst flag(must be toggled) +# 3- mcs requests drives mcs(1) or trigger transfer(0) +for dev in [sdrs.primary_ssh] + sdrs.secondaries_ssh: + val, e = dev._run("busybox devmem 0x84A0500c 32") + print(f"0x84A0500c: {val}") + val = int(val, 16) + dev._run(f"busybox devmem 0x84A0500c 32 {val & 0xf7}") + +print("Mute DAC data sources") +for dev in [sdrs.primary] + sdrs.secondaries: + for chan in range(4): + dev._txdac.reg_write(0x80000418 + chan*0x40, 0x3) + dev._ctrl.debug_attrs['tx0_ssi_test_mode_loopback_en'] = '0' + dev._ctrl.debug_attrs['tx1_ssi_test_mode_loopback_en'] = '0' + if LOOPBACK_TEST == 1: + dev._ctrl.debug_attrs['tx0_ssi_test_mode'] = '1' + dev._ctrl.debug_attrs['tx1_ssi_test_mode'] = '1' + +print("ARM DMA") +for dev in [sdrs.primary] + sdrs.secondaries: + dev._rxadc.reg_write(0x80000048, 0x2) + dev._txdac.reg_write(0x80000044, 0x2) + +print("Enable DAC data sources") +for dev in [sdrs.primary] + sdrs.secondaries: + for chan in range(4): + dev._txdac.reg_write(0x80000418 + chan*0x40, 0x0) + +print("Capture data") +for dev in [sdrs.primary] + sdrs.secondaries: + dev.rx_enabled_channels = [0, 1] + dev.rx_buffer_size = 2**16 + +data = {} +for dev in [sdrs.primary] + sdrs.secondaries: + data[dev.uri] = dev.rx() + +sleep(1) + +print("Issue Sync pulse") +sdrs.sync.sysref_request = 1 + +# Plot data and save to figure +import matplotlib.pyplot as plt +plt.figure() + +# Plot add devices and channels +for dev in data: + iq_data = data[dev] + real = iq_data.real + imag = iq_data.imag + plt.plot(real, label=f"{dev} real") + # plt.plot(imag, label=f"{dev} imag") + +plt.legend() +# Save to file +plt.savefig("sync.png") + +