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.

AFE7901: PAP disables the output signal no matter how low the signal is

Part Number: AFE7901
Other Parts Discussed in Thread: TSW14J58EVM

Tool/software:

I am now working with the PAP function of AFE7901/7903. It is started with basic configuration, not far away from the default setting.

But it always disabled the output signal, no matter how low the signal it is.

Could you please advise? For example, provide a PAP configuration template?

Thank you very much.

  • Hi all,

    Could you please advise?

    Thank you.

    Best regards,

    Yinan

  • Hi Yinan,

    From our meeting earlier today, I understand that your PAP requirements are defined by your amplifier specifications, particularly average power and broadband noise. Please let us know these PA specifications and how you were trying to set PAP so that I can start working on a sample PAP configuration using your parameters as a starting point.

    Thanks,

    Aman

  • Hi Aman,

    Thank you for your reply and the hint of maskalarming in the meeting. I am exchanging the current prototype to a newer version and will test maskalarming afterwards.

    The PAP requirements derived from our PA spec and our link budget are as below: 

    1. average power in band < -11 dBFS for DAC

    2. out of band power < -74 dBFS for DAC

    This level is based on the TRX DAC gain in the datasheet. If the DAC gain needs to be adjusted afterwards, the level will be corresponding changed as well. The band is defined as 385-430MHz.

    Based on these levels, the average detector level are configured as below,

    sysParams.papParams[0]['maThreshB0'] = 28

    Refer to the average window, we will start with one frame 57 ms. First question, how about the conversion between window number and time? The data rate at detector is needed. There are intepolation after detector, the interface rate of DAC could not be used in calculation here. 

    Second, refer to the HPF detector threshold, is it possible to configure -74 dBFS?

    Third question is about the conversion between 430MHz to HPF detector window length. The data rate at detector is needed here as well.

    Could you please advise?

    Thanks again.

    Best regards

    Yinan

  • Hi Yinan, 

    Thanks for providing your requirements. This maThreshB0 looks correct to me for -11 dBFS.

    For your question on configuring HPF detector threshold:

    I understand that the hpfThresh parameters are in percentages of full scale, and -74 dBFS would be something like 0.02% of full scale - I will check and follow up with you on if it's possible to configure our HPF detector this low.

    For your questions on the data rate at the detector:

    Please allow me to get back to you tomorrow on this - I believe it should be possible to specify a 57 ms "frame" using the maNumSamples and maWindowCntr parameters, I will find this conversion and follow up with you on this.

    Thanks,

    Aman

  • Hi Aman

    The out of band power limit was wrongly calculated. It should be < -30 dBFS.

    sysParams.papParams[1]['hpfThreshB0'] = 3

    Next step is to calculate the conversion between 430MHz and sysParams.papParams[1]['hpfNumSample'] to config HPF detector. Please advise.

    Thank you.

    Best regards

    Yinan

  • Hi Yinan,

    The PAP detectors work off of the IQ samples before interpolation filters, so the frequency of these samples is going to be our TX data rate. The TX data rate is given by the DAC rate (system parameter Fdac) / DUC factor (system parameter ducFactorTx).

    For example, if Fdac = 8847.36 MSPS, ducFactorTx = 18, then the TX data rate = 8847.36 MSPS / 18 = 491.52 MSPS.

    Using this data rate, the 'NumSample' parameters and the 'WindowCntr' parameters, you can specify the length of your "frame" (if I'm understanding what you mean by your frame correctly). 

    Please let me know if you need any more clarification here.

    Thanks,

    Aman

  • Hi Aman,

    Thank you for your reply. For average power detector window length, it is clear now.

    I tested EVM with masking all the other alarm except detectors and now the signal is only disabled when it is high. 

    The average detector limit is configured to be 28% of full scale by command "sysParams.papParams[0]['maThreshB0'] = 28"

    However, the PAP is triggered when the scaling factor to creat tone is set to 0.56 in the high speed  converter pro software. 

    Is it supposed to be like this?  

    Best regards,

    Yinan

  • Hi Yinan,

    Thanks for your patience on this topic. I've looked into this and yes, this is expected - the MA detector is an RMS detector, as it is designed to protect against constant PA saturation. The intent of the MA detector is to be used to detect constant high power and not trigger on spikes, acting somewhat as a low pass filter.

    We've shared a PAP app note privately with your team, please take a look at section 2.4.2 for a description of the MA detector. In short, the peaks of the IQ samples are first taken,

    abs(n) = √(I2[n] + Q2[n]),

    and then the output of the MA detector is the average of this abs(n) signal over a moving window of length 32/64/128 samples; the output of the MA detector is an RMS of the power over maNumSample samples. Then, we can specify the number of windows in a frame (maWindowCntr) and the number of windows with average power > maThreshB0 to trigger PAP (maWindowCntrTh).

    Based on this, we could say that the higher the number of windows we require to trigger PAP will make this "more" of an average (we are required to be consistently above the threshold for longer). As an experiment, you could try reducing both maWindowCntr and maWindowCntrTh to 1 and maNumSamples to 32 to see if this allows you to use a lower tone level to trigger PAP; theoretically, the fewer samples you use, the MA detector behavior approaches that of a peak detector. However, I'm not sure if this will work in practice as the MA detector will always be averaging over at least 32 samples. 

    I hope this was helpful, please reach out if you need further clarification!

    Thanks,

    Aman

  • Hi Aman,

    Thank you very much for your reply.

    Currently I am testing HPF filter to check whether it helps to detect out of band signal.

    As described in the documentation that you send to us, the signal which falls into higher frequency of Nyquist window tends to be detected. However, with High speed data converter pro app and EVB, no matter which frequency generated in DAC,  0.1* Nyquist F or 0.5*Nyquist F or 0.8* Nyquist F, no matter how low the threshold is, the signal can always go through.

    For example, as below, the HPF filter is set with the lowest threshold and quickest response, it still can not detector the signal.

    sysParams.papParams[1]['hpfWindowCntr'] = 1 

    sysParams.papParams[1]['hpfWindowCntrTh'] = 1 

    sysParams.papParams[1]['hpfThreshB0'] = 1

    sysParams.papParams[1]['hpfThreshB1'] = 1

    sysParams.papParams[1]['hpfThreshComb'] = 1 

    sysParams.papParams[1]['hpfNumSample'] = 4

    sysParams.papParams[1]['hpfEnable'] = 1

    Could you please advise?

    Best

    Yinan

  • Hi Yinan,

    A few questions/suggestions:

    1. Could you please try setting 'hpfNumSample' = 16?
    2. What signal level are you sending out of the AFE? Would it be possible to drive the level of this signal up?
    3. Can you see the HPF detector trigger for PAP in any case?
      1. I will generate a waveform file for you in the next few days that should trigger PAP. Once I send you this file, you can try sending this waveform and seeing if the HPF filter for PAP triggers.

    Thanks,

    Aman

  • Hi Aman,

    Thank you for your reply.

    1. Yes I try with 16 and it remains the same.

    2. I tried with several levels, with scaling factor from 0.1 to 0.9 and all of them are not able to trigger the detector.

    3. Great, it will be very helpful.

    Best regards

    Yinan

  • Hi Yinan,

    Please try using the following waveform file and seeing if you can see PAP trigger. On my end, I see no TX output when PAP is enabled and a TX output when PAP is disabled with this waveform using the PAP parameters you shared in your earlier message.

    papWaveform.zip

    It sounds like you're using HSDC Pro to send tones, I believe you can use HSDC Pro to send waveforms using the "Load External Pattern File" button under the "DAC" view of HSDC Pro. Please let me know if you have any issues with sending this waveform.

    Also, could you please send me your full configuration file (including all your PAP parameters) via email/private E2E message? This will be helpful for me so that I can cross-check and debug on my setup using your exact same settings. 

    Thanks!

    Aman

  • Hi Aman,

    Here is the script. The MA detector is disabled to check the HPF detector alone.

    ############## Read me ##############

    #In HSDC Pro DAC tab, Select AFE79xx_2x2TX_44210; Data Rate = 491.52M

    #In HSDC Pro ADC tab, Select AFE79xx_2x2RX_24410; Data Rate = 245.76M ---> To capture 4 RX channels

    #In HSDC Pro ADC tab, Select AFE79xx_1x2FB_44210; Data Rate = 491.52M ---> To capture 2 FB 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*3

    sysParams.externalClockRx=False

    sysParams.externalClockTx=False

    ############## Digital Chain ##############

     

    ##### RX #####

    sysParams.ddcFactorRx = [12,12,12,12] #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.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,100], #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 = ["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

     

    ##### PAP #####

    enablePAP = True

     

    if enablePAP:

     

    # Channel B

    # Moving average detector

    sysParams.papParams[1]['maWindowCntr'] = 1

    sysParams.papParams[1]['maWindowCntrT'] = 1

    sysParams.papParams[1]['maThreshB0'] = 50

    sysParams.papParams[1]['maThreshB1'] = 50

    sysParams.papParams[1]['maThreshComb'] = 50

    sysParams.papParams[1]['maNumSample'] = 128

    sysParams.papParams[1]['maEnable'] = 0

     

    # High pass filter detector

    sysParams.papParams[1]['hpfWindowCntr'] = 1

    sysParams.papParams[1]['hpfWindowCntrTh'] = 1

    sysParams.papParams[1]['hpfThreshB0'] = 1

    sysParams.papParams[1]['hpfThreshB1'] = 1

    sysParams.papParams[1]['hpfThreshComb'] = 1

    sysParams.papParams[1]['hpfNumSample'] = 16

    sysParams.papParams[1]['hpfEnable'] = 1

     

    # PAP state machine

    sysParams.papParams[1]['enable'] = 1

    sysParams.papParams[1]['multMode'] = 0

    sysParams.papParams[1]['rampDownStartVal'] = 128

    sysParams.papParams[1]['attnStepSize'] = 5

    sysParams.papParams[1]['gainStepSize'] = 5

    sysParams.papParams[1]['detectInWaitState'] = 0

    sysParams.papParams[1]['triggerToRampDown'] = 50

    sysParams.papParams[1]['waitCounter'] = 200

    sysParams.papParams[1]['triggerClearToRampUp'] = 50

     

    #PAP alarms

    sysParams.papParams[1]['amplUpdateCycles'] = 2

    sysParams.papParams[1]['alarmPulseGPIO'] = 1000

    sysParams.papParams[1]['alarmMask'] = 0b1101111

    sysParams.papParams[1]['alarmChannelMask'] = 0b1110

    sysParams.papParams[1]['alarmPinDynamicMode'] = 1

    sysParams.papParams[1]['rampStickyMode'] = 0

     

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

     

    ############## 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=0x01 #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

    #-------------------------------------------------------------------------------------------------#

    AFE.deviceBringup()

     

    AFE.TOP.overrideTdd(15,3,15) # bit-wise; 4R,2F,4T

    Best regards

    Yinan

  • Hi Yinan,

    Thanks for providing your script. I'll go ahead and do some testing with this and see if I can get the PAP to trigger on my setup.

    Thanks,

    Aman

  • Hi Aman,

    I received the new EVM, thank you.

    Now i install the HSDC 6.0 and found that there is no device ini in the AFE TX option. Should I manually download the ini file somewhere?

    In the AFE79xxEVM_TSW14J58_Bringup ppt, it is recommended to use Latte and the script for TSW14J58 EVM. However, if I want to load your test signal, HSDC is needed. 

    Best regards

    Yinan

  • And did you make some test with this script? How does it work?

    Best

    Yinan

  • Hi Yinan,

    That's great to hear! The TSW14J58EVM can be controlled completely via Latte, so no need to use HSDC Pro any more. Please see below for the bringup script compatible with the J58 FPGA:

    sysParams=AFE.systemParams
    sysParams.__init__();sysParams.chipVersion=chipVersion
    setupParams.skipFpga = 0 # setup FPGA (TSW14J58) using Latte
    
    ############## Top Level ##############
    sysParams.FRef = 491.52
    sysParams.FadcRx = 2949.12
    sysParams.FadcFb = 2949.12
    sysParams.Fdac = 2949.12*3
    sysParams.externalClockRx=False
    sysParams.externalClockTx=False
    
    ############## Digital Chain ############## 
    ##### RX #####
    sysParams.ddcFactorRx = [12,12,12,12] #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.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,100], #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 = ["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 = False # No hardware sync for J58
    
    ##### PAP #####
    enablePAP = True
    if enablePAP:
    	# Channel B
    	# Moving average detector
    	sysParams.papParams[1]['maWindowCntr'] = 1
    	sysParams.papParams[1]['maWindowCntrT'] = 1
    	sysParams.papParams[1]['maThreshB0'] = 50
    	sysParams.papParams[1]['maThreshB1'] = 50
    	sysParams.papParams[1]['maThreshComb'] = 50
    	sysParams.papParams[1]['maNumSample'] = 128
    	sysParams.papParams[1]['maEnable'] = 0
    	
    	# High pass filter detector
    	sysParams.papParams[1]['hpfWindowCntr'] = 1
    	sysParams.papParams[1]['hpfWindowCntrTh'] = 1
    	sysParams.papParams[1]['hpfThreshB0'] = 10
    	sysParams.papParams[1]['hpfThreshB1'] = 10
    	sysParams.papParams[1]['hpfThreshComb'] = 10
    	sysParams.papParams[1]['hpfNumSample'] = 16
    	sysParams.papParams[1]['hpfEnable'] = 1
    	
    	# PAP state machine
    	sysParams.papParams[1]['enable'] = 1
    	sysParams.papParams[1]['multMode'] = 0
    	sysParams.papParams[1]['rampDownStartVal'] = 128
    	sysParams.papParams[1]['attnStepSize'] = 5
    	sysParams.papParams[1]['gainStepSize'] = 5
    	sysParams.papParams[1]['detectInWaitState'] = 0
    	sysParams.papParams[1]['triggerToRampDown'] = 50
    	sysParams.papParams[1]['waitCounter'] = 200
    	sysParams.papParams[1]['triggerClearToRampUp'] = 50
    	
    	#PAP alarms
    	sysParams.papParams[1]['amplUpdateCycles'] = 2
    	sysParams.papParams[1]['alarmPulseGPIO'] = 1000
    	sysParams.papParams[1]['alarmMask'] = 0b1101111
    	sysParams.papParams[1]['alarmChannelMask'] = 0b1110
    	sysParams.papParams[1]['alarmPinDynamicMode'] = 1
    	sysParams.papParams[1]['rampStickyMode'] = 0
    
    
    ############## 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']
    						}
    
    ############## 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=0x01 #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
    
    #-------------------------------------------------------------------------------------------------#
    
    AFE.deviceBringup()
    
    AFE.TOP.overrideTdd(15,3,15) # bit-wise; 4R,2F,4T

    The two changes you need to make to the scripts compatible with the "J56" FPGA to make them "J58"-compatible are:

    setupParams.skipFpga = 0        # 1 for J56
    sysParams.syncLoopBack = False  # True for J56

    In order to send the waveform/tones via the FPGA in Latte, please refer to the following code. Please be sure to change the file paths in AFE.FPGA.sendCustomData() to the path to the appropriate waveform file.

    ## Send pap waveform TXB
    AFE.selectCh(2,1) # select TXB: selectCh(RX/FB/TX, A/B/C/D)
    AFE.FPGA.sendCustomData(0,r'C:\path\to\papWaveform_xor.txt')  # send waveform
    AFE.adcDacSync(1) # link
    
    ## Send 0s TXB
    AFE.selectCh(2,1)
    AFE.FPGA.sendCustomData(0,r'C:\path\to\zeros.txt') # send 0s
    AFE.adcDacSync(1)
    
    ## Send tone TXA/B
    amplA=-10 # amplitude in dBFS
    freqA=20 # frequency offset
    amplB=-10
    freqB=20
    AFE.selectCh(2,1) # will send the tone on TXAB
    AFE.FPGA.sendSingleTone(0,freqA,amplA,freqB,amplB) 
    
    ## Stop sending tone TXA/B
    amplA=-100
    freqA=20
    amplB=-100
    freqB=20
    AFE.selectCh(2,1)
    AFE.FPGA.sendSingleTone(0,freqA,amplA,freqB,amplB)
    
    ## Read/clear alarms
    info(CAFE.papAlarmStatus(0,1)) # read alarms
    CAFE.clearPapAlarms(0,1) # clear alarms

    waveforms.zip

    Below are my full step-by-step instructions on setting up the TSW14J58 EVM with the AFE79xx EVM. It sounds like you've gotten the FPGA connected to the PC, but I just want to give all the details here to make sure we aren't missing anything.

    1. Connect TSW14J58 EVM with AFE79xx EVM at the FMC connector, connect all USB ports to the PC.
    2. Power on the TSW14J58 EVM (I use 5.5V and limit 5A on my power supply). The current draw will initially be around 0.8A, but will increase to around 2A after a few seconds.
    3. Power on AFE79xx EVM (again, I use 5.5V and limit 5A).
    4. Open AFE79xx Latte.
      1. You can confirm that Latte sees the TSW14J58 FPGA by clicking View → USB Handles:


        You should see something like this, with 4 USB handles for the AFE and 4 USB handles for the J58:
    5. Run setup.py and devInit.py as before.
    6. Add a script and paste the new bringup script I have attached above.
      1. You can add a new script in Latte by right clicking on the "Profile" under the "Scripts" section of Latte, and clicking "Add script":


    7. Run the new bringup script. If all goes well, you will see the following printed to the log:


    8. Add another script and paste the send waveforms script I have attached above.
    9. Try running blocks of code in the send waveforms script to send different waveform/tones and read/clear PAP alarms.

    I hope this helps! Please let me know if you are able to get this working or if you run into any issues and need some extra assistance. 

    Thanks,

    Aman

  • Hi Aman,

    Thank you very much for your instruction. It works with the new EVM we got. When the PAP is enabled and the waveform is loaded, there is no output while the PAP is triggered.

    Next step is to test the PAP with the signal pattern we specified to optimize the parameters.

    What is the format of your waveform and what tool do you use to generate it?

    Thanks again.

    Best regards,

    Yinan

  • Hi Yinan,

    Good to hear that you can see PAP working on your side too!

    The waveform file contains columns of I and Q data, in the format [I Q I Q]. The 3rd and 4th columns are just a repetition of the first two columns.

    The waveform I shared with you is a 20 MHz bandwidth LTE waveform where I randomly flipped some of the MSBs to try and trigger the HPF of PAP. I used a waveform generator tool based on the MATLAB 5G Toolbox which can either generate 4G LTE or 5G waveforms. If you have a request for a certain waveform specification, I can see if I can generate this with our tool and share it with you.

    Thanks!

    Aman

  • Hi Aman,

    I see. Could you please generate a Tetra tone for me? With the frequency and level configurable, like the single tone script. 

    And the waveform you send me is a wideband signal which is also needed for the test, but could I change the center frequency and the level of it?

    Thank you.

    Best regards

    Yinan

  • Hi Yinan,

    I'm sorry but unfortunately I don't have a way of generating a Tetra tone. I only have a way to generate 4G/5G waveforms with different bandwidth/center frequency. I'm not very familiar with Tetra tones, but I can generate an "aggregate" 4G/5G waveform with different bandwidth/carrier spacing, will this allow you to create something similar to the Tetra tone? 

    I will have to figure out internally which is the best way to share these waveforms with you - for now, if you have a specification for a wideband signal that you would like to use for testing (center frequency/level), please let me know and I will see if I can provide this.

    Thanks,

    Aman

  • Hi Aman,

    The problem is that 4G/5G signal is quite wideband. The single tone tetra signal is with 25KHz bandwidth and crest factor 3 dB. Do you have a way to generate this kind of narrow band signal?

    Meanwhile, the wideband signal like the signal you provide is also useful if the frequency is changable. Could you provide a way that I could adjust the frequency/level  myself?

    Now I am testing the HPF detector with CW at sweeping frequency, to check the PFIR filter frequency response. However, it seems that the HPF detector does not respond to CW, but only response to the wideband signal like the one you send me. This resolved my issue According to the application note, it should not be like this. Could you please advice?

    Thank you.

    Best regards

    Yinan

  • Hi Yinan,

    Please see my responses below.

    The problem is that 4G/5G signal is quite wideband. The single tone tetra signal is with 25KHz bandwidth and crest factor 3 dB. Do you have a way to generate this kind of narrow band signal?

    I'm sorry, but unfortunately I do not have a way to generate this type of signal.

    Meanwhile, the wideband signal like the signal you provide is also useful if the frequency is changable. Could you provide a way that I could adjust the frequency/level  myself?

    Yes, I have a way to do this. I will coordinate with Rosario to provide this to you.

    Now I am testing the HPF detector with CW at sweeping frequency, to check the PFIR filter frequency response. However, it seems that the HPF detector does not respond to CW, but only response to the wideband signal like the one you send me.

    I think this may come down to a question of tuning the HPF parameters. As we had discussed, this is generally not the use-case of the HPF detector (we usually use this detector to catch bit errors in the MSBs), but I agree that the application note would suggest that the HPF detector should theoretically be able to detect tones at higher frequencies. Because of this, I unfortunately don't have much more guidance/experience to offer in tuning the HPF detector to trigger on these higher frequency tones.

    The only other suggestion I can think of outside the PAP parameters you are tuning is that we have a register to disable the averaging of the HPF detector. You can try the following register write to use the instantaneous filter output rather than the averaged:

    ## Use the instantaneous filter output
    ch = 1                              # 0=A, 1=B, 2=C, 3=D
    device.writeReg(0x19, 0x1<<ch)      # open page
    device.writeReg(0x569, 0x1)         # use instantaneous filter output
    device.writeReg(0x19, 0)            # close page
    
    
    ## Use the averaged filter output
    ch = 1                              # 0=A, 1=B, 2=C, 3=D
    device.writeReg(0x19, 0x1<<ch)      # open page
    device.writeReg(0x569, 0)           # use averaged filter output
    device.writeReg(0x19, 0)            # close page

    Thanks,

    Aman

  • Hi Aman,

    Thank you for your information. Did you also check the CW with your setup?

    Best regards

    Yinan

  • Hi Aman,

    Now I am integrating the PAP in our system. The code is same as what I use on the Evaluation board, but it is not triggered in our system.

    The PAP is tested alone on the evaluation board, but in our system the AGC ALC is enabled. Is there anything need to take care of, when these functions run at the same time?

    Or is there any other possibilties?

    Best

    Yinan

  • Hi Yinan,

    I don't think there should be any special configuration needed when using PAP and AGC/ALC at the same time. Have you observed PAP triggering on the EVM when including the AGC/ALC configuration?

    There may be another layer of masking preventing the alarms from going through to trigger PAP, I will have to dig a little deeper into this and get back to you.

    Thanks,

    Aman

  • Hi Aman,

    Now the PAP is running on our system and I will check the limits setting with some measurements. 

    Best

    Yinan

  • Hi Yinan,

    Thank you for the update, glad to hear PAP is running on your system!

    Thanks,

    Aman

  • Hi Yinan,

    Following up on our discussion - I have also so far been unable to see PAP triggering from single tones sent via JESD from our FPGA. I was wondering if you were able to observe any difference here? Or do you still observe the same behavior we discussed on our last call?

    Thanks!

    Aman

  • Hi Aman,

    Yes, it is still like that. It is good that you see it as well. It seems there are some hidden signal processing steps which are not clear for us.

    Best

    Yinan