This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE7920EVM: AFE7920EVM repeater setup error

Part Number: AFE7920EVM
Other Parts Discussed in Thread: AFE7920, AFE7950, AFE7900

Hi Team,

I've recently encountered a strange error when trying to run my Latte script (see below).

I am running the repeater configuration with pll in distribution mode.

I am providing external clock reference of f0=163.68 MHz to the AFE7920EVM board, the ADC sampling rate is 1964.16 MHz (12 x f0) with down-conversion factor Nddc =6 (data rate of 327.36 MHz (or Mb/s)). The DAC sampling rate is 11784.96 MHz (72 x f0) with up-conversion factor Nduc=36 (Fdac = 6xFadc). I am targeting a system where the line rate is equal to the 6547.2 Mb/s (very strict restriction imposed by the FPGA board I am using, based on Xilinx Kintex 7 series). When I run the attached script, I get the following error:

which revolves around a number 8847.36.

Could you perhaps provide some insights on this error, and if my desired mode of operation can be supported by the AFE7920EVM?

Kind regards,

Zeljko

##########                     General settings:                     ##########

# VLBI Tx frequency plan details:
custom_clk 							= 2

ncoFreqModes 						= ["1KHz", "FCW"]
Fnco_tx1 							= 2245.0
Fnco_rx1							= 500.0
f0 								    = 163.68
Nrx								    = 12
Nddc							    = 6
Ntx 						    	= 6
NFRef							    = 1
NfpgaRefClk						    = 1
NinputClk						    = 1
LMFSHdRx              			    = ['44210', '44210', '44210', '44210']
LMFSHdFb						    = ['22210', '22210']
LMFSHdTx						    = ['44210', '44210', '44210', '44210']
syncLoopBack 					    = 1
Nduc								= Nddc*Ntx

# AFE general settings
AFE.systemStatus.loadTrims			= 1
setupParams.skipFpga 				= 1
setupParams.fpgaRefClk 				= f0*NfpgaRefClk
sysParams							= AFE.systemParams
sysParams.FRef 						= f0*NFRef

##########               Analog settings: AFE 79XX EVM               ##########

# General system settings	
sysParams.RRFMode   				= 0
sysParams.modeTdd					= 0
sysParams.adcSelect0				= [0, 1, 2]
sysParams.adcSelect1				= [0, 1, 2]
sysParams.useSpiSysref				= 0
sysParams.sysrefTermination			= 0
sysParams.ncoFreqMode				= ncoFreqModes[custom_clk != 0]
sysParams.spiMode					= 1

# ADC settings
sysParams.FadcRx 					= f0*Nrx
sysParams.rxEnable 					= [1, 1, 1, 1]
sysParams.externalClockRx 			= 0
sysParams.halfRateModeRx 			= [0, 0]
sysParams.ddcFactorRx 				= [Nddc, Nddc, Nddc, Nddc]
sysParams.numBandsRx 				= [0, 0, 0, 0]
sysParams.numRxNCO 					= 1
sysParams.ncoRxMode					= [0, 0]
sysParams.broadcastRxNcoSel			= 0
sysParams.rxNco0 					= [ [Fnco_rx1, Fnco_rx1], 
										[870.0, 870.0], 
										[637.5, 637.5], 
										[637.5, 637.5]]
sysParams.rxNco1 					= [ [Fnco_rx1, Fnco_rx1], 
										[870.0, 870.0], 
										[637.5, 637.5], 
										[637.5, 637.5]]

# FB settings
sysParams.FadcFb					= sysParams.FadcRx
sysParams.fbEnable 					= [0, 0]
sysParams.halfRateModeFb 			= [0, 0]
sysParams.ddcFactorFb 				= [Nddc, Nddc]
sysParams.numBandsFb				= [0, 0]
sysParams.numFbNCO 					= 1
sysParams.ncoFbMode					= 0
sysParams.fbNco0 					= [1000, 1000]
sysParams.fbNco1 					= [1000, 1000]
sysParams.fbNco2 					= [1000, 1000]
sysParams.fbNco3 					= [1000, 1000]

# DAC settings
sysParams.Fdac 						= sysParams.FadcRx*Ntx
sysParams.txEnable 					= [1, 1, 1, 1]
sysParams.externalClockTx			= 0
sysParams.halfRateModeTx 			= [0, 0]
sysParams.ducFactorTx 				= [Nduc, Nduc, Nduc, Nduc]
sysParams.numBandsTx 				= [0, 0, 0, 0]
sysParams.numTxNCO 					= 1
sysParams.combineDucMode 			= [0, 0]
sysParams.enableDacInterleavedMode 	= 0
sysParams.ncoTxMode					= [0, 0]
sysParams.broadcastTxNcoSel			= 0
sysParams.txNco0	 				= [ [Fnco_tx1, Fnco_tx1],
										[5020.0, 5020.0], 
										[8212.5, 8212.5], 
										[6812.5, 6812.5]]
sysParams.txNco1 					= [ [Fnco_tx1, Fnco_tx1],
										[5020.0, 5020.0], 
										[8212.5, 8212.5], 
										[6812.5, 6812.5]]
										
##########              Clock distribution mode setting              ##########

lmkParams.pllEn 					= (custom_clk == 0)
lmkParams.inputClk 					= f0*NinputClk
lmkParams.sysrefFreq				= f0*Nrx/1024
lmkParams.lmkFrefClk				= 1

##########               JESD204 settings AFE 79XX EVM               ##########

sysParams.topLevelSystemMode		= 'StaticTDDMode'
sysParams.jesdSystemMode			= [3, 3]
sysParams.serdesFirmware			= 1
#sysParams.jesdABLvdsSync			= 1
#sysParams.jesdCDLvdsSync			= 1
#sysParams.syncLoopBack				= syncLoopBack
sysParams.jesdLoopbackEn			= 1
#sysParams.setIlaParams				= 0
#sysParams.jesdTxIlaM				= [8, 8, 2, 8, 8, 2]
#sysParams.jesdTxIlaLid				= [0, 1, 2, 3, 4, 5, 6, 7]
#sysParams.jesdTxIlaL				= [4, 4, 2, 4, 4, 2]
	
	
sysParams.LMFSHdRx					= LMFSHdRx
sysParams.jesdRxProtocol			= [0, 0]
sysParams.jesdRxLaneMux				= [0, 1, 2, 3, 4, 5, 6, 7]
sysParams.jesdRxRbd					= [4, 4]
sysParams.rxJesdTxScr				= [1, 1, 1, 1]
sysParams.rxJesdTxK					= [16, 16, 16, 16]
#sysParams.rxJesdTxSyncMux			= [0, 0, 0, 0]
#sysParams.rxDataMux					= [0, 1, 2, 3, 4, 5, 6, 7]
#sysParams.serdesRxLanePolarity		= [0, 0, 0, 0, 0, 0, 0, 0]
#sysParams.adcDataMuxEn				= 0
	
	
sysParams.LMFSHdFb					= LMFSHdFb
sysParams.fbJesdTxScr				= [1, 1]
sysParams.fbJesdTxK					= [16, 16]
#sysParams.fbJesdTxSyncMux			= [0, 0]
#sysParams.fbDataMux					= [0, 1]
	
sysParams.LMFSHdTx					= LMFSHdTx
sysParams.jesdTxProtocol			= [0, 0]
sysParams.jesdTxLaneMux				= [0, 1, 2, 3, 4, 5, 6, 7]
#sysParams.jesdTxRbd					= [4, 4]
sysParams.jesdRxScr					= [1, 1, 1, 1]
sysParams.jesdRxK					= [16, 16, 16, 16]
#sysParams.jesdRxSyncMux				= [0, 0, 0, 0]
#sysParams.txDataMux					= [0, 1, 2, 3, 4, 5, 6, 7]
#sysParams.serdesTxLanePolarity		= [0, 0, 0, 0, 0, 0, 0, 0]
#sysParams.dacDataMuxEn				= 0
#sysParams.serdesTxPreCursor			= [6, 6, 6, 6, 6, 6, 6, 6]
#sysParams.serdesTxPostCursor		= [0, 0, 0, 0, 0, 0, 0, 0]
#sysParams.serdesTxMainCursor		= [3, 0, 0, 0, 0, 0, 0, 3]


##########                         Dummy txt                         ##########

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']}

logDumpInst.setFileName(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1.txt")
logDumpInst.logFormat				= 0x01
logDumpInst.rewriteFile				= 1
logDumpInst.rewriteFileFormat4		= 1

device.optimizeWrites				= 0
device.rawWriteLogEn				= 1
device.delay_time                   = 0
							
AFE.deviceBringup()
AFE.TOP.overrideTdd(15,3,15)

  • Hi Zeljko,

    We have received your response. Due to the holidays, we will get back to you in a few days. 

    Thanks,

    Serkan

  • Hi Serkan,

    Thanks for the heads up. I was wondering if there is any update on this.

    Kind regards,

    Željko

  • Hi Zeljko,

    Our team is back from the holidays and we are working on testing this on our setup. 

    Regards,

    David Chaparro

  • Hi Zeljko,

    The issue that you are facing was caused by TX / FB Rate Combination. Please see Table 8-8, TX DAC / FB ADC Rate Combinations, to see the supported combination of sampling rates for TX and FB.

    Using the script below I was able to configure the AFE:

    ##########                     General settings:                     ##########
    
    # VLBI Tx frequency plan details:
    custom_clk 							= 2
    
    ncoFreqModes 						= ["1KHz", "FCW"]
    Fnco_tx1 							= 2245.0
    Fnco_rx1							= 500.0
    f0 								    = 163.68
    Nrx								    = 12
    Nddc							    = 6
    Ntx 						    	= 3
    NFRef							    = 1
    NfpgaRefClk						    = 1
    NinputClk						    = 1
    LMFSHdRx              			    = ['44210', '44210', '44210', '44210']
    LMFSHdFb						    = ['22210', '22210']
    LMFSHdTx						    = ['44210', '44210', '44210', '44210']
    syncLoopBack 					    = 0
    Nduc								= Nddc*Ntx
    
    # AFE general settings
    AFE.systemStatus.loadTrims			= 1
    setupParams.skipFpga 				= 1
    setupParams.fpgaRefClk 				= f0*NfpgaRefClk
    sysParams							= AFE.systemParams
    sysParams.FRef 						= f0*NFRef
    
    ##########               Analog settings: AFE 79XX EVM               ##########
    
    # General system settings	
    sysParams.RRFMode   				= 0
    sysParams.modeTdd					= 0
    sysParams.adcSelect0				= [0, 1, 2]
    sysParams.adcSelect1				= [0, 1, 2]
    sysParams.useSpiSysref				= 0
    sysParams.sysrefTermination			= 0
    sysParams.ncoFreqMode				= ncoFreqModes[custom_clk != 0]
    sysParams.spiMode					= 1
    
    # ADC settings
    sysParams.FadcRx 					= f0*Nrx
    sysParams.rxEnable 					= [1, 1, 1, 1]
    sysParams.externalClockRx 			= 0
    sysParams.halfRateModeRx 			= [0, 0]
    sysParams.ddcFactorRx 				= [Nddc, Nddc, Nddc, Nddc]
    sysParams.numBandsRx 				= [0, 0, 0, 0]
    sysParams.numRxNCO 					= 1
    sysParams.ncoRxMode					= [0, 0]
    sysParams.broadcastRxNcoSel			= 0
    sysParams.rxNco0 					= [ [Fnco_rx1, Fnco_rx1], 
    										[870.0, 870.0], 
    										[637.5, 637.5], 
    										[637.5, 637.5]]
    sysParams.rxNco1 					= [ [Fnco_rx1, Fnco_rx1], 
    										[870.0, 870.0], 
    										[637.5, 637.5], 
    										[637.5, 637.5]]
    
    # FB settings
    sysParams.FadcFb					= sysParams.FadcRx
    sysParams.fbEnable 					= [0, 0]
    sysParams.halfRateModeFb 			= [0, 0]
    sysParams.ddcFactorFb 				= [Nddc, Nddc]
    sysParams.numBandsFb				= [0, 0]
    sysParams.numFbNCO 					= 1
    sysParams.ncoFbMode					= 0
    sysParams.fbNco0 					= [1000, 1000]
    sysParams.fbNco1 					= [1000, 1000]
    sysParams.fbNco2 					= [1000, 1000]
    sysParams.fbNco3 					= [1000, 1000]
    
    # DAC settings
    sysParams.Fdac 						= sysParams.FadcRx*Ntx
    sysParams.txEnable 					= [1, 1, 1, 1]
    sysParams.externalClockTx			= 0
    sysParams.halfRateModeTx 			= [0, 0]
    sysParams.ducFactorTx 				= [Nduc, Nduc, Nduc, Nduc]
    sysParams.numBandsTx 				= [0, 0, 0, 0]
    sysParams.numTxNCO 					= 1
    sysParams.combineDucMode 			= [0, 0]
    sysParams.enableDacInterleavedMode 	= 0
    sysParams.ncoTxMode					= [0, 0]
    sysParams.broadcastTxNcoSel			= 0
    sysParams.txNco0	 				= [ [Fnco_tx1, Fnco_tx1],
    										[5020.0, 5020.0], 
    										[8212.5, 8212.5], 
    										[6812.5, 6812.5]]
    sysParams.txNco1 					= [ [Fnco_tx1, Fnco_tx1],
    										[5020.0, 5020.0], 
    										[8212.5, 8212.5], 
    										[6812.5, 6812.5]]
    										
    ##########              Clock distribution mode setting              ##########
    
    lmkParams.pllEn 					= (custom_clk == 0)
    lmkParams.inputClk 					= f0*NinputClk
    lmkParams.sysrefFreq				= f0*Nrx/1024
    lmkParams.lmkFrefClk				= 1
    
    ##########               JESD204 settings AFE 79XX EVM               ##########
    
    sysParams.topLevelSystemMode		= 'StaticTDDMode'
    sysParams.jesdSystemMode			= [3, 3]
    sysParams.serdesFirmware			= 1
    sysParams.jesdABLvdsSync			= 1
    sysParams.jesdCDLvdsSync			= 1
    sysParams.syncLoopBack				= syncLoopBack
    sysParams.jesdLoopbackEn			= 1
    #sysParams.setIlaParams				= 0
    #sysParams.jesdTxIlaM				= [8, 8, 2, 8, 8, 2]
    #sysParams.jesdTxIlaLid				= [0, 1, 2, 3, 4, 5, 6, 7]
    #sysParams.jesdTxIlaL				= [4, 4, 2, 4, 4, 2]
    	
    	
    sysParams.LMFSHdRx					= LMFSHdRx
    sysParams.jesdRxProtocol			= [0, 0]
    sysParams.jesdRxLaneMux				= [0, 1, 2, 3, 4, 5, 6, 7]
    sysParams.jesdRxRbd					= [4, 4]
    sysParams.rxJesdTxScr				= [1, 1, 1, 1]
    sysParams.rxJesdTxK					= [16, 16, 16, 16]
    #sysParams.rxJesdTxSyncMux			= [0, 0, 0, 0]
    #sysParams.rxDataMux					= [0, 1, 2, 3, 4, 5, 6, 7]
    #sysParams.serdesRxLanePolarity		= [0, 0, 0, 0, 0, 0, 0, 0]
    #sysParams.adcDataMuxEn				= 0
    	
    	
    sysParams.LMFSHdFb					= LMFSHdFb
    sysParams.fbJesdTxScr				= [1, 1]
    sysParams.fbJesdTxK					= [16, 16]
    #sysParams.fbJesdTxSyncMux			= [0, 0]
    #sysParams.fbDataMux					= [0, 1]
    	
    sysParams.LMFSHdTx					= LMFSHdTx
    sysParams.jesdTxProtocol			= [0, 0]
    sysParams.jesdTxLaneMux				= [0, 1, 2, 3, 4, 5, 6, 7]
    #sysParams.jesdTxRbd					= [4, 4]
    sysParams.jesdRxScr					= [1, 1, 1, 1]
    sysParams.jesdRxK					= [16, 16, 16, 16]
    #sysParams.jesdRxSyncMux				= [0, 0, 0, 0]
    #sysParams.txDataMux					= [0, 1, 2, 3, 4, 5, 6, 7]
    #sysParams.serdesTxLanePolarity		= [0, 0, 0, 0, 0, 0, 0, 0]
    #sysParams.dacDataMuxEn				= 0
    #sysParams.serdesTxPreCursor			= [6, 6, 6, 6, 6, 6, 6, 6]
    #sysParams.serdesTxPostCursor		= [0, 0, 0, 0, 0, 0, 0, 0]
    #sysParams.serdesTxMainCursor		= [3, 0, 0, 0, 0, 0, 0, 3]
    
    
    ##########                         Dummy txt                         ##########
    
    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']}
    
    logDumpInst.setFileName(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1.txt")
    logDumpInst.logFormat				= 0x00
    logDumpInst.rewriteFile				= 1
    logDumpInst.rewriteFileFormat4		= 1
    
    device.optimizeWrites				= 0
    device.rawWriteLogEn				= 1
    device.delay_time                   = 0
    							
    AFE.deviceBringup()
    AFE.TOP.overrideTdd(15,3,15)

    Regards,

    David Chaparro

  • Hi David,

    Thanks for the reply.

    Based on my quick inspection of the script you provided, Tx sampling rate is now reduced to 5892.48 MHz. Since at least 3 DAC channels have their NCOs at frequencies of 5 GHz and more (5.02, 8.2125, 6.812.5 to be exact), won't this sampling rate impact their performance?

    In addition, in which document is Table 8-8 located? There is this table in the configuration guide (probably it has the information you were referring to):

    Kind regards,

    Željko

  • A minor addition to my question above - is it possible to adjust FB rate in any way while keeping the Tx rate as in my original script, so that the required ratio between the two is satisfied?

    Željko

  • Hi Zeljko,

    I will begin testing this on my setup early next week.

    Regards,

    David Chaparro

  • Hi Zeljko,

    I have attempted this configuration and I am seeing errors in the JESD link. I am checking with our software team to see if there is something that is missing in the script or Latte.

    Regards,

    David Chaparro

  • Hi Zeljko,

    We have found the issue and we are working on updating the Latte software to fix this. Once we have an updated installer we will load this onto the AFE79xx secure folder and you can download it.

    Regards,

    David Chaparro

  • Hi David,

    Many thanks for your reply and also many thanks for all the effort you did to inform me about this.

    Just two small questions here:

    1) Do you possibly have any idea on the timeline here and how soon could we expect the updated version of Latte to pop up in the secure folder?

    2) Can you comment on the fix (or point to a bugfix log) that will be included in this Latte update in terms of what will now be possible to do with Latte that current version is not capable of?

    Kind regards,

    Željko

  • Zeljko,

    I have reached out to the software team for a timeline on the new installer. Once I have the installer it should not take long for us to put in the secure folder, 1 day or 2 for testing. 

    I am not aware of the exact issue but I will ask the software team to see if they can share the cause of the issue. 

    Regards,

    David Chaparro

  • Hi Zeljko,

    The latest version,TI-AFE79xx-Latte_V2p0p7-Installer, is now uploaded in the secure folder. The software will now be installed as 'AFE79xx' instead of 'Latte'.

    Regards,

    David Chaparro

  • Hi David,

    Thanks for the update. Is it possible to comment on the changes in the new version or to point to a particular document where the changelog of the new version is? Will there be any additional documentation coming with this new version?

    Kind regards,

    Željko

  • Hi David,

    A small update - I see that in the new software to replace Latte new errors pop up in the script with your modifications, namely the DAC sampling rate (5892.48 MHz) is no longer supported. Here is the error text:

    Fdac not compatible with VCO. Valid Ranges of Fdac*(1/2/3/4/5/6) are: ((7200.0, 7680.0), (8847.36, 9216.0), (9830.4, 10240.0), (11796.48, 12288.0))

    VCO Frequency/FadcRx should be (1/2/3/4/5/6) when the externalClockRx is False. Current VCO frequency is: 9000

    Couldn't find valid PLL multiplier to get the VCO frequency. VCO Frequency:9000, Fref:163.68

    No valid LCM Divider factor

    The External Sysref Frequency should be an integer factor of: 5.115MHz

    2T2R1F Number: 0

    Valid Configuration: False

    laneRateRx: 6547.2

    laneRateFb: 6547.2

    laneRateTx: 6547.2

    2T2R1F Number: 1

    Valid Configuration: False

    laneRateRx: 6547.2

    laneRateFb: 6547.2

    laneRateTx: 6547.2

    Could you provide some feedback on this?

    Kind regards,

    Željko

  • Hi Zeljko,

    This error usually occurs when the setup.py script is set for the AFE7900 device, as the VCO range is slightly different compared to the AFE7950 and AFE7920. One thing that you can check is that in the setup.py script you have set the chipVersion to: chipVersion=0x13.

    To find the changes that were made to the GUI you can use the 'readme.txt' document that is installed with the GUI at the following location: C:\Users\<>\Documents\Texas Instruments\Afe79xxLatte\lib\Afe79xxLibraries\AFE79xxLibraryPG1p0\resourceFiles

    Regards,

    David Chaparro

  • Thanks, the error seems to be resolved now.

    Kind regards,

    Željko