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.

[参考译文] AFE7900EVM:NCO 频率配置

Guru**** 1821780 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/rf-microwave-group/rf-microwave/f/rf-microwave-forum/1295365/afe7900evm-nco-frequency-configuration

器件型号:AFE7900EVM

您好!

   对于我们的应用、我们需要快速更改 NCO 频率(以扫描频谱的方式)。 对此、SPI 命令方法很慢。  

在一个论坛帖子中、提到了如何使用某些 GPIO 引脚将 NCO 切换到预定频率。  

我已经问过这个问题: https://e2e.ti.com/support/rf-microwave-group/rf-microwave/f/rf-microwave-forum/1285010/afe7900evm-nco-frequency-configuration

但是我没有收到我的后续问题的答案。 我们需要跨多个频段(而不仅仅是2个频段)进行切换。  

请建议:

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、SM:

    以下脚本可用于配置 AFE、以便通过 GPIO 设置所选的 NCO。

    ##############		Read me			##############
    #In HSDC Pro DAC tab, Select AFE79xx_2x2TX_44210; Data Rate = 491.52M
    #In HSDC Pro ADC tab, Select AFE79xx_2x2RX_44210; Data Rate = 491.52M ---> To capture 4 RX channels
    
    sysParams=AFE.systemParams
    sysParams.__init__();sysParams.chipVersion=chipVersion
    
    setupParams.skipFpga = 1 # setup FPGA (TSW14J56) using HSDC Pro 
    ##############		Top Level			##############
    sysParams.FRef			= 491.52
    sysParams.FadcRx		= 2949.12
    sysParams.FadcFb		= 2949.12
    sysParams.Fdac			= 2949.12*4
    sysParams.externalClockRx=False
    sysParams.externalClockTx=False
    													
    ##############		Digital Chain		##############
    
    		#####	RX	#####
    sysParams.ddcFactorRx	=	[6,6,6,6]				#DDC decimation factor for RX A, B, C and D
    sysParams.rxNco0		= 	[[5400,5400],			#Band0, Band1 for RXA 
    							[500,500],        		#Band0, Band1 for RXB 
    							[2500,2500],        	#Band0, Band1 for RXC 
    							[1800,1800]]        	#Band0, Band1 for RXD 
    
    		#####	FB	#####
    sysParams.fbEnable		=	[False,False]
    sysParams.ddcFactorFb	=	[6,6]					#DDC decimation factor for FB 1 and 2
    sysParams.fbNco0		= 	[500,1800]				#Band0 for FB1 and FB2 
    
    		#####	TX	#####
    sysParams.ducFactorTx	=	[18,18,18,18]			#DUC interpolation 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= [3,3]
    													#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		= ["44210","44210","44210","44210"]
    													# 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		= ["22210","22210"]
    
    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	= True	#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'],
    						'E6': 'TX_NCOSEL_0',
    						'C5': 'TX_NCOSEL_1',
    						'P16': 'TX_NCOSEL_2',
    						'C6': 'TX_NCOSEL_3',
    						'G6': 'RX_NCOSEL_0',
    						'G7': 'RX_NCOSEL_1',
    						'G8': 'RX_NCOSEL_2',
    						'R5': 'RX_NCOSEL_3',
    						'C6': 'TX_NCOSEL_3',}
    
    ##############		LMK Params		##############
    lmkParams.pllEn			= True
    lmkParams.inputClk		= 983.04 # Valid only when lmkParams.pllEn = False
    lmkParams.lmkFrefClk	= True
    setupParams.fpgaRefClk	= 245.76 # 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
    lmk.rawWriteLogEn=1
    
    ##############		16 NCO Params		##############
    sysParams.ncoFreqMode	= "FCW"
    
    sysParams.ncoRxMode		=	[6,6]
    sysParams.broadcastRxNcoSel = 1
    sysParams.numRxNCO		=	2
    
    sysStatus.txChainDirectCtrl=True
    sysParams.txChainDirectCtrl=True
    sysParams.ncoTxMode		=	[3,3]
    sysParams.broadcastTxNcoSel = 1
    sysParams.numTxNCO		=	2
    
    
    device.delay_time = 0
    #-------------------------------------------------------------------------------------------------#
    AFE.deviceBringup()
    
    AFE.TOP.overrideTdd(15,3,15)	# bit-wise; 4R,2F,4T
    
    for i in range(16):
    	for j in range(3):
    		AFE.updateRxNcoInfiniteNcoMode(j,5400+50*i,i)
    		AFE.updateTxNcoInfiniteNcoMode(j,5400+50*i,i)
    
    for i in range(2):	
    	for j in range(2):
    		device.TT[j].TXDIG[i].TXDIG.REGGROUP_4.config_fmixer_update_pulse = 0
    		device.TT[j].TXDIG[i].TXDIG.REGGROUP_4.config_fmixer_update_pulse = 1
    
    # AFE.IOWRAP.overrideFunction('TX_NCOSEL_0',1,1)
    # AFE.IOWRAP.overrideFunction('TX_NCOSEL_2',1,1)
    # AFE.IOWRAP.overrideFunction('TX_NCOSEL_1',1,1)
    # AFE.IOWRAP.overrideFunction('TX_NCOSEL_3',1,1)
    
    # AFE.IOWRAP.overrideFunction('RX_NCOSEL_0',0,0)
    # AFE.IOWRAP.overrideFunction('RX_NCOSEL_1',0,0)
    # AFE.IOWRAP.overrideFunction('RX_NCOSEL_2',0,0)
    # AFE.IOWRAP.overrideFunction('RX_NCOSEL_3',0,0)

    要更新 NCO 频率、请使用以下函数。

    • 使用命令 AFE.updateRxNcoInfiniteNcoMode (ch_num、NCO_freq、NCO_num)更新 RX NCO 频率 ch_num -> 0至3;NCO_freq 的单位为 MHz;NCO_num -> 0至15
    • 使用命令 AFE.updateTxNcoInfiniteNcoMode (ch_num、NCO_freq、NCO_num)更新 TX NCO 频率 ch_num -> 0至3;NCO_freq 以 MHz 为单位;NCO_num -> 0至15

     

    使用以下寄存器写入将 UPDATE_PULSE 位从0 -> 1进行编程、以立即更新 TX NCO 频率。 当 NCO 被切换时、TX NCO 频率也被自动更新。

    device.TT[0].TXDIG[0].TXDIG.REGGROUP_4.CONFIG_fmixer_update_pulse = 0

    device.TT[0].TXDIG[0].TXDIG.REGGROUP_4.CONFIG_fmixer_update_pulse = 1

     

     

    请‘、对于测试、可以使用"FAFE.IOWRAP.overrideFunction"命令从 Latte 覆盖 GPIO:

    • 例如、要将 TX_NCOSEL_0设置为‘1"、请运行 AFE.IOWRAP.OVERRIDEFunction ('TX_NCOSEL_0'、1、1)# OVERRIDE_ENABLE = 1;OVERRIDE_VALUE = 1
    • 要将 TX_NCOSEL_0设置为‘0'、请运行 AFE.IOWRAP.OVERRIDEFunction ('TX_NCOSEL_0'、1、0)# OVERRIDE_ENABLE = 1;OVERRIDE_VALUE = 1
    • 要禁用覆盖、请运行 AFE.IOWRAP.OVERRIDEFunction ("TX_NCOSEL_0"、0、0)# OVERRIDE_ENABLE = 0

    此致、

    大卫·查帕罗