Wiki

This version (29 Apr 2024 17:52) was approved by Andrei Grozav.

Jupiter_SDR MCS setup

WORK IN PROGRESS

Hardware requirements

  • 1x Main machine running Linux - it's goal is to control and process data from others, through Ethernet(ssh)
  • 2x jupiter_sdr + USB C Power supply (5V/3A, 9V/3A) if PoE is not available.
  • 2x SD card(min 32G) for jupiter_sdr
  • 1x Synchrona + ADD-ON Voltage Translation Board + 12V Power Supply
  • 1x Ethernet Router
  • 3x Ethernet cables
  • 3x Micro-USB (UART)
  • 9x SMA cables
    • 4x SMA cables of same length and type for > 6GHz (splitter to Jupiter_sdr Rx)
    • 4x SMA cables for of same length and type for > 6GHz (synchrona to jupiter)
    • 1x SMA cable (Jupiter_sdr Tx to splitter input)
We chose to use Synchrona for clock and MCS requests. If you have a different sync setup the constraints are:
1. Clocks and MCS requests should be generated from the same source for both systems
2x 30.72 MHz, (LVPECL)
2x MCS pulse, at request (LVPECL)


2. The trace length should be equal for all paths.

Setup

  1. Write the latest Kuiper image on the SD cards
  2. Copy on the SD cards boot partition, the provided boot files for MCS sync (Image, system.dtb, BOOT.BIN)
  3. Copy the provided profiles files on the rootfs partition in /home/analog/Documents/Filters. This step can be done after the system boots, through other means(ssh), if you prefer.
  4. Power on and configure the Synchrona by loading the devicetree. See the Synchrona config section.
  5. Connect all SMAs as in the diagram below
  6. The reference clock from the signal generator(Synchrona) must be correctly configured, connected, and running before the next step.
  7. Insert the SD cards and power up the jupiter_sdrs.
  8. You need all 4 machines(Main, jupiter_xdr, Synchrona) in the same LAN network, even if a DHCP server is not present.
  9. Using a UART terminal, read the IP addresses of the Jupiter_sdrs and synchrona. By entering “ifconfig” in their UART console.
  10. From the main machine, ssh on both jupiters and Synchrona(signal gen). E.g. “ssh root@192.168.1.4”. This step is only required in the beginning, to add the subordinates in the known_hosts list on your main machine.
  11. On the main Linux machine, make sure you have installed:
    1. sshpass and that you are running the script from a bash shell.
    2. python3 with packages
      1. time
      2. csv
      3. numpy
      4. matplotlib
  12. On the main Linux machine extract the jupiter_mcs_scripts.zip archive from the Resources section.
  13. Enter in the folder with the extracted scripts.
  14. Add the subordinate IPs in the config_ip.sh script.
  15. Run main_test.sh by entering in a shell terminal “./main_test.sh” from the extracted folder location

Setting Synchrona for MCS setup

  1. Power up the system/Wait for it to boot(1m).
  2. Using a UART terminal, read the IP address of the Pi(synchrona). Enter ifconfig
  3. Copy the device-tree rpi-ad9545-hmc7044.dtbo on the synchrona SD card via scp (or locally on a different machine)
  4. Write the device-tree rpi-ad9545-hmc7044.dtbo in folders below. Loading the devicetree object in the GUI might get the desired frequency but it will not wait for a synq request.
    • boot partition - /boot/overlays
    • root fs - /home/analog/sync
  5. Reboot Synchrona
  6. To check if the configuration was set, after reboot, you can enter in a browser enter the IP address. In the GUI that will open in browser, log in with User ”admin”, pass: “analog”
Connections to Jupiter SDR
  • ch9_p and ch10_p are the reference clock(30.72MHz) - LVPECL
  • ch5_p and ch8_p are used for MCS request synchronization. - LVPECL
  • ch5_n, ch8_n, ch9_n and ch10_n should be terminated with a 50 ohm SMA connector load.
In the first diagram Jupiters are provided with reference clock from Synchrona channels 1 and 2. Which is not correct. Since those channels are LVDS not LVPECL

In case any of the above steps fail, or you want more info have a look at: https://wiki.analog.com/resources/eval/user-guides/ad-synchrona14-ebz

If your Synchrona does not boot. Write a new SD card with the latest image from https://wiki.analog.com/resources/eval/user-guides/ad-synchrona14-ebz/testing

Insert it into the Synchrona’s raspberry Pi and power up the system.

By default the IP is static. 192.168…. So, you must enable the dhcp by running the script: /linux_image_ADI-scripts/enable_dhcp.sh

Reboot and start from point 1. above.

Expected results

Click to display ⇲

Click to hide ⇱

[jupiter_mcs_scripts]$ ./main_test.sh 
Steps:
 >> 1. prep -> 2. sync -> 3. post -> 4. adrv9002 fifo sync -> 5. conf_DMA_sync -> 6. pulse -> 7. measure -> reboot <<
 Script arguments: 1, 2, 3, 4, 5, 6, 7, reboot, loopback
How to use:
./main_test           - runs every step
./main_test loopback  - runs every step in rx-tx internal looback mode
./main_test 5 6 7     - runs only steps 5, 6 and 7
 
------------------------------------------------------------
1. mcs_pre
loading profile on 192.168.1.2
calibrated
calibrated
calibrated
calibrated
1
loading profile on 192.168.1.3
calibrated
calibrated
calibrated
calibrated
waiting for 6 pulses
1
 
------------------------------------------------------------
3. sync request
 
------------------------------------------------------------
3. mcs_post
MCS done on 192.168.1.2
MCS done on 192.168.1.3
rf_enabled
rf_enabled
rf_enabled
rf_enabled
rf_enabled
rf_enabled
rf_enabled
rf_enabled
 
------------------------------------------------------------
4. configure adrv9002 internal fifo delays
calc and config tx path delays
192.168.1.2 tx0_mcs_strobe_delay = 5 
192.168.1.2 tx1_mcs_strobe_delay = 4 
192.168.1.3 tx0_mcs_strobe_delay = 5 
192.168.1.3 tx1_mcs_strobe_delay = 4 
 
Calculated
sampleDelay = 3 - for all jupiters
 
Jupiter 192.168.1.2 
readDelay_tx0 = 5 
readDelay_tx1 = 5
Jupiter 192.168.1.3 
readDelay_tx0 = 5 
readDelay_tx1 = 5
Calc and config rx path delays
192.168.1.2 rx0_mcs_strobe_delay = 0x6 
192.168.1.2 rx1_mcs_strobe_delay = 0x6 
192.168.1.3 rx0_mcs_strobe_delay = 0x6 
192.168.1.3 rx1_mcs_strobe_delay = 0x6 
 
Calculated
sampleDelay = 5 - for all jupiters
 
Jupiter 192.168.1.2 
readDelay_rx0 = 4 
readDelay_rx1 = 4
Jupiter 192.168.1.3 
readDelay_rx0 = 4 
readDelay_rx1 = 4
 
------------------------------------------------------------
5. configure Tx DDS and RX for data sync
499695
499695
499695
499695
499695
499695
499695
499695
arm Rx DMA and DDS cores
loop arm 192.168.1.2
loop arm 192.168.1.3
Capture system data: (ip:192.168.1.2)
Capture system data: (ip:192.168.1.3)
 
------------------------------------------------------------
2. sync request
0
 
------------------------------------------------------------
7. Measuring
process samples
main_test.sh DONE!

A window with a python plot will appear.

After closing the window you will get in terminal and in a log.csv file the phase difference measurement values.

[jupiter_mcs_scripts]$ 
Phase diff - RX1 Device1 to RX1 Device2  1.6944253269098417
Phase diff - RX1 to RX2 on Device1 9.565037852718513
Phase diff - RX2 Device1 to RX2 Device2  4.444597384721266
Phase diff - RX1 to RX2 Device2 6.814865794907089

Available scripts description

main_test.sh - Main bash script. Can be run with arguments like the step number to execute, reboot and loopback. The loopback is used to better overserve the digital interface(HDL-ADRV9002) behavior.

config_ip.sh - Set the IPs of the used systems

autolog.sh - Can be used to call the main_test.sh for a specified number of times as argument. It also clears the log.csv file when it is called to have a clean log.

set_psu_gpio.sh - Set PS8 gpios in Linux.

DMA_sync_config.sh - Arms the Rx and Tx cores

jupiter_sdr_rx_fifo_sync.sh - Read and calculate the ADRV9002 internal RX FIFOs delays for a perfectly aligned transfer (WORK IN PROGRESS).

jupiter_sdr_tx_fifo_sync.sh - Read and calculate the ADRV9002 internal TX FIFOs delays for a perfectly aligned transfer (WORK IN PROGRESS).

systems_are_up.sh - Just a check to see that all Jupiters are up after a reset

mcs_pre.sh - Getting ready for MCS procedure

post_mcs.sh - Settings after MCS procedure

plot.py - Python script use to interpret and plot data. Max two jupiters

Description of key aspects

The clock and MCS request generated by synchrona are driving the jupiter_sdr downstream. The 6 MCS pulses required by adrv9002 are generated in HDL and have characteristics defined in software by the user.

The MCS procedure is not enough to synchronize the systems. After MCS we will have synchronized clocks and LOs. Each Rx channel has in independent SSI reference clock driving the data path up to a DMA. Meaning, for this e.g. to synchronize a reception, we have to synchronize 4 DMAs across 2 systems. This is done with a sync_req from Synchrona. The sync_request will generate a trigger pulse in the HDL MCS sync logic, dedicated for the transmission steps. Which will release the armed Rx DMAS on the start_sync DMA feature/signal.

A more in-depth diagram can be found below.

The Tx receives the same trigger signal, which releases the cores from the armed state.

Debugging

If the messages you are getting are not relevant. Open the script and run commands step by step, from the last step that worked, if possible.

Sometimes the devices remain in a bad state and you need to do a reboot of the jupiter_sdr. You can do it by entering “./main_test.sh reboot”

At step 4. configure adrv9002 internal fifo delays. The Rx delay measurement in HDL randomly presents a bad measurement (WORK IN PROGRESS), resulting in a faulty configuration, which will cause the capture to fail. Case in which you have to rerun the MCS procedure from step one or reboot the jupiter_sdrs.

Click to display ⇲

Click to hide ⇱

192.168.1.2 rx0_mcs_strobe_delay = 0x17f
192.168.1.2 rx1_mcs_strobe_delay = 0x6 
192.168.1.3 rx0_mcs_strobe_delay = 0x6 
192.168.1.3 rx1_mcs_strobe_delay = 0x6 

Calculated
sampleDelay = 5 - for all jupiters

Jupiter 192.168.1.2 
readDelay_rx0 = 381 
readDelay_rx1 = 381
bash: line 1: echo: write error: Invalid argument
bash: line 1: echo: write error: Invalid argument
Jupiter 192.168.1.3 
readDelay_rx0 = 381 
readDelay_rx1 = 381
bash: line 1: echo: write error: Invalid argument
bash: line 1: echo: write error: Invalid argument

------------------------------------------------------------
5. configure Tx DDS and RX for data sync
499695
499695
499695
499695
499695
499695
499695
499695
arm Rx DMA and DDS cores
loop arm 192.168.1.2
loop arm 192.168.1.3
Capture system data: (ip:192.168.1.2)
Capture system data: (ip:192.168.1.3)

------------------------------------------------------------
2. sync request
0

------------------------------------------------------------
7. Measuring
Waiting for device 192.168.1.2 rx1 sample data
Waiting for device 192.168.1.2 rx1 sample data
Waiting for device 192.168.1.2 rx1 sample data
Waiting for device 192.168.1.2 rx1 sample data
Unable to refill buffer: Connection timed out (110)
process samples
main_test.sh DONE!
[mcs_sync_public]$ Traceback (most recent call last):
  File "/media/data/work/jupiter_mcs_scriptsplot.py", line 141, in <module>
    a, b, c, d = read_data(test_location, plot_or_save_n, loopback)
  File "/media/data/work/jupiter_mcs_scriptsplot.py", line 59, in read_data
    rx1rx2 = measure_phase(data1[0][start_msr_fr_samp:stop_msr_at_samp], data2[0][start_msr_fr_samp:stop_msr_at_samp])
  File "/media/data/work/jupiter_mcs_scriptsplot.py", line 13, in measure_phase
    assert len(chan0) == len(chan1)
AssertionError

Notes

SSI - source synchronous interface

Tips

If you can connect the systems to a LAN which has DHCP server, it is recommended to do so. Other wise you can use a switch and set static IPs. On each ADI SD card with Kuiper image you will find a folder in the root file system, which you can go to after bowering up the system.

cd /linux_image_ADI-scripts

If you get a static IP and are expecting one from your network, call script:

./enable_dhcp.sh

If you need a static IP, you can set the system for a desired IP by calling:

 enable_static_ip.sh 192.168.1.100 eth0 

Known issues

  1. Step 4 of the scripts is not 100% reliable.
  2. There is a +/- 1 sample delay between channels from MCS to MCS.

The above issues are related and on the todo list.

Resources

Latest work on:

resources/eval/user-guides/jupiter_sdr/mcs.txt · Last modified: 29 Apr 2024 17:51 by Andrei Grozav