def __init__(self, uri="", username="******", password="******", disable_jesd_control=False): """Initialize AD9371 interface class. Args: uri (str): URI of target platform with AD9371 username (str): SSH username for target board. Required for JESD monitoring password (str): SSH password for target board. Required for JESD monitoring disable_jesd_control (bool): Disable JESD status monitoring over SSH """ context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9371-phy") self._rxadc = self._ctx.find_device("axi-ad9371-rx-hpc") self._rxobs = self._ctx.find_device("axi-ad9371-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-ad9371-tx-hpc") if not disable_jesd_control and jesd: self._jesd = jesd(uri, username=username, password=password) rx_tx.__init__(self) self.obs = obs(self._ctx, self._rxobs, self._obs_channel_names)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9361-phy") self._ctrl_b = self._ctx.find_device("ad9361-phy-B") self._rxadc = self._ctx.find_device("cf-ad9361-A") self._txdac = self._ctx.find_device("cf-ad9361-dds-core-lpc") self._rxadc_chip_b = self._ctx.find_device("cf-ad9361-B") self._txdac_chip_b = self._ctx.find_device("cf-ad9361-dds-core-B") rx_tx.__init__(self)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9371-phy") self._rxadc = self._ctx.find_device("axi-ad9371-rx-hpc") self._rxobs = self._ctx.find_device("axi-ad9371-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-ad9371-tx-hpc") rx_tx.__init__(self, self.rx_enabled_channels, self.tx_enabled_channels)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("adrv9009-phy") self._rxadc = self._ctx.find_device("axi-adrv9009-rx-hpc") self._rxobs = self._ctx.find_device("axi-adrv9009-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-adrv9009-tx-hpc") rx_tx.__init__(self)
def __init__(self, uri=""): context_manager.__init__(self, uri, self.device_name) self.ctrl = self.ctx.find_device("ad9361-phy") self.rxadc = self.ctx.find_device("cf-ad9361-lpc") self.txdac = self.ctx.find_device("cf-ad9361-dds-core-lpc") rx_tx.__init__(self, self.rx_enabled_channels, self.tx_enabled_channels)
def __init__(self, uri="", jesd_monitor=False, jesd=None): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("adrv9009-phy") self._rxadc = self._ctx.find_device("axi-adrv9009-rx-hpc") self._rxobs = self._ctx.find_device("axi-adrv9009-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-adrv9009-tx-hpc") self._ctx.set_timeout(30000) # Needed for loading profiles self._jesd = jesd or _import_jesd(uri) if jesd_monitor else None rx_tx.__init__(self)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9361-phy") self._ctrl_b = self._ctx.find_device("ad9361-phy-B") self._rxadc = self._ctx.find_device("cf-ad9361-A") self._txdac = self._ctx.find_device("cf-ad9361-dds-core-lpc") self._rxadc_chip_b = self._ctx.find_device("cf-ad9361-B") self._txdac_chip_b = self._ctx.find_device("cf-ad9361-dds-core-B") rx_tx.__init__(self) # pylint: disable=W0233 if libad9361: libad9361.fmcomms5_multichip_sync(self._ctx, 3)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("adrv9009-phy") self._rxadc = self._ctx.find_device("axi-adrv9009-rx-hpc") self._rxobs = self._ctx.find_device("axi-adrv9009-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-adrv9009-tx-hpc") self._ctx.set_timeout(30000) # Needed for loading profiles rx_tx.__init__(self)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) # Default device for attribute writes self._ctrl = self._ctx.find_device("axi-ad9081-rx-hpc") # Devices with buffers self._rxadc = self._ctx.find_device("axi-ad9081-rx-hpc") self._txdac = self._ctx.find_device("axi-ad9081-tx-hpc") # Get DDC and DUC mappings paths = {} for ch in self._rxadc.channels: if "label" in ch.attrs: paths = _map_to_dict(paths, ch) self._path_map = paths # Get data + DDS channels for ch in self._rxadc.channels: if ch.scan_element and not ch.output: self._rx_channel_names.append(ch._id) for ch in self._txdac.channels: if ch.scan_element: self._tx_channel_names.append(ch._id) else: self._dds_channel_names.append(ch._id) # Sort channel names self._rx_channel_names = _sortconv(self._rx_channel_names) self._tx_channel_names = _sortconv(self._tx_channel_names) self._dds_channel_names = _sortconv(self._dds_channel_names, dds=True) # Map unique attributes to channel properties self._rx_fine_ddc_channel_names = [] self._rx_coarse_ddc_channel_names = [] self._tx_fine_duc_channel_names = [] self._tx_coarse_duc_channel_names = [] for converter in paths: for cdc in paths[converter]: channels = [] for fdc in paths[converter][cdc]: channels += paths[converter][cdc][fdc]["channels"] channels = [name for name in channels if "_i" in name] if "ADC" in converter: self._rx_coarse_ddc_channel_names.append(channels[0]) self._rx_fine_ddc_channel_names += channels else: self._tx_coarse_duc_channel_names.append(channels[0]) self._tx_fine_duc_channel_names += channels rx_tx.__init__(self) sync_start.__init__(self) self.rx_buffer_size = 2**16
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9371-phy") self._rxadc = self._ctx.find_device("axi-ad9371-rx-hpc") self._rxobs = self._ctx.find_device("axi-ad9371-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-ad9371-tx-hpc") rx_tx.__init__(self) self.obs = obs(self._ctx, self._rxobs, self._obs_channel_names)
def __init__(self, uri="", jesd_monitor=False, jesd=None): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("adrv9009-phy") self._rxadc = self._ctx.find_device("axi-adrv9009-rx-hpc") self._rxobs = self._ctx.find_device("axi-adrv9009-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-adrv9009-tx-hpc") self._ctx.set_timeout(30000) # Needed for loading profiles if jesdadi and jesd_monitor: self._jesd = jesd if jesd else jesdadi(uri=uri) rx_tx.__init__(self) self.obs = obs(self._ctx, self._rxobs, self._obs_channel_names)
def __init__(self, uri="", username="******", password="******"): context_manager.__init__(self, uri, self._device_name) self._ctrl = self._ctx.find_device("ad9371-phy") self._rxadc = self._ctx.find_device("axi-ad9371-rx-hpc") self._rxobs = self._ctx.find_device("axi-ad9371-rx-obs-hpc") self._txdac = self._ctx.find_device("axi-ad9371-tx-hpc") self._jesd = jesd(uri, username=username, password=password) rx_tx.__init__(self) self.obs = obs(self._ctx, self._rxobs, self._obs_channel_names)
def __init__(self, uri=""): context_manager.__init__(self, uri, self._device_name) # Determine if we have a split or combined DMA devs = self._ctx.devices rxdevs = list(filter(lambda dev: "rx" in str(dev.name), devs)) txdevs = list(filter(lambda dev: "tx" in str(dev.name), devs)) if len(rxdevs) > 1: self._rx_dma_mode = "split" self._rxadc = self._ctx.find_device("axi-adrv9002-rx-lpc") self._rxadc2 = self._ctx.find_device("axi-adrv9002-rx2-lpc") self._rx2 = obs(self._ctx, self._rxadc2, self._rx2_channel_names) setattr(adrv9002, "rx1", rx1) setattr(adrv9002, "rx2", rx2) remap(self._rx2, "rx_", "rx2_", type(self)) else: self._rx_dma_mode = "combined" self._rx_channel_names = [ "voltage0_i", "voltage0_q", "voltage1_i", "voltage1_q", ] self._rxadc = self._ctx.find_device("axi-adrv9002-rx-lpc") if len(txdevs) > 1: self._tx_dma_mode = "split" self._txdac = self._ctx.find_device("axi-adrv9002-tx-lpc") self._txdac2 = self._ctx.find_device("axi-adrv9002-tx2-lpc") self._tx2 = tx_two(self._ctx, self._txdac2, self._tx2_channel_names) setattr(adrv9002, "tx1", tx1) setattr(adrv9002, "tx2", tx2) remap(self._tx2, "tx_", "tx2_", type(self)) remap(self._tx2, "dds_", "dds2_", type(self)) else: self._tx_dma_mode = "combined" self._tx_channel_names = [ "voltage0", "voltage1", "voltage2", "voltage3" ] self._txdac = self._ctx.find_device("axi-adrv9002-tx-lpc") self._ctrl = self._ctx.find_device("adrv9002-phy") self._ctx.set_timeout(30000) # Needed for loading profiles rx_tx.__init__(self)
def __init__(self, uri="", phy_dev_name=""): context_manager.__init__(self, uri, self._device_name) if not phy_dev_name: # Get ad9081 dev name with most channel attributes channel_attr_count = { dev.name: sum(len(chan.attrs) for chan in dev.channels) for dev in self._ctx.devices if "ad9081" in dev.name } phy_dev_name = max(channel_attr_count, key=channel_attr_count.get) self._ctrl = self._ctx.find_device(phy_dev_name) if not self._ctrl: raise Exception( "phy_dev_name not found with name: {}".format(phy_dev_name)) # Find device with buffers self._txdac = _find_dev_with_buffers(self._ctx, True, "axi-ad9081") self._rxadc = _find_dev_with_buffers(self._ctx, False, "axi-ad9081") # Get DDC and DUC mappings # Labels span all devices so they must all be processed paths = {} self._default_ctrl_names = [] for dev in self._ctx.devices: if "ad9081" not in dev.name: continue for ch in dev.channels: not_buffer = False if "label" in ch.attrs: paths, not_buffer = _map_to_dict(paths, ch, dev.name) if not_buffer and dev.name not in self._default_ctrl_names: self._default_ctrl_names.append(dev.name) self._default_ctrl_names = sorted(self._default_ctrl_names) self._ctrls = [ self._ctx.find_device(dn) for dn in self._default_ctrl_names ] self._path_map = paths # Get data + DDS channels for ch in self._rxadc.channels: if ch.scan_element and not ch.output: self._rx_channel_names.append(ch._id) for ch in self._txdac.channels: if ch.scan_element: self._tx_channel_names.append(ch._id) else: self._dds_channel_names.append(ch._id) # Sort channel names self._rx_channel_names = _sortconv(self._rx_channel_names) self._tx_channel_names = _sortconv(self._tx_channel_names) self._dds_channel_names = _sortconv(self._dds_channel_names, dds=True) # Map unique attributes to channel properties self._map_unique(paths) # Bring up DMA and DDS interfaces rx_tx.__init__(self) self.rx_buffer_size = 2**16