Post Go back to editing

Matlab script for running ADRV9009 on ZC706

Thread Summary

The user encountered an 'Unable to resolve the name' error when running a MATLAB script generated with ADRV9009 TES, specifically at the 'ClearAllRst' function. The final answer requested confirmation on the board being used (ADRV9009 and ZC706), whether the setup works with TES GUI, and suggested trying a Python script. The user later reported finding a solution independently.
AI Generated Content
Category: Software
Product Number: AdRV9009 + ZC706, AdRV9009

Hi there,

I've generated a matlab script using ADRV9009 TES but it doesn't seem to work. The error Unable to resolve the name 'AdiCmdServerClient.FpgaResets.ClearAllRst'. occurs at line 26 (more errors after that). I've looked through the forum and found many people encountered similar problem but I still haven't found a proper solution. Could you help me solve the problem? The first few lines ran okay and I could connect to the FPGA. The dll file was loaded correctly.

Also could you confirm that the TES software still not work with ZCU102 FPGA carrier? The following is the Matlab script generated using the TES.

%Make DLL visible to matlab
NET.addAssembly('C:\Program Files (x86)\Analog Devices\ADRV9009 Transceiver Evaluation Software\AdiCmdServerClient.dll');
Link = AdiCmdServerClient.AdiCommandServerClient.Instance;
status = Link.hw.Connect('192.168.0.99', 55555);
if status == 1
fprintf('Connected to Zync\n');
else
fprintf('Unable to connect to Zync platform\n');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % GUI Version: 3.6.2.1 DLL Version: 3.6.2.1 FPGA Version: 4E00021A ArmVersion: 6.2.1 Build type = TAL_ARM_BUILD_RELEASE StreamVersion: 2.17
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.FpgaTalise.StopTxData();
Link.Ad9528.InitDeviceDataStructure(122880000, 30720000, 122880000);
Link.Ad9528.ResetDevice();
Link.Ad9528.Initialize();
pause(0.5);
arePllsLocked = Link.Ad9528.WaitForPllLock();
fprintf('Ad9528 arePllsLocked = %d\n', arePllsLocked);
Link.Ad9528.EnableClockOutputs(hex2dec('300A'));
Link.SetSpiChannel(1);
Link.FpgaTalise.ResetFpgaRegisters();
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Init Structures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.Talise.InitClearProfiles();
Link.Talise.InitClocks(1, 122880, 9830400, 2, AdiCmdServerClient.HsDiv.HsDiv2p5);
Link.Talise.InitRfPllUseExternalLo(1, 0);
Link.Talise.InitRxProfiles(1, 2, 4, 2, 122880, 60000000, 60000, [265, 146, 181, 90, 1280, 366, 1257, 27, 1258, 17, 718, 39, 48, 46, 27, 161, 0, 0, 0, 0, 40, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905],AdiCmdServerClient.RxDdcMode.RxDdcBypass);
Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.Rx, 'C:\Program Files (x86)\Analog Devices\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\RxPFIRApp209_BW60_ADC1966p08_OR122p88.ftr');
Link.Talise.InitRxSettings(1, AdiCmdServerClient.RxChannel.Rx1Rx2, AdiCmdServerClient.FramerSelect.FramerA);
Link.Talise.InitTxProfiles(1, 1, 1, 2, 2, 2, 1, 245760, 100000000, 225000000, 225000, 113000, [212, 140, 175, 90, 1280, 699, 1304, 59, 1343, 33, 913, 27, 48, 48, 34, 192, 0, 0, 0, 0, 48, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905]);
Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.Tx, 'C:\Program Files (x86)\Analog Devices\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\TxPFIRApp110_IR245p76_BW225_PriSigBW100.ftr');
Link.Talise.InitTxSettings(1, AdiCmdServerClient.TxAttenStepSize.TxAtten0P05DB, AdiCmdServerClient.TxChannel.Tx1Tx2, 30000, 30000, AdiCmdServerClient.DeframerSelect.DeframerA, AdiCmdServerClient.TxDataIfPllUnlock.TxRampedDownToZero);
Link.Talise.InitObsProfiles(1, 1, 4, 2, 245760, 200000000, 225000, [185, 141, 172, 90, 1280, 942, 1332, 90, 1368, 46, 1016, 19, 48, 48, 37, 208, 0, 0, 0, 0, 52, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905],[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],AdiCmdServerClient.OrxDdcMode.OrxDdcDisabled, [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]);
Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.ORx, 'C:\Program Files (x86)\Analog Devices\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\ORxPFIRApp307_BW200_ADC1966p08_OR245p76.ftr');
Link.Talise.InitObsRxSettings(1, AdiCmdServerClient.ObsRxChannel.ObsRx1, AdiCmdServerClient.ObsRxLoSource.RfPll, AdiCmdServerClient.FramerSelect.FramerB);
Link.Talise.InitRfPllEnablePhaseSync(1, AdiCmdServerClient.RfPllMcs.NoSync);
Link.Talise.InitRxNcoShiftCfg(1, 0, 0, 0, 0, 0, 0, 0, 0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Init Jesd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.Talise.InitJesd204bFramer(1, AdiCmdServerClient.FramerSelect.FramerA, 1, 0, 0, 4, 32, 8, 16, 1, 1, 2, 228, 31, 0, 0, 0, 1, 0, 0);
Link.Talise.InitJesd204bFramer(1, AdiCmdServerClient.FramerSelect.FramerB, 0, 0, 0, 2, 32, 4, 16, 1, 1, 1, 228, 31, 0, 1, 0, 1, 0, 0);
Link.FpgaTalise.SetupTxConvXbar(AdiCmdServerClient.FpgaFramerSelect.FramerA, hex2dec('E4'));
Link.FpgaTalise.SetupTxConvXbar(AdiCmdServerClient.FpgaFramerSelect.FramerB, hex2dec('E4'));
Link.GetPcbDescript();
Link.Talise.InitJesd204bDeframer(1, AdiCmdServerClient.DeframerSelect.DeframerA, 0, 0, 0, 4, 32, 1, 1, 3, 228, 17, 0, 0, 16, 1, 0, 0, 0, 0);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.TxJesdRst);
pause(0.5);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
Link.FpgaTalise.SetupJesd204(122880, 122880, 4, 2, 32, 1, 1, 16, 245760, 4, 3, 32, 1, 16, 245760, 2, 1, 32, 1, 1, 16, AdiCmdServerClient.FpgaFramerSelect.FramerA, AdiCmdServerClient.FpgaDeframerSelect.DeframerA, AdiCmdServerClient.FpgaDeframerSelect.DeframerB, false);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Program Talise
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.Talise.ResetDevice();
Link.Talise.Initialize();
Link.Talise.SetDacFullScale(AdiCmdServerClient.DacFullScale.DacFs0dB);
pllStatus = Link.Talise.GetPllsLockStatus();
fprintf('Talise pllStatus = %d\n', pllStatus);
Link.Talise.EnableMultichipSync(hex2dec('1'), hex2dec('0'));
Link.Ad9528.RequestSysref(1);
Link.Ad9528.RequestSysref(1);
Link.Ad9528.RequestSysref(1);
pause(0.1);
mcsStatus = Link.Talise.EnableMultichipSync(hex2dec('0'), hex2dec('0'));
fprintf('MCS Status = %d\n', mcsStatus);
Link.FpgaTalise.SetupJesd204bOversampler(AdiCmdServerClient.FpgaDeframerSelect.DeframerB, AdiCmdServerClient.FpgaSampleDecimation.DecimateBy1);
Link.SetLogLevel(0);
if pllStatus && 1
Link.Talise.InitArm();
Link.Talise.LoadStreamProcessor('C:\Users\BY\AppData\Local\Temp\TaliseStream.bin');
Link.Talise.LoadArm('C:\Program Files (x86)\Analog Devices\ADRV9009 Transceiver Evaluation Software\Resources\arm_firmware\TaliseTDDArmFirmware.bin');
isArmGood = Link.Talise.VerifyArmChecksum();
fprintf('isArmGood = %d\n', isArmGood);
if isArmGood && 1
fprintf('ARM Loaded Successfully\n');
else
fprintf('ARM File not loaded correctly\n');
end
else
fprintf('ARM File not loaded correctly\n');
end
Link.Talise.GetArmVersion();
Link.SetLogLevel(63);
Link.Talise.SetPllLoopFilter(AdiCmdServerClient.PllName.RfPll, 50, 3);
Link.Talise.SetRfPllFrequency(AdiCmdServerClient.PllName.RfPll, 2457600000);
pllStatus = Link.Talise.GetPllsLockStatus();
fprintf('Talise pllStatus = %d\n', pllStatus);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% InitCals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.Talise.AbortInitCals(0);
%initCalMask = 0
%initCalMask |= int(Link.Talise.CalMask.TxBaseBandFilter);
%initCalMask |= int(Link.Talise.CalMask.AdcTuner);
%initCalMask |= int(Link.Talise.CalMask.Tia3dBCorner);
%initCalMask |= int(Link.Talise.CalMask.DcOffset);
%initCalMask |= int(Link.Talise.CalMask.RxGainDelay);
%initCalMask |= int(Link.Talise.CalMask.FlashCal);
%initCalMask |= int(Link.Talise.CalMask.PathDelay);
%initCalMask |= int(Link.Talise.CalMask.TxLoLeakageInternal);
%initCalMask |= int(Link.Talise.CalMask.TxQecInit);
%initCalMask |= int(Link.Talise.CalMask.LoopbackRxLoDelay);
%initCalMask |= int(Link.Talise.CalMask.LoopbackRxRxQecInit);
%initCalMask |= int(Link.Talise.CalMask.RxQecInit);
%initCalMask |= int(Link.Talise.CalMask.ORxQecInit);
%initCalMask |= int(Link.Talise.CalMask.TxDac);
Link.Talise.RunInitCals(hex2dec('65DEF'));
Link.Talise.WaitInitCals(60000, 0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Framer/Deframer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.FpgaTalise.EnableJesd204bFramer(AdiCmdServerClient.FpgaFramerSelect.DisableAll);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.TxJesdRst);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
Link.FpgaTalise.EnableJesd204bFramer(AdiCmdServerClient.FpgaFramerSelect.FramerA);
Link.Talise.EnableDeframerLink(AdiCmdServerClient.DeframerSelect.DeframerA, 0);
Link.Talise.EnableDeframerLink(AdiCmdServerClient.DeframerSelect.DeframerA, 1);
Link.Talise.EnableSysrefToDeframer(AdiCmdServerClient.DeframerSelect.DeframerA, 1);
Link.FpgaTalise.EnableJesd204bDeframer(AdiCmdServerClient.FpgaDeframerSelect.DisableAll);
Link.Talise.EnableFramerTestData(AdiCmdServerClient.FramerSelect.FramerA, AdiCmdServerClient.FramerDataSource.FtdAdcData, AdiCmdServerClient.FramerInjectPoint.FtdFramerInput);
Link.Talise.EnableFramerTestData(AdiCmdServerClient.FramerSelect.FramerB, AdiCmdServerClient.FramerDataSource.FtdAdcData, AdiCmdServerClient.FramerInjectPoint.FtdFramerInput);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.RxJesdRst);
Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
Link.FpgaTalise.EnableJesd204bDeframer(AdiCmdServerClient.FpgaDeframerSelect.DeframerAandB);
Link.Talise.EnableFramerLink(AdiCmdServerClient.FramerSelect.FramerAandB, 0);
Link.Talise.EnableFramerLink(AdiCmdServerClient.FramerSelect.FramerAandB, 1);
Link.Talise.EnableSysrefToFramer(AdiCmdServerClient.FramerSelect.FramerAandB, 1);
Link.Ad9528.RequestSysref(1);
Link.Talise.ReadFramerStatus(AdiCmdServerClient.FramerSelect.FramerA);
Link.Talise.ReadFramerStatus(AdiCmdServerClient.FramerSelect.FramerB);
Link.Talise.ReadDeframerStatus(AdiCmdServerClient.DeframerSelect.DeframerA);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tracking Cals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pause(1);
%trackingCalMask = 0
Link.Talise.EnableTrackingCals(0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GainWithFloatingPoint or GainWithNoCompensation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Ensure Stream File has been set to receive Floating Point Data
rxDataFormatter = AdiCmdServerClient.TaliseRxDataFormat;
rxDataFormatter.FormatSelect = (AdiCmdServerClient.RxDataFormatModes.GainCompensationDisabled);
rxDataFormatter.FpNumExpBits = (AdiCmdServerClient.FpExponentModes.TwoExponentBits);
rxDataFormatter.FpRoundMode = (AdiCmdServerClient.FpRoundingModes.RoundToEven);
rxDataFormatter.FpRx1Atten = (AdiCmdServerClient.FpAttenSteps.FpAtten0dB);
rxDataFormatter.FpRx2Atten = (AdiCmdServerClient.FpAttenSteps.FpAtten0dB);
rxDataFormatter.FpHideLeadingOne = (1);
rxDataFormatter.IntEmbeddedBits = (AdiCmdServerClient.EmbeddedBits.Embed1SlicerBitAtLsb);
rxDataFormatter.IntSampleResolution = (rxDataFormatter.IntSampleRes.Integer12Bit2sComp);
Link.Talise.SetRxDataFormat(rxDataFormatter);
%Link.Talise.SetRxDataFormat(TaliseRxDataFormat.0,0,0,0,0,1,0,0,2,0,0,3,3,0,0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set Gain & Attenuation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Link.Talise.SetRxManualGain(AdiCmdServerClient.RxChannel.Rx1, 255);
Link.Talise.SetRxManualGain(AdiCmdServerClient.RxChannel.Rx2, 255);
Link.Talise.SetObsRxManualGain(AdiCmdServerClient.ObsRxChannel.ObsRx1, 255);
Link.Talise.SetObsRxManualGain(AdiCmdServerClient.ObsRxChannel.ObsRx2, 255);
Link.Talise.SetTxAttenuation(AdiCmdServerClient.TxChannel.Tx1, 30);
Link.Talise.SetTxAttenuation(AdiCmdServerClient.TxChannel.Tx2, 30);
Link.hw.Disconnect();
Best wishes,
Kelly

Thread Notes