LimeSDR XTRX PLL Clock TX Configuration Error

Hello,

we are trying to configure the LimeXTRX with limesuiteNG.

We did some tests on the dualRXTX example and found out, that the PLL clock configuration for the TX does not succeed if the sampling rate is higher than a threshold. We found this behavior to occur upon sampling more than 20MHz. At 10MHz, no issue occurs.

We notice that RX works fine in any case, i.e., its PLL can be configured in any case regardless of the sampling frequency, while this is not the case with TX: There the PLL clock 1 is reporting some error in register 0x0021 and setting the error bits to 0x0008.

We attach the logs below for the 20MHz example. We used the provided documentation for the XTRX gateware from LimeSDR-XTRX_GW/doc/LimeSDR-XTRX_1v2_GW_User_Manual_v1.00.pdf at master · myriadrf/LimeSDR-XTRX_GW · GitHub but could not follow the output. Are we messing up with lookup in the reference?

DeviceRegistry Added: FX3
DeviceRegistry Added: FTDI
DeviceRegistry Added: LitePCIe
Devices found :
0: LimeXTRX0, media=PCIe, addr=/dev/LimeXTRX0_control, serial=0000000000000000

Configuring device ...
SetFrequencySXR, (3500.000 MHz)INT 130, FRAC 645277, DIV_LOCH 0, EN_DIV2_DIVPROG 1
Expected VCO 7000.00 MHz, RefClk 26.00 MHz
Tuning VCOL :
TuneVCO(SXR) ICT_VCO: 192
TuneVCO(SXR) - attempted VCO too low
VCOL : failed to lock
Tuning VCOM :
TuneVCO(SXR) ICT_VCO: 192
TuneVCO(SXR) - attempted VCO too low
VCOM : failed to lock
Tuning VCOH :
TuneVCO(SXR) ICT_VCO: 192
TuneVCO(SXR) - searching interval [0:128]
binary search:
csw=64  cmphl=0
csw=96  cmphl=0
csw=112 cmphl=0
csw=120 cmphl=2
csw=124 cmphl=2
csw=126 cmphl=2
csw=127 cmphl=2
adjust with linear search:
csw=119 cmphl=0
CSW: lowest=120, highest=127, will use=123
TuneVCO(SXR) - searching interval [128:256]
binary search:
csw=192 cmphl=3
csw=160 cmphl=3
csw=144 cmphl=3
csw=136 cmphl=2
csw=140 cmphl=2
csw=142 cmphl=2
csw=143 cmphl=2
adjust with linear search:
csw=135 cmphl=2
csw=134 cmphl=2
csw=133 cmphl=2
csw=132 cmphl=2
csw=131 cmphl=2
csw=130 cmphl=2
csw=129 cmphl=2
csw=128 cmphl=2
CSW: lowest=128, highest=143, will use=135
CSW is locking in one continous range: low=120, high=143
TuneVCO(SXR) - confirmed lock with final csw=131, cmphl=2
VCOH : csw=131 tune ok
Selected: VCOH, CSW_VCO: 131
SetFrequencySXT, (3500.000 MHz)INT 130, FRAC 645277, DIV_LOCH 0, EN_DIV2_DIVPROG 1
Expected VCO 7000.00 MHz, RefClk 26.00 MHz
Tuning VCOL :
TuneVCO(SXT) ICT_VCO: 192
TuneVCO(SXT) - attempted VCO too low
VCOL : failed to lock
Tuning VCOM :
TuneVCO(SXT) ICT_VCO: 192
TuneVCO(SXT) - attempted VCO too low
VCOM : failed to lock
Tuning VCOH :
TuneVCO(SXT) ICT_VCO: 192
TuneVCO(SXT) - searching interval [0:128]
binary search:
csw=64  cmphl=0
csw=96  cmphl=0
csw=112 cmphl=0
csw=120 cmphl=2
csw=124 cmphl=2
csw=126 cmphl=2
csw=127 cmphl=2
adjust with linear search:
csw=119 cmphl=2
csw=118 cmphl=2
csw=117 cmphl=0
CSW: lowest=118, highest=127, will use=122
TuneVCO(SXT) - searching interval [128:256]
binary search:
csw=192 cmphl=3
csw=160 cmphl=3
csw=144 cmphl=3
csw=136 cmphl=2
csw=140 cmphl=2
csw=142 cmphl=2
csw=143 cmphl=2
adjust with linear search:
csw=135 cmphl=2
csw=134 cmphl=2
csw=133 cmphl=2
csw=132 cmphl=2
csw=131 cmphl=2
csw=130 cmphl=2
csw=129 cmphl=2
csw=128 cmphl=2
CSW: lowest=128, highest=143, will use=135
CSW is locking in one continous range: low=118, high=143
TuneVCO(SXT) - confirmed lock with final csw=130, cmphl=2
VCOH : csw=130 tune ok
Selected: VCOH, CSW_VCO: 130
INT 88, FRAC 835634, DIV_OUTCH_CGEN 18
VCO 2334.72 MHz, RefClk 26.00 MHz
ICT_VCO_CGEN: 16
csw 161; interval [157, 165]
RxLPF modifying G_PGA_RBB 31 -> 12
RxLPF(0): TIA_C=0, TIA_RCOMP=15, TIA_CCOMP=0, RX_L_C=0, RX_H_C=0

RxLPF bypassed
TxLPF bypassed
INT 88, FRAC 835634, DIV_OUTCH_CGEN 18
VCO 2334.72 MHz, RefClk 26.00 MHz
ICT_VCO_CGEN: 16
csw 160; interval [157, 163]
RxLPF modifying G_PGA_RBB 31 -> 12
RxLPF(0): TIA_C=0, TIA_RCOMP=15, TIA_CCOMP=0, RX_L_C=0, RX_H_C=0

RxLPF bypassed
TxLPF bypassed
Sampling rate set(20.000 MHz): CGEN:160.000 MHz, Decim: 2^1, Interp: 2^1
INT 97, FRAC 483958, DIV_OUTCH_CGEN 7
VCO 2560.00 MHz, RefClk 26.00 MHz
ICT_VCO_CGEN: 16
csw 201; interval [198, 205]
Rx calibrate ch.A @ 3500 MHz, BW: 20 MHz, RF input: LNAW, PGA: 12, LNA: 15, TIA: 3
Rx DC auto   I:  35, Q:  63, -31.0 dBFS
Rx DC manual I:  34, Q:  63, -31.0 dBFS
RxTSP DC corrector enabled -34.3 dBFS
Initial gains:  G_RXLOOPB:  2, CG_IAMP:  1 | -75.012 dBFS
Adjusted gains: G_RXLOOPB: 14, CG_IAMP: 62 | -30.519 dbFS
Signal strength (-30.5 dBFS) low, expected to be more than (-30.0 dBFS), loopback not working?
Rx calibration failed
Rx ch0 DC/IQ calibration failed: Loopback signal weak: not connected/insufficient gain?
Tx ch.A , BW: 20 MHz, RF output: BAND2, Gain: 63, loopb: internal
Rx DC auto   I:  34, Q:  63, -31.7 dBFS
Rx DC manual I:  26, Q:  63, -32.2 dBFS
RxTSP DC corrector enabled -76.8 dBFS
Receiver saturation search, target level: 20480 (-12.868 dBFS)
initial  PGA:  0, RXLOOPB:  7, -43.81 dbFS
adjusted PGA: 25, RXLOOPB: 15, -14.12 dBFS
Rx DC auto   I:  26, Q:  63, -6.8 dBFS
Rx DC manual I:  26, Q:  63, -6.9 dBFS
RxTSP DC corrector enabled -56.0 dBFS
#0 Tx DC manual I: -216, Q:  136, -50.9 dBFS
#1 Tx DC manual I: -272, Q:  200, -59.6 dBFS
#2 Tx DC manual I: -280, Q:  202, -59.5 dBFS
#0 Tx IQCORR: -128, -35.6 dBFS
#1 Tx GAIN_I: 1541, -44.3 dBFS
#2 Tx IQCORR: -144, -46.5 dBFS
Tx | DC   | GAIN | PHASE
---+------+------+------
I: | -280 | 1541 | -144
Q: |  202 | 2047 |
Calibrate Tx duration: 463 ms
Rx calibrate ch.B @ 3500 MHz, BW: 20 MHz, RF input: LNAW, PGA: 12, LNA: 15, TIA: 3
Rx DC auto   I:   0, Q:  63, -21.2 dBFS
Rx DC manual I:  -8, Q:  63, -21.9 dBFS
RxTSP DC corrector enabled -71.5 dBFS
Initial gains:  G_RXLOOPB:  2, CG_IAMP:  1 | -78.267 dBFS
Adjusted gains: G_RXLOOPB: 14, CG_IAMP: 62 | -33.836 dbFS
Signal strength (-33.8 dBFS) low, expected to be more than (-30.0 dBFS), loopback not working?
Rx calibration failed
Rx ch1 DC/IQ calibration failed: Loopback signal weak: not connected/insufficient gain?
Tx ch.B , BW: 20 MHz, RF output: BAND2, Gain: 63, loopb: internal
Rx DC auto   I:  -8, Q:  63, -28.9 dBFS
Rx DC manual I:  -6, Q:  63, -28.9 dBFS
RxTSP DC corrector enabled -78.3 dBFS
Receiver saturation search, target level: 20480 (-12.868 dBFS)
initial  PGA:  0, RXLOOPB:  7, -47.21 dbFS
adjusted PGA: 25, RXLOOPB: 15, -17.27 dBFS
Rx DC auto   I:  -6, Q:  63, -5.3 dBFS
Rx DC manual I: -10, Q:  63, -5.6 dBFS
RxTSP DC corrector enabled -52.0 dBFS
#0 Tx DC manual I:  -25, Q:   16, -65.5 dBFS
#1 Tx DC manual I:  -28, Q:   30, -67.3 dBFS
#2 Tx DC manual I:  -20, Q:   23, -63.7 dBFS
#0 Tx IQCORR: 128, -40.9 dBFS
#1 Tx GAIN_Q: 1693, -43.8 dBFS
#2 Tx IQCORR: 144, -45.3 dBFS
Tx | DC   | GAIN | PHASE
---+------+------+------
I: |  -20 | 2047 | 144
Q: |   23 | 1693 |
Calibrate Tx duration: 467 ms
FPGA::SetInterfaceFreq tx:40.000 MHz rx:40.000 MHz channel:0
FPGA SetPllFrequency: PLL[1] input:40.000 MHz clockCount:2
CLK[0] Fout:40.000 MHz bypass:0 phase:139.06 findPhase: 0
CLK[1] Fout:40.000 MHz bypass:0 phase:139.06 findPhase: 1
FPGA PLL[1] M=32, N=1, Fvco=1280.000 MHz (Requested 1280.000 MHz)
FPGA PLL[1] PLLCFG_START
FPGA PLL[1] PLLCFG_START done
PLL Clock[0] PHCFG_START
PLL Clock[0] PHCFG_START done
PLL Clock[1] PHCFG_START
PLL Clock[1] PHCFG_START done
FPGA SetPllFrequency: PLL[0] input:40.000 MHz clockCount:2
CLK[0] Fout:40.000 MHz bypass:0 phase:90 findPhase: 0
CLK[1] Fout:40.000 MHz bypass:0 phase:90 findPhase: 1
FPGA PLL[0] M=32, N=1, Fvco=1280.000 MHz (Requested 1280.000 MHz)
FPGA PLL[0] PLLCFG_START
FPGA PLL[0] PLLCFG_START done
PLL Clock[0] PHCFG_START
PLL Clock[0] PHCFG_START done
PLL Clock[1] PHCFG_START
PLL Clock[1] PHCFG_START error, reg:0x0021=0x000D, errorBits:0x0008
PLL Clock[1] PHCFG_START done
SDR configured in 1848ms
StopStreaming
/dev/LimeXTRX0_trx0 usePoll:1 rxSamplesInPkt:256 rxPacketsInBatch:3, DMA_ReadSize:6192, batchSizeInTime:0us

Stream0 samplesInTxPkt:256 maxTxPktInBatch:3, batchSizeInTime:infus
StopStreaming
ResetTimestamp
SetOSThreadPriority: Failed to set priority(6), schec_prio(1), policy(1), ret(99)
SetOSThreadPriority: Failed to set priority(6), schec_prio(1), policy(1), ret(99)
StartStreaming
Stream started ...
Total samples received: 19997696  signal amplitude: 0.03898  total samples sent: 19997696
/dev/LimeXTRX0_trx0 Tx: 160.763 MB/s | TS:20061952 pkt:78114 o:0 shw:26038/25964(+74) u:0(+0) l:0(+0) tsAdvance:+54016/+62865/+64768, f:0
/dev/LimeXTRX0_trx0 Rx: 161.264 MB/s | TS:19998720 pkt:78120 o:0(+0) l:0(+0) dma:26040/26044(4) swFIFO:0
/dev/LimeXTRX0_trx0 Tx: 161.252 MB/s | TS:40062208 pkt:156240 o:0 shw:52080/52006(+74) u:0(+0) l:0(+0) tsAdvance:+40960/+62878/+64768, f:0
Total samples received: 39998464  signal amplitude: 0.0380264  total samples sent: 39998464
/dev/LimeXTRX0_trx0 Rx: 161.264 MB/s | TS:40000512 pkt:156252 o:0(+0) l:0(+0) dma:52084/52088(4) swFIFO:0
/dev/LimeXTRX0_trx0 Tx: 161.252 MB/s | TS:60062464 pkt:234366 o:0 shw:12586/12512(+74) u:0(+0) l:0(+0) tsAdvance:+53248/+63064/+64768, f:0
Total samples received: 59999232  signal amplitude: 0.0410621  total samples sent: 59999232
/dev/LimeXTRX0_trx0 Rx: 161.240 MB/s | TS:60002304 pkt:234384 o:0(+0) l:0(+0) dma:12592/12592(0) swFIFO:2

Thank you very much for your help and time!

Just to check, is this the same issue posted to the tracker:

?

Correct, we figured that the issue might be related and thus asked for reference. At least it came up in subsequent tests.

1 Like

Thanks, just so we know this is not a separate issue.

Hello again,

we were asking in the Github issue about flashing the LimeSDR XTRX with Vivado 2022 via JTAG and were advised to ask here. Specifcally, we are unsure about the steps presented in GitHub - myriadrf/LimeSDR-XTRX_GW: LimeSDR XTRX gateware project. to program the FPGA of the LimeSDR if it cannot be programmed via limeFLASH.

We followed specifically these steps:

  • Connect USB-C for power
  • Use Vivado 2022 standard with Atrix 7 included
  • Connect the 6 pins of JTAG to our programmer
  • Open Hardware Manager → Auto connect

Any insights on what might be going wrong would be immensely helpful. Thanks for your efforts!

The forums are used for support and should be the first port of call, only logging issues on the tracker when a bug has been identified.

Tagging @VytautasB, who should be able to help.

Hello @sens118,

not sure if I understand what issue are you facing when programming FPGA via JTAG?

As described in GitHub repo you will need PCIe Adapter to access JTAG chain, because LimeSDR-XTRX itself does not have JTAG header, only exposed pads.

When you have JTAG cable connected - it is standard programming procedure in Vivado software as for any other Xilinx device.

Thanks for the reply! We managed to flash the gateware via JTAG with openFPGAloader at GitHub - trabucayre/openFPGALoader: Universal utility for programming FPGA.

Our procedure is as follows:

  1. We use a CH347 programmer to perform JTAG programming https://akizukidenshi.com/goodsaffix/ch347.pdf.2
  2. We install openFPGAloader:
  3. We connect the correct pins to the CH347
  4. We run the following command:
openFPGALoader -c ch347_jtag -b xtrx -f ../flash_programming_file.bin

This way we flashed the gateware with a given bitstream. We were able to flash the latest bitstream without any problems.

Thanks again for the help!

1 Like