Post Go back to editing

ADRV-DPD1/PCBZ Board DPD Python Script

I have been using AD9375 with the Iron-python DPD  scripts for Mykonos DPD so far.  (given in this link https://ez.analog.com/wide-band-rf-transceivers/tes-gui-and-api-software-ad9371-ad9375/m/file-uploads/387

Now,  I needed to change my platform as ADRV-DPD1/PCBZ Board and  I know that it does not compatible with the Mykonos DPD API.   I successfully used the GUI named "Small Cell Evaluation Software" for the DPD operations. 

 However,  I want to use the DPD with iron-python scripts, so can you provide me DPD scripts for the ADRV-DPD1/PCBZ  platform like the link above ? 

  • Thank you, I have checked the pdf, after some struggle, managed to make DPD work.  Here is the piece of DPD iron-python code that works for me in  the ADRV-DPD1-PCBZ platform.

    ########################
    #ADI Demo Python Script
    
    import System
    from System import Array
    from System import Int16
    from System import UInt32
    from System import Byte
    from System import SByte
    import time
    import clr
    clr.AddReferenceToFileAndPath("C:\\Program Files (x86)\\Analog Devices\\Small Cell Evaluation Software\\AdiCmdServerClient.dll")
    #clr.AddReferenceToFileAndPath("C:\\Program Files (x86)\\Analog Devices\\Small Cell Evaluation Software\\AdiCmdServerClient.dll")
    
    from AdiCmdServerClient import AdiCommandServerClient
    from AdiCmdServerClient import Enums
    from AdiCmdServerClient import MykDpdConfig
    from AdiCmdServerClient import MykClgcConfig
    from AdiCmdServerClient import MykVswrConfig
    from AdiCmdServerClient import TddFsmParameters_us
    from AdiCmdServerClient import MykonosProfileData
    from AdiCmdServerClient.AD9528 import AD9528Settings
    
    #Create an Instance of the Class
    Link = AdiCommandServerClient.Instance
    Mykonos = AdiCommandServerClient.Instance.Mykonos
    FpgaMykonos = AdiCommandServerClient.Instance.FpgaMykonos
    
    #Connect to the Zynq Platform
    #Connect to the Zynq Platform
    if(Link.hw.Connected == 1):
        Connect = 1
    else:
    	Connect = 0
    	Link.hw.Connect("17.172.20.11", 55555)
    
    ############################################################
    #                         initDPD                          #
    ############################################################
    mykDpdConfig = MykDpdConfig()
    mykDpdConfig.Damping = 5
    mykDpdConfig.NumWeights = 1
    mykDpdConfig.ModelVersion = 0
    mykDpdConfig.HighPowerModelUpdate = 1
    mykDpdConfig.ModelPriorWeight = 20
    mykDpdConfig.RobustModeling = 0
    mykDpdConfig.Samples = 512
    mykDpdConfig.OutlierThreshold = 4096
    mykDpdConfig.AdditionalDelayOffset = 0
    mykDpdConfig.PathDelayPnSeqLevel = 255
    mykDpdConfig.WeightsReal = Array[SByte]([64, 0, 0])
    mykDpdConfig.WeightsImag = Array[SByte]([0, 0, 0])
    Link.Mykonos.init_dpdConfigStruct(1, mykDpdConfig)
    Link.Mykonos.init_enableDpd(1, 1)
    mykClgcConfig = MykClgcConfig()
    mykClgcConfig.Tx1DesiredGain = -2000
    mykClgcConfig.Tx2DesiredGain = -2000
    mykClgcConfig.Tx1AttenLimit = 0
    mykClgcConfig.Tx2AttenLimit = 0
    mykClgcConfig.Tx1ControlRatio = 75
    mykClgcConfig.Tx2ControlRatio = 75
    mykClgcConfig.AllowTx1AttenUpdates = 0
    mykClgcConfig.AllowTx2AttenUpdates = 0
    mykClgcConfig.AdditionalDelayOffset = 0
    mykClgcConfig.PathDelayPnSeqLevel = 255
    mykClgcConfig.Tx1RelThreshold = 600
    mykClgcConfig.Tx2RelThreshold = 600
    mykClgcConfig.Tx1RelThresholdEn = 0
    mykClgcConfig.Tx2RelThresholdEn = 0
    Link.Mykonos.init_clgcConfigStruct(1, mykClgcConfig)
    mykVswrConfig = MykVswrConfig()
    mykVswrConfig.AdditionalDelayOffset = 0
    mykVswrConfig.PathDelayPnSeqLevel = 255
    mykVswrConfig.Tx1VswrSwitchGpio3p3Pin = 0
    mykVswrConfig.Tx2VswrSwitchGpio3p3Pin = 1
    mykVswrConfig.Tx1VswrSwitchPolarity = 0
    mykVswrConfig.Tx2VswrSwitchPolarity = 0
    mykVswrConfig.Tx1VswrSwitchDelay_us = 50
    mykVswrConfig.Tx2VswrSwitchDelay_us = 50
    Link.Mykonos.init_vswrConfigStruct(1, mykVswrConfig)
    
    Link.Mykonos.setGpio3v3PinLevel(63)
    
    
    #                        ConfigDPD                         #
    ############################################################
    Link.Mykonos.radioOff()
    Link.Mykonos.configDpd()
    Link.Mykonos.configClgc()
    Link.Mykonos.configVswr()
    Link.Mykonos.radioOff()
    
    calMask = 0
    calMask |= (int(Mykonos.CALMASK.DPD_INIT))
    
    """
    calMask = 0
    calMask |= (int(Link.Mykonos.CALMASK.TX_BB_FILTER))
    calMask |= (int(Link.Mykonos.CALMASK.ADC_TUNER))
    calMask |= (int(Link.Mykonos.CALMASK.TIA_3DB_CORNER))
    calMask |= (int(Link.Mykonos.CALMASK.DC_OFFSET))
    calMask |= (int(Link.Mykonos.CALMASK.TX_ATTENUATION_DELAY))
    calMask |= (int(Link.Mykonos.CALMASK.RX_GAIN_DELAY))
    calMask |= (int(Link.Mykonos.CALMASK.FLASH_CAL))
    calMask |= (int(Link.Mykonos.CALMASK.PATH_DELAY))
    calMask |= (int(Link.Mykonos.CALMASK.LOOPBACK_RX_LO_DELAY))
    calMask |= (int(Link.Mykonos.CALMASK.LOOPBACK_RX_RX_QEC_INIT))
    calMask |= (int(Link.Mykonos.CALMASK.TX_LO_LEAKAGE_INTERNAL))
    calMask |= (int(Link.Mykonos.CALMASK.TX_QEC_INIT))
    calMask |= (int(Link.Mykonos.CALMASK.RX_LO_DELAY))
    calMask |= (int(Link.Mykonos.CALMASK.RX_QEC_INIT))
    """
    #calMask = 0x7DFF
    #Link.hw.ReceiveTimeout =0
    Link.Mykonos.abortInitCals(1000, 0)
    Link.Mykonos.runInitCals(calMask)
    #Link.hw.ReceiveTimeout =0
    Link.Mykonos.waitInitCals(60000, 0, 0)
    Link.Mykonos.readArmCmdStatus(0, 0)
    Link.Mykonos.readArmCmdStatByte(2, 0)
    Link.hw.ReceiveTimeout =5000
    
    ############################################################
    #                    EnableTrackingCals                    #
    ############################################################
    
    calMask = (int(Link.Mykonos.TRACKING_CALMASK.NO_CALS_ENABLED))
    calMask |= (int(Link.Mykonos.TRACKING_CALMASK.ORX1_QEC))
    calMask |= (int(Link.Mykonos.TRACKING_CALMASK.ORX2_QEC))
    
    #CalMask = 0xC
    
    
    calTrackingMask= Link.Mykonos.getEnabledTrackingCals(1)
    calTrackingMask = (int(Link.Mykonos.TRACKING_CALMASK.NO_CALS_ENABLED))
    calTrackingMask |= (int(Link.Mykonos.TRACKING_CALMASK.ORX1_QEC))
    calTrackingMask |= (int(Link.Mykonos.TRACKING_CALMASK.ORX2_QEC))
    calTrackingMask |= (int(Mykonos.TRACKING_CALMASK.TX1_DPD))
    #print calTrackingMask
    Link.hw.ReceiveTimeout =0
    Link.Mykonos.enableTrackingCals(calTrackingMask)
    Link.Mykonos.radioOn()
    Link.Mykonos.setObsRxPathSource(Mykonos.OBSRXCHANNEL.OBS_RXOFF)
    Link.Mykonos.setObsRxPathSource(Mykonos.OBSRXCHANNEL.OBS_INTERNALCALS)
    
    
    #Link.Mykonos.setGpio3v3PinLevel(63)
    
    
    #Read the Version
    print Link.version()
    #Disconnect from the Zynq Platform
    if(Connect == 0):
        Link.hw.Disconnect()
     

  • Hi , ,

    Do you have sequence to run dpd follow step by step in C. i don't understand about python. I want to use API in C language.

    Thank

  • Please refer to UG-992 section "DPD API" for more details.

    We don't have any sample "C" code.