Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
        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("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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
    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)