Tool/software:
Will this script support for dynamic NCOs switching in LATTE V2p6?
We are getting the following warnings in LATTE:
Max value allowed for numRxNCOB0/1 is 2. So forcing this value to 2. If 2 NCOs are needed, this parameter can be set to 2 and call function updateRxNcoMultiNcoMode after bringup.
Max value allowed for numRxNCOB0/1 is 2. So forcing this value to 2. If 2 NCOs are needed, this parameter can be set to 2 and call function updateRxNcoMultiNcoMode after bringup.
Max value allowed for numRxNCOB0/1 is 2. So forcing this value to 2. If 2 NCOs are needed, this parameter can be set to 2 and call function updateRxNcoMultiNcoMode after bringup.
Max value allowed for numRxNCOB0/1 is 2. So forcing this value to 2. If 2 NCOs are needed, this parameter can be set to 2 and call function updateRxNcoMultiNcoMode after bringup.
Scripts:
############## Digital Chain ##############
sysParams.ncoFreqMode = "FCW"
sysParams.numRxNCO = 3
sysParams.broadcastRxNcoSel = 0
sysParams.numFbNCO = 2
sysParams.ncoRxMode = [5,5]
sysParams.ncofbMode = [2,2]
##### RX #####
sysParams.ddcFactorRx = [8,8,8,8] #DDC decimation factor for RX A, B, C and D
sysParams.rxNco0 = [[614.4,614.4], #Band0, Band1 for RXA
[614.4,614.4], #Band0, Band1 for RXB
[614.4,614.4], #Band0, Band1 for RXC
[614.4,614.4]] #Band0, Band1 for RXD
sysParams.rxNco1 = [[614.4,614.4], #Band0, Band1 for RXA
[614.4,614.4], #Band0, Band1 for RXB
[614.4,614.4], #Band0, Band1 for RXC
[614.4,614.4]] #Band0, Band1 for RXD
sysParams.rxNco2 = [[614.4,614.4], #Band0, Band1 for RXA
[614.4,614.4], #Band0, Band1 for RXB
[614.4,614.4], #Band0, Band1 for RXC
[614.4,614.4]] #Band0, Band1 for RXD
sysParams.rxNco3 = [[614.4,614.4], #Band0, Band1 for RXA
[614.4,614.4], #Band0, Band1 for RXB
[614.4,614.4], #Band0, Band1 for RXC
[614.4,614.4]] #Band0, Band1 for RXD
sysParams.fbNco0 = [614.4,614.4]
sysParams.fbNco1 = [614.4,614.4]
sysParams.fbNco2 = [614.4,614.4]
sysParams.fbNco3 = [614.4,614.4]
Kindly refer to this updated paramters:
############## Digital Chain ##############
sysParams.ncoFreqMode = "FCW"
sysParams.numRxNCO = 4
sysParams.broadcastRxNcoSel = 0
sysParams.numFbNCO = 4
sysParams.ncoRxMode = [5,5]
sysParams.ncofbMode = [2,2]
Hi Ramanathan,
The numRxNCO parameters should be set to '2' to use multiple NCOs. For dynamic nco changing I recommend following our 'AFE79xx_16_RX_NCOs.pdf' document, which is available in the AFE79xx OneRelease folder which can be accessed using the link below.
https://www.ti.com/secureresources/
Regards,
David Chaparro
Hi David,
Thank you for your response. I have previously provided my scripts, which indicate that the parameter is already configured. According to the datasheet, it should support the switching of 16 NCO frequencies. Therefore, why must the numRxNCO parameter be set to '2' if I intend to utilize "4"?
Kindly help us with this issue.
Regards,
Ramanathan D
Hi Ramanathan,
When setting this parameter to '2' you are enabling the use of all 16 NCOs, as shown in the 'AFE79xx_16_RX_NCOs.pdf' document. Also, as you have seen from the Latte log 'Max value allowed for numRxNCOB0/1 is 2'.
Regards,
David Chaparro
Hi David,
I appreciate your prompt reply.
According to your Application Report: SBAA417–June 2020 (AFE79xx Configuration Guide), it states "Device supports up to 16 but current version of Latte software supports only maximum of 2. Note that when numRxNCO is more than 2, the NCOs should be used in FCW mode and 1KHz mode is not supported". I have attached an image for your reference.
Kindly provide us with the necessary scripts from your end. We are currently using the latest version of LATTE, which is V2p6.
Regards,
Ramanathan D
Hi Ramanathan,
The configuration guide is correct that the numRxNco parameter can only support up to 2 NCOs, which is why we mention to set the parameter to a value of '2'. To use the other NCOs you can use the updated parameters listed in both the 'AFE79xx_16_RX_NCOs.pdf' and 'AFE79xx_16_TX_NCOs.pdf' documents. These documents also have the instructions on how to switch between the NCOs.
Have you had a chance to try the steps outlined these documents?
Regards,
David Chaparro
Hi David,
According to the 'AFE79xx_16_TX_NCOs.pdf' document, the required parameters have been modified and the scripts have been revised. Following these adjustments, the NCO switching is not occurring and remains fixed at 614.4 MHz. I have highlighted certain parameters for your review. Please inform us if any further modifications are necessary.
Best Regards,
Ramanathan D
Hi David,
According to the 'AFE79xx_16_TX_NCOs.pdf' document, the required parameters have been modified and the scripts have been revised. Following these adjustments, the NCO switching is not occurring and remains fixed at 614.4 MHz. I have highlighted certain parameters for your review. Please inform us if any further modifications are necessary.
Best Regards,
Ramanathan D
Hi Ramanathan,
In your script I see that you are updating the NCO frequencies correctly, but I do not see any switching of the NCOs happening in your script. Are you doing this in another script?
Please note that as mentioned in section 3 "Switching NCOs" of the 'AFE79xx_16_TX_NCOs.pdf' document the RX_CHOSEL_x inputs are used to switch between the NCOs.
You can use the AFE.IOWRAP.overrideFunction('RX_NCOSEL_x', override_enable, override_value) function to override the GPIO inputs to a certain value.
The below script is an example of how this can be done. To switch to NCO 1 you can use 'AFE.IOWRAP.overrideFunction('RX_NCOSEL_0',1,1)'.
############## Read me ############## #In HSDC Pro ADC tab, Select AFE79xx_6RX_24410; Data Rate = 245.76M ---> To capture 4 RX and 2 FB channels sysParams=AFE.systemParams sysParams.__init__();sysParams.chipVersion=chipVersion setupParams.skipFpga = 0 # setup FPGA (TSW14J56) using HSDC Pro ############## Top Level ############## sysParams.FRef = 307.2 sysParams.FadcRx = 2457.6 sysParams.FadcFb = 2457.6 sysParams.Fdac = 2457.6*3 sysParams.externalClockRx=False sysParams.externalClockTx=False ############## Digital Chain ############## ##### RX ##### sysParams.ddcFactorRx = [8,8,8,8] #DDC decimation factor for RX A, B, C and D sysParams.rxNco0 = [[614.4,5400], #Band0, Band1 for RXA [614.4,500], #Band0, Band1 for RXB [614.4,2500], #Band0, Band1 for RXC [614.4,1800]] #Band0, Band1 for RXD ##### FB ##### sysParams.ddcFactorFb = [8,8] #DDC decimation factor for FB 1 and 2 sysParams.fbNco0 = [614.4,1800] #Band0 for FB1 and FB2 ##### TX ##### sysParams.txEnable = [False,False,False,False] sysParams.ducFactorTx = [24,24,24,24] #DDC decimation factor for TX A, B, C and D sysParams.txNco0 = [[5400,5400], #Band0, Band1 for TXA [500,500], #Band0, Band1 for TXB [2500,2500], #Band0, Band1 for TXC [1800,1800]] #Band0, Band1 for TXD ############## JESD ############## ##### ADC-JESD ##### sysParams.jesdSystemMode= [1,1] #SystemMode 0: 2R1F-FDD ; rx1-rx2-fb -fb #SystemMode 1: 1R1F-FDD ; rx -rx -fb -fb #SystemMode 2: 2R-FDD ; rx1-rx1-rx2-rx2 #SystemMode 3: 1R ; rx -rx -rx -rx #SystemMode 4: 1F ; fb -fb- fb -fb #SystemMode 5: 1R1F-TDD ; rx/fb-rx/fb-rx/fb-rx/fb sysParams.jesdTxProtocol= [0,0] # 0 - 8b/10b encoding; 2 - 64b/66b encoding sysParams.LMFSHdRx = ["24410","24410","24410","24410"] # The 2nd and 4th are valid only for jesdSystemMode values in (0,2). # For other modes, select 4 converter modes for 1st and 3rd. sysParams.LMFSHdFb = ["12410","12410"] sysParams.rxJesdTxScr = [True,True,True,True] sysParams.fbJesdTxScr = [True,True] sysParams.rxJesdTxK = [16,16,16,16] sysParams.fbJesdTxK = [16,16] sysParams.jesdTxLaneMux = [0,1,2,3,4,5,6,7] # Enter which lanes you want in each location. # For example, if you want to exchange the first two lines of each 2T, # this should be [[1,0,2,3],[5,4,6,7]] ##### DAC-JESD ##### sysParams.jesdRxProtocol= [0,0] sysParams.LMFSHdTx = ["44210","44210","44210","44210"] sysParams.jesdRxLaneMux = [0,1,2,3,4,5,6,7] # Enter which lanes you want in each location. # For example, if you want to exchange the first two lines of each 2R # this should be [[1,0,2,3],[5,4,6,7]] sysParams.jesdRxRbd = [4, 4] sysParams.jesdRxScr = [True,True,True,True] sysParams.jesdRxK = [16,16,16,16] ##### JESD Common ##### sysParams.jesdABLvdsSync= True sysParams.jesdCDLvdsSync= True sysParams.syncLoopBack = False #JESD Sync signal is connected to FPGA ############## GPIO ############## sysParams.gpioMapping = { 'H8': 'ADC_SYNC0', 'H7': 'ADC_SYNC1', 'N8': 'ADC_SYNC2', 'N7': 'ADC_SYNC3', 'H9': 'DAC_SYNC0', 'G9': 'DAC_SYNC1', 'N9': 'DAC_SYNC2', 'P9': 'DAC_SYNC3', 'P14': 'GLOBAL_PDN', 'K14': 'FBABTDD', 'R6': 'FBCDTDD', 'H15': ['TXATDD','TXBTDD'], 'V5': ['TXCTDD','TXDTDD'], 'E7': ['RXATDD','RXBTDD'], 'R15': ['RXCTDD','RXDTDD'], 'G6': 'RX_NCOSEL_0', 'G7': 'RX_NCOSEL_1', 'G8': 'RX_NCOSEL_2', 'R5': 'RX_NCOSEL_3'} ############## LMK Params ############## lmkParams.pllEn = False lmkParams.inputClk = 614.4 # Valid only when lmkParams.pllEn = False lmkParams.lmkFrefClk = True setupParams.fpgaRefClk = 307.2 # Should be equal to LaneRate/40 for TSW14J56 ############## Logging ############## logDumpInst.setFileName(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1.txt") logDumpInst.logFormat=0x0 #Modify to 0x1 to save register scequence to log file. Script takes more time to execute. logDumpInst.rewriteFile=1 logDumpInst.rewriteFileFormat4=1 device.optimizeWrites=0 device.rawWriteLogEn=1 device.delay_time = 0 ############## 16 NCO Params ############## sysParams.ncoFreqMode = "FCW" sysParams.ncoRxMode = [6,6] sysParams.broadcastRxNcoSel = 1 sysParams.numRxNCO = 2 #-------------------------------------------------------------------------------------------------# AFE.deviceBringup() AFE.TOP.overrideTdd(15,3,0) # bit-wise; 4R,2F,4T ############## Update NCOs ############## freqList= [614.4,1843.2,921.6,1228.8] for i in range(4): for j in range(4): AFE.updateRxNcoMultiNcoMode(j,freqList[i],i) AFE.updateTxNcoMultiNcoMode(j,freqList[i],i) ############## Switch NCOs ############## AFE.IOWRAP.overrideFunction('RX_NCOSEL_0',1,1) AFE.IOWRAP.overrideFunction('RX_NCOSEL_1',1,1) # AFE.IOWRAP.overrideFunction('RX_NCOSEL_2',0,0) # AFE.IOWRAP.overrideFunction('RX_NCOSEL_3',0,0)
Regards,
David Chaparro