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.

AFE7950EVM: getting errors after changing DECIMATION AND INTERPOLATION FACTOR in latte

Part Number: AFE7950EVM


Tool/software:

Hello,

          I  have a working configuration of both LATTE and TI_204C_IP , with the given latte configuration and  GTH configuration , then now i want to make my  BANDWIDTH as half. So i will increase my decimation rate to 12 ,and interpolation rate to 48 then, what all are the changes i need to so in LATTE configuration and GTH configuration in order to get it work.

here i am attaching the latte configuration  which is working, previously .

'''
Validation :  AFE79xx Library Version 
				v1.67, v1.74
Case			RX					TX						   FB						CLK					Notes
----	-----------------	  -----------------			-----------------			-----------			------------
1		245.76Msps, 24410     491.52Msps, 44210			491.52Msps, 22210			FADC=2949.12M       DAC in interleaved mode
		SerDes=9830.4Mbps     SerDes=9830.4Mbps			SerDes=9830.4Mbps			FDAC=8847.36M
		PLL0, NCO=3500M		  PLL0, NCO=3500M			NCO=3500M                   REF=491.52M
		
2		245.76Msps, 24410     491.52Msps, 44210			491.52Msps, 22210			FADC=2949.12M       DAC in straight mode
		SerDes=9830.4Mbps     SerDes=9830.4Mbps			SerDes=9830.4Mbps			FDAC=8847.36M
		PLL0, NCO=3500M		  PLL0, NCO=3500M			NCO=3500M                   REF=491.52M
'''
setupParams.skipFpga 				= 1
sysParams							=	AFE.systemParams
setupParams.fpgaRefClk 				= 245.76#184.32#
AFE.systemStatus.loadTrims			= 1


sysParams.FRef                    	= 491.52
sysParams.FadcRx                  	= 2949.12
sysParams.FadcFb				  	= 2949.12
sysParams.Fdac                    	= 2949.12*4

sysParams.enableDacInterleavedMode	= False 					#DAC interleave mode to save power consumption. Fs/2 - Fin spur occurs

sysParams.modeTdd 					= 0		
										# 0- Single TDD Pin for all Channels
										# 1- Separate Control for 2T/2R/1F
										# 2- Separate Control for 1T/1R/1F			

sysParams.topLevelSystemMode		= 'StaticTDDMode'
sysParams.RRFMode 					= 0   #4T4R2F FDD mode
sysParams.jesdSystemMode			= [3,3]
										#SystemMode 0:	2R1F-FDD						; rx1-rx2-fb-fb
										#SystemMode 1:	1R1F-FDD						; rx1-rx1-fb-fb
										#SystemMode 2:	2R-FDD							; rx1-rx1-rx2-rx2
										#SystemMode 3:	1R								; rx1-rx1-rx1-rx1
										#SystemMode 4:	1F								; fb-fb-fb-fb
										#SystemMode 5:	1R1F-TDD						; rx1/fb-rx1/fb-rx1/fb-rx1/fb
										#SystemMode 8:	1R1F-TDD 1R-FDD	(FB-2Lanes)(RX1 RX2 interchanged)		; rx2/fb-rx2/fb-rx1-rx1


sysParams.jesdLoopbackEn			= 0 #Make it 1 to Enable the JESDTX to JESDRX internal loopback
sysParams.LMFSHdRx                	= ["44210","44210","44210","44210"]	
										# The 2nd and 4th are valid only for jesdSystemMode values in (2,6,7,8). For other modes, select 4 converter modes for 1st and 3rd.
sysParams.LMFSHdFb                	= ["22210","22210"]
sysParams.LMFSHdTx                	= ["44210","44210","44210","44210"]
sysParams.jesdTxProtocol            = [0,0]
sysParams.jesdRxProtocol            = [0,0]
sysParams.serdesFirmware			= True 		# If you want to lead any firmware, please speify the path here. Otherwise it will not write any firmware
sysParams.jesdTxLaneMux				= [0,1,2,3,4,5,6,7]	
												# Enter which lanes you want in each location. 
												# Note that across 2T Mux is not possible in 0.5.
												# 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]]
sysParams.serdesTxLanePolarity		= [True, True, False, False, True, True, False, False]
sysParams.jesdRxLaneMux				= [0,1,2,3,4,5,7,6]	
												# Enter which lanes you want in each location.
												# Note that across 2R Mux is not possible in 0.5.
												# 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.serdesRxLanePolarity		= [True, True, True, True, False, False, False, False]
sysParams.jesdRxRbd					= [4, 4]

sysParams.rxJesdTxScr				= [False]*4
sysParams.fbJesdTxScr				= [False]*2
sysParams.jesdRxScr					= [False]*4

sysParams.rxJesdTxK					= [32]*4
sysParams.fbJesdTxK					= [32]*2
sysParams.jesdRxK					= [16]*4 #[32]*4


	
sysParams.txNco0					= 	[[3800,9500],
										[3800,9500],
										[3800,9500],
										[3800,9500]]

sysParams.rxNco0					= 	[[3800,9500],
										[3800,9500],
										[3800,9500],
										[3800,9500]]

sysParams.fbNco0					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO0
sysParams.fbNco1					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO1
sysParams.fbNco2					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO2
sysParams.fbNco3					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO3

sysParams.numBandsRx				= [0]*4					# 0 for single, 1 for dual
sysParams.numBandsFb				= [0,0]				
sysParams.numBandsTx				= [0,0,0,0]

sysParams.ddcFactorRx             	= [6]*4			# DDC decimation factor for RX A, B, C and D
sysParams.ddcFactorFb             	= [6]*2
sysParams.ducFactorTx             	= [24]*4

AFE.systemStatus.loadTrims			=1

## The following parameters sets up the LMK04828 clocking schemes
lmkParams.pllEn						=	True#False
lmkParams.inputClk					=	1474.56#737.28
lmkParams.sysrefFreq				=	2949.12/1024
lmkParams.lmkFrefClk				=	True

## The following parameters sets up the register and macro dumps
logDumpInst.setFileName(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1.txt")
logDumpInst.logFormat				= 0x0f ## THIS FOR  RTS
#logDumpInst.logFormat				= 0x21 ## THIS  IS FOR BALA SCRIPTS.
logDumpInst.rewriteFile				= 1
logDumpInst.rewriteFileFormat4		= 1
device.optimizeWrites				= 0
device.rawWriteLogEn				= 1
lmk.rawWriteLogEn					= 1

## The following parameters sets up the SYNCIN and SYNCOUT to interface with the TSW14J57
sysParams.jesdABLvdsSync			= 0
sysParams.jesdCDLvdsSync			= 0
sysParams.rxJesdTxSyncMux			= [0,0,0,0]
sysParams.fbJesdTxSyncMux			= [0,0]
sysParams.jesdRxSyncMux				= [0,0,0,0]		#[0,0,1,1]
sysParams.syncLoopBack				= True

# ## The following parameters sets up the AGC
# sysParams.agcParams[0].agcMode = 1 ##internal AGC
# sysParams.agcParams[0].gpioRstEnable = 0 ##disable GPIO based reset to AGC detector 
# sysParams.agcParams[0].atken = [0, 1, 0] ##enable big and small step attack
# sysParams.agcParams[0].decayen = [0,1,0] ##enable big and small step decay
# sysParams.agcParams[0].atksize = [2,1,0] ## bigs step = 2dB, small step = 1dB
# sysParams.agcParams[0].decaysize = [2,1,0] ##big step = 2dB, small step = 1dB
# sysParams.agcParams[0].atkthreshold = [-1, -2, -14] ##attack threshold
# sysParams.agcParams[0].decaythreshold = [-14, -6, -20] ##decay threshold
# sysParams.agcParams[0].atkwinlength = [170, 170] ## detector time constant expressed inn absolute time in ns. 
# sysParams.agcParams[0].decaywinlength = 87380 ##detector time constant expressed in absolute time in ns. All detectors use the same value for decay time constant
# sysParams.agcParams[0].atkNumHitsAbs = [8,8] ##absolute number of times signal crosses threshold. These crossing are with respect to the FADC/8 clock
# sysParams.agcParams[0].decayNumHitsAbs = [100,100] ##absolute number of times signal crosses threshold. These crossing are with respect to the FADC/8 clock
# sysParams.agcParams[0].minDsaAttn = 0 ##minimum DSA attenuation used by AGC
# sysParams.agcParams[0].maxDsaAttn = 22 ##maximum DSA attenuation used by AGC
# sysParams.agcParams[0].totalGainRange = 22 ##total gain range used by ALC for gain compensation
# sysParams.agcParams[0].minAttnAlc = 0 ##minimum attenuation used by ALC for compensation when useMinAttnAgc = 0
# sysParams.agcParams[0].useMinAttnAgc = 1 ##enable ALC to use minimum attenuation from AGC for which compensation is required.
# sysParams.agcParams[0].alcEn = 1
# sysParams.agcParams[0].alcMode = 0 ##floating point DGC
# sysParams.agcParams[0].fltPtMode = 0 ##if exponent > 0, dont send MSB
# sysParams.agcParams[0].fltPtFmt = 1 ##3 bit exponent


## The following parameters sets up the GPIOs
sysParams.gpioMapping={
		'H8': 'ADC_SYNC0',
		'H7': 'DAC_SYNC0',
		'N8': 'ADC_SYNC2',
		'N7': 'ADC_SYNC3',
		'H9': 'ADC_SYNC1',
		'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']}
		
#AFE.systemParams.papParams[0]['enable'] = True
#AFE.systemParams.papParams[1]['enable'] = True
#AFE.systemParams.papParams[2]['enable'] = True
#AFE.systemParams.papParams[3]['enable'] = True

sysParams.useSpiSysref = False
#setupParams.skipLmk	=	False
#AFE.LMK.lmkConfig()
sysParams.ncoFreqMode 				=  "FCW"  ##"1KHz" ##"FCW"
AFE.systemStatus.txChainDirectCtrl = 1
## Initiates LMK04828 and AFE79xx Bring-up

setupParams.skipLmk	=	False
AFE.initializeConfig()
lmkParams.sysrefFreq = AFE.systemStatus.sysrefFreq
lmkParams.lmkPulseSysrefMode = False
AFE.LMK.lmkConfig()


  • Hi Dharani,

    What error are you receiving when updating the decimation and interpolation factors? 

    To update these you should update the following parameters:

    1. sysParams.ddcFactorRx: Rx decimation Factor can be updated to 12
    2. sysParams.ddcFactorFb: Fb decimation Factor can be updated to 12
    3. sysParams.ducFactorTx: Tx interpolation Factor can be updated to 48
    4. setupParams.fpgaRefClk: Should be updated according to you new late rate

    Regards,

    David Chaparro 

  • I exactly changed the  

    1. sysParams.ddcFactorRx: Rx decimation Factor can be updated to 12
    2. sysParams.ddcFactorFb: Fb decimation Factor can be updated to 12
    3. sysParams.ducFactorTx: Tx interpolation Factor can be updated to 48
    4. but i kept the setupParams.fpgaRefClk as 245.76 only, what value should i need to update ?And how to calculate the value of  setupParams.fpgaRefClk according to the new lane rate?

    here are the errors i am getting while i changed only the decimation , interpolation rates of RX,TX,FB.

    And i tried giving 122.88 as my setupParams.fpgaRefClk  ,then after programming LMK_Config.py , i am applying reset sequence(the sequence is correct only), but QPLL0 is  not locking, i am not getting 3 value in QPLL0 . And except for setupParams.fpgaRefClk = 245.76 , for any other remaining value of setupParams.fpgaRefClk  i am not getting that qpll0 lock why? For that what i have to change exactly . here i am attaching the GTH settings also for reference.

       
    here are my GTH settings , could you please tell me based up on what settings i got the ACTUAL REFERNCE CLOCK , LANE RATE values in my GTH transceiver.

  • Hi Dharani,

    When updating the interpolation and decimation factors your new lane rate would be half what is before. Based on the script you provided it would now be ~5Gbps. Therefore you should update the transceiver wizard with this new lane rate.

    For the clocks, the TI IP has a requirement for the sys_clock frequency on the Tx side where it needs to be LaneRate/80 and we typically make the actual reference clock also equal to this. Therefore for your new mode the clock should be 61.44MHz.

    One thing to note is that when using the LMK VCO, 2949.12Mhz, it is not possible to get an output frequency of 61.44MHz as the max clock divider is only 32. Therefore in order to get the 61.44Mhz output I would recommend operating the LMK in distribution mode, where you provide a 983.04MHz clock to J14 and it gets divided for both the AFE and FPGA clocks. The script below was configured for distribution mode and requires a 5dBm 983.04MHz clock at J14, LMK_CLK_IN. 

    '''
    Validation :  AFE79xx Library Version 
    				v1.67, v1.74
    Case			RX					TX						   FB						CLK					Notes
    ----	-----------------	  -----------------			-----------------			-----------			------------
    1		245.76Msps, 24410     491.52Msps, 44210			491.52Msps, 22210			FADC=2949.12M       DAC in interleaved mode
    		SerDes=9830.4Mbps     SerDes=9830.4Mbps			SerDes=9830.4Mbps			FDAC=8847.36M
    		PLL0, NCO=3500M		  PLL0, NCO=3500M			NCO=3500M                   REF=491.52M
    		
    2		245.76Msps, 24410     491.52Msps, 44210			491.52Msps, 22210			FADC=2949.12M       DAC in straight mode
    		SerDes=9830.4Mbps     SerDes=9830.4Mbps			SerDes=9830.4Mbps			FDAC=8847.36M
    		PLL0, NCO=3500M		  PLL0, NCO=3500M			NCO=3500M                   REF=491.52M
    '''
    setupParams.skipFpga 				= 1
    sysParams							=	AFE.systemParams
    setupParams.fpgaRefClk 				= 245.76#184.32#
    AFE.systemStatus.loadTrims			= 1
    
    
    sysParams.FRef                    	= 491.52
    sysParams.FadcRx                  	= 2949.12
    sysParams.FadcFb				  	= 2949.12
    sysParams.Fdac                    	= 2949.12*4
    
    sysParams.enableDacInterleavedMode	= False 					#DAC interleave mode to save power consumption. Fs/2 - Fin spur occurs
    
    sysParams.modeTdd 					= 0		
    										# 0- Single TDD Pin for all Channels
    										# 1- Separate Control for 2T/2R/1F
    										# 2- Separate Control for 1T/1R/1F			
    
    sysParams.topLevelSystemMode		= 'StaticTDDMode'
    sysParams.RRFMode 					= 0   #4T4R2F FDD mode
    sysParams.jesdSystemMode			= [3,3]
    										#SystemMode 0:	2R1F-FDD						; rx1-rx2-fb-fb
    										#SystemMode 1:	1R1F-FDD						; rx1-rx1-fb-fb
    										#SystemMode 2:	2R-FDD							; rx1-rx1-rx2-rx2
    										#SystemMode 3:	1R								; rx1-rx1-rx1-rx1
    										#SystemMode 4:	1F								; fb-fb-fb-fb
    										#SystemMode 5:	1R1F-TDD						; rx1/fb-rx1/fb-rx1/fb-rx1/fb
    										#SystemMode 8:	1R1F-TDD 1R-FDD	(FB-2Lanes)(RX1 RX2 interchanged)		; rx2/fb-rx2/fb-rx1-rx1
    
    
    sysParams.jesdLoopbackEn			= 0 #Make it 1 to Enable the JESDTX to JESDRX internal loopback
    sysParams.LMFSHdRx                	= ["44210","44210","44210","44210"]	
    										# The 2nd and 4th are valid only for jesdSystemMode values in (2,6,7,8). For other modes, select 4 converter modes for 1st and 3rd.
    sysParams.LMFSHdFb                	= ["22210","22210"]
    sysParams.LMFSHdTx                	= ["44210","44210","44210","44210"]
    sysParams.jesdTxProtocol            = [0,0]
    sysParams.jesdRxProtocol            = [0,0]
    sysParams.serdesFirmware			= True 		# If you want to lead any firmware, please speify the path here. Otherwise it will not write any firmware
    sysParams.jesdTxLaneMux				= [0,1,2,3,4,5,6,7]	
    												# Enter which lanes you want in each location. 
    												# Note that across 2T Mux is not possible in 0.5.
    												# 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]]
    sysParams.serdesTxLanePolarity		= [True, True, False, False, True, True, False, False]
    sysParams.jesdRxLaneMux				= [0,1,2,3,4,5,7,6]	
    												# Enter which lanes you want in each location.
    												# Note that across 2R Mux is not possible in 0.5.
    												# 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.serdesRxLanePolarity		= [True, True, True, True, False, False, False, False]
    sysParams.jesdRxRbd					= [4, 4]
    
    sysParams.rxJesdTxScr				= [False]*4
    sysParams.fbJesdTxScr				= [False]*2
    sysParams.jesdRxScr					= [False]*4
    
    sysParams.rxJesdTxK					= [32]*4
    sysParams.fbJesdTxK					= [32]*2
    sysParams.jesdRxK					= [16]*4 #[32]*4
    
    
    	
    sysParams.txNco0					= 	[[3800,9500],
    										[3800,9500],
    										[3800,9500],
    										[3800,9500]]
    
    sysParams.rxNco0					= 	[[3800,9500],
    										[3800,9500],
    										[3800,9500],
    										[3800,9500]]
    
    sysParams.fbNco0					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO0
    sysParams.fbNco1					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO1
    sysParams.fbNco2					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO2
    sysParams.fbNco3					= 	[2500,2500] #[1800,1800]			#FBA, FBC for NCO3
    
    sysParams.numBandsRx				= [0]*4					# 0 for single, 1 for dual
    sysParams.numBandsFb				= [0,0]				
    sysParams.numBandsTx				= [0,0,0,0]
    
    sysParams.ddcFactorRx             	= [12]*4			# DDC decimation factor for RX A, B, C and D
    sysParams.ddcFactorFb             	= [12]*2
    sysParams.ducFactorTx             	= [48]*4
    
    AFE.systemStatus.loadTrims			=1
    
    ## The following parameters sets up the LMK04828 clocking schemes
    lmkParams.pllEn						=	False
    lmkParams.inputClk					=	983.04
    lmkParams.sysrefFreq				=	2949.12/1024
    lmkParams.lmkFrefClk				=	True
    
    ## The following parameters sets up the register and macro dumps
    logDumpInst.setFileName(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1.txt")
    logDumpInst.logFormat				= 0x0f ## THIS FOR  RTS
    #logDumpInst.logFormat				= 0x21 ## THIS  IS FOR BALA SCRIPTS.
    logDumpInst.rewriteFile				= 1
    logDumpInst.rewriteFileFormat4		= 1
    device.optimizeWrites				= 0
    device.rawWriteLogEn				= 1
    lmk.rawWriteLogEn					= 1
    
    ## The following parameters sets up the SYNCIN and SYNCOUT to interface with the TSW14J57
    sysParams.jesdABLvdsSync			= 0
    sysParams.jesdCDLvdsSync			= 0
    sysParams.rxJesdTxSyncMux			= [0,0,0,0]
    sysParams.fbJesdTxSyncMux			= [0,0]
    sysParams.jesdRxSyncMux				= [0,0,0,0]		#[0,0,1,1]
    sysParams.syncLoopBack				= True
    
    # ## The following parameters sets up the AGC
    # sysParams.agcParams[0].agcMode = 1 ##internal AGC
    # sysParams.agcParams[0].gpioRstEnable = 0 ##disable GPIO based reset to AGC detector 
    # sysParams.agcParams[0].atken = [0, 1, 0] ##enable big and small step attack
    # sysParams.agcParams[0].decayen = [0,1,0] ##enable big and small step decay
    # sysParams.agcParams[0].atksize = [2,1,0] ## bigs step = 2dB, small step = 1dB
    # sysParams.agcParams[0].decaysize = [2,1,0] ##big step = 2dB, small step = 1dB
    # sysParams.agcParams[0].atkthreshold = [-1, -2, -14] ##attack threshold
    # sysParams.agcParams[0].decaythreshold = [-14, -6, -20] ##decay threshold
    # sysParams.agcParams[0].atkwinlength = [170, 170] ## detector time constant expressed inn absolute time in ns. 
    # sysParams.agcParams[0].decaywinlength = 87380 ##detector time constant expressed in absolute time in ns. All detectors use the same value for decay time constant
    # sysParams.agcParams[0].atkNumHitsAbs = [8,8] ##absolute number of times signal crosses threshold. These crossing are with respect to the FADC/8 clock
    # sysParams.agcParams[0].decayNumHitsAbs = [100,100] ##absolute number of times signal crosses threshold. These crossing are with respect to the FADC/8 clock
    # sysParams.agcParams[0].minDsaAttn = 0 ##minimum DSA attenuation used by AGC
    # sysParams.agcParams[0].maxDsaAttn = 22 ##maximum DSA attenuation used by AGC
    # sysParams.agcParams[0].totalGainRange = 22 ##total gain range used by ALC for gain compensation
    # sysParams.agcParams[0].minAttnAlc = 0 ##minimum attenuation used by ALC for compensation when useMinAttnAgc = 0
    # sysParams.agcParams[0].useMinAttnAgc = 1 ##enable ALC to use minimum attenuation from AGC for which compensation is required.
    # sysParams.agcParams[0].alcEn = 1
    # sysParams.agcParams[0].alcMode = 0 ##floating point DGC
    # sysParams.agcParams[0].fltPtMode = 0 ##if exponent > 0, dont send MSB
    # sysParams.agcParams[0].fltPtFmt = 1 ##3 bit exponent
    
    
    ## The following parameters sets up the GPIOs
    sysParams.gpioMapping={
    		'H8': 'ADC_SYNC0',
    		'H7': 'DAC_SYNC0',
    		'N8': 'ADC_SYNC2',
    		'N7': 'ADC_SYNC3',
    		'H9': 'ADC_SYNC1',
    		'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']}
    		
    #AFE.systemParams.papParams[0]['enable'] = True
    #AFE.systemParams.papParams[1]['enable'] = True
    #AFE.systemParams.papParams[2]['enable'] = True
    #AFE.systemParams.papParams[3]['enable'] = True
    
    sysParams.useSpiSysref = False
    #setupParams.skipLmk	=	False
    #AFE.LMK.lmkConfig()
    sysParams.ncoFreqMode 				=  "FCW"  ##"1KHz" ##"FCW"
    AFE.systemStatus.txChainDirectCtrl = 1
    ## Initiates LMK04828 and AFE79xx Bring-up
    
    setupParams.skipLmk	=	False
    AFE.initializeConfig()
    lmkParams.sysrefFreq = AFE.systemStatus.sysrefFreq
    lmkParams.lmkPulseSysrefMode = False
    AFE.LMK.lmkConfig()

    Regards,

    David Chaparro