Académique Documents
Professionnel Documents
Culture Documents
Perseus Examples
November 2014
Revision History
Revision
Date
Comments
1.0
December 2012
1.1
February 2013
1.2
February 2013
Section change
1.3
March 2013
1.4
March 2013
1.5
June 2013
Added MIMO 4x4 Gigabit Ethernet support and PCI Express Record/Playback and streaming examples
1.6
September 2013
1.7
June 2014
1.8
November 2014
ii
Table of Contents
Radio420 RTDEx Record/Playback Example (BSDK) for Windows 7 (64 Bits) and Linux (32
and 64 Bits) on Gigabit Ethernet and PCI Express ........................................................... 14
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
2.12
2.13
2.14
2.15
iii
iv
List of Figures
vi
Radio420Perseus Examples
This example aims to illustrate how to interface the Perseus with the Radio420X FMC. It demonstrates an RF
loopback performed at various frequencies, viewing the TX and RX data signals in ChipScope Pro. The example
handles either a SISO configuration (Radio420s) or a MIMO configuration (Radio420m).
Custom Register 1 selects the operating mode of LimeDataMux. When 0, the ADC data is sent back to the DAC,
when 1, the DDS 1 output data is sent to the DAC and finally when 4, the sum of DDS1 and DDS2 outputs is sent to
the DAC.
Custom Register 0 and Custom Register 2 must be used to set DDS frequencies.
ChipScope Wrapper is used to demultiplex ADC and DAC IQ data. The generated ChipScope user clock is half the
rate of the radio design clock and is used to display I and Q data on different ChipScope channels.
Chipscope
Wrapper
Radio420 FMC 1
ADC I
ADC Q
DAC I
DAC Q
UserClk
Chipscope
Legend :
Radio Design Clk
Signals on Radio Design Clk
Chipscope User Clk
Signals on Chipscope User Clk
Signals on Axi Clk
DesignClkOutput
LimeDataMux
Clk
ADC
Data
ADC data
IQSel
ADC IQSel
FMC 1
DDS frequency 1
Custom
Register 0
DDS frequency 2
Custom
Register 2
Mux selector
Custom
Register 1
DAC
Data
DAC data
IQSel
DAC IQSel
Chipscope
Wrapper
Radio420 FMC 2
ADC I
ADC Q
DAC I
DAC Q
UserClk
Chipscope
DesignClkInput
LimeDataMux
Clk
ADC
Data
ADC data
IQSel
ADC IQSel
DDS frequency 1
DDS frequency 2
FMC 2
DAC
Data
DAC data
IQSel
DAC IQSel
Mux selector
1.1 Requirements
1.1.1 Software requirements
These are the software requirements to compile and run the example.
Windows example
1 Perseus
1 Perseus
1 Radio420s
1 Radio420m
1.2 Setup
1.2.1 Setup for execution on a PicoSDR
MMCX to SMA (RX)
Radio420
2
PicoDigitizer
Rout
Radio420
1
Signal
Generator
Spectrum
analyzer
JTAG
The following procedure must be performed to execute the examples on a PicoSDR system with an external PC.
To set up the example:
1.
Connect the FPGA JTAG pod to the computer and then the PicoSDR back panel.
Refer to the PicoSDR Users Guide documents for details about performing this operation.
MCH
MCH
SISO
configuration
MIMO
configuration
MMCX to SMA (RX)
Chassis
Radio420
2
Chassis
Perseus
JTAG
Perseus
Radio420
1
Signal
Generator
Rout
JTAG
Radio420
1
Spectrum
analyzer
Signal
Generator
Spectrum
analyzer
1.
2.
If not already done, connect the FPGA JTAG pod to the computer and then to the Perseus.
Refer to the FPGA JTAG pod documentation for details about performing this operation.
3.
If not already done, insert the Perseus into the TCA chassis.
Connect a MMCX to SMA (or MMCX to BNC) cable between the FMCRadio RX connector and the signal
generator.
2.
Connect a MMCX to SMA (or MMCX to BNC) cable between the FMCRadio TX connector and the spectrum
analyzer.
3.
If in MIMO configuration, connect the MMCX to MMCX cable between the Radio #1 FMC Rout connector and
the Radio #2 FMC Rin connector.
4.
This allows the two cards to use the same clock reference.
1.3 Procedure
To perform the test:
1.
2.
In Platform Studio, on the Project menu, click Project Options. Under General tab select your Target Device
matching your Perseus.
3.
4.
5.
In the Export to SDK/Launch SDK dialog box, click Export & Launch SDK.
6.
In the Workspace Launcher dialog box, next to Workspace, click the Browse button and select
[ADPROOT]\\examples_perseus6010\perseus6010_radio420x_loopback\sdk\workspace.
7.
Click OK.
8.
In Xilinx SDK, on the Project Explorer tab, there should be a hardware platform specification project named
edk_hw_platform.
9.
In the Xilinx SDK main window, on the File menu click New and click Xilinx Board Support Package.
10. In the Project name box, type the name of the new board support package:
For example, radio420_bsp.
11. In the Hardware Platform list, make sure that the radio420 hardware platform is selected.
20. Under Projects, make sure that the FMCRadioInit project is selected.
21. Click Finish.
The elf file is generated automatically.
At this point it is possible the build fails.
If so, on the Project Explorer tab, right-click the FmcRadioInit project and select Change Referenced BSP.
Select your Xilinx Board Support Package as the reference. The FMCRadioInit project will rebuild.
22. The following success message should be displayed in the console window:
ELF file: FMCRadioInit.elf
elfcheck passed.
Finished building: FMCRadioInit.elf.elfcheck
23. By default, the example application configures the Radio420X acquisition clock at 40 MHz and the RF carrier
clock at 943 MHz and 953 MHz for reception and transmission.
24. Start the Perseus card.
25. In the Xilinx main window, on the Tools menu, click Program FPGA.
26. In the Program FPGA dialog box, click the Program button.
27. In the main window, in the Project Explorer pane, right-click FMCRadioInit .elf [microblaze/be] (under
FMCRadioInit> Binaries).
28. On the contextual menu, point to Debug as and click Debug configurations.
29. In the Debug Configurations dialog box, in the left pane, double-click Xilinx C/C++ ELF.
2.
In the top left corner of the screen, click Open Cable/Search JTAG chain and click OK.
3.
4.
When ChipScope Pro prompts you to save the existing project, click No.
5.
Browse to the ChipScope Pro project file in the \perseus6010_radio420x_loopback\chipscope folder, select
radio420m_loopback.cpj (for MIMO) or radio420s_loopback.cpj (for SISO), and click Open.
6.
7.
8.
The spectrum analyzer should display a tone at 954 MHz (953 MHz LO + 1 MHz DDS).
9.
Click the Trigger Now and Display the Buffered Samples button (the T! button).
Alternately, on the Trigger Setup menu, click Trigger Immediate. Chipscope triggers the acquisition of samples
and displays them in the bus plot.
The Chipscope window should display a 1MHz tone for the ADC signals since the RX LO frequency is at 943 MHz.
The DAC signals are from the internal DDS configured at 1 MHz.
Note:
To trigger another acquisition of samples, click the T! button again. You may connect different antennas or
modify the distance between the antennas, and then repeat the test as many times as you need.
10
dac=38603
dac=38891
dac=39035
dac=39092
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
dac=39150
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
lock=0
0 ppb=
0 ppb=
0 dac=39150 lock=0
0 dac=39150 lock=1
cte is the cumulative sample error since the start of the algorithm
2.
The calibrations executed are the LO Leakage calibration and the Single Side Band calibration
3.
4.
You may now check the calibrated signal with a spectrum analyzer.
To set the example for a MIMO configuration, uncomment the MIMO definition and comment the SISO
definition in the main.c header.
When running the example, the console output should be the following:
Radio420m standalone MIMO test
Bottom FMC: Radio420 AXI FPGA core is present
Top FMC: Radio420 AXI FPGA core is present
Bottom FMC: Radio420 set as REV D...
Top FMC: Radio420 set as REV D...
Bottom Radio420 setup:
Resetting Hardware
Configuring PLL
- Reference frequency: 30720000 Hz
- Acquisition frequency: 40000000 Hz
- Lime frequency: 30720000 Hz
PLL is locked
Configuring Gain
Configuring Lime PLL
- RX Carrier Frequency: 943 MHz
- TX Carrier Frequency: 953 MHz
- Low band is used
Configuration done!
Top Radio420 setup:
Resetting Hardware
Configuring PLL
- Reference frequency: 30720000 Hz
11
2.
3.
Press enter to compensate the signal IQ gain and phase imbalance, RX RF front-end DC offset, and LO leakage.
4.
To change the FMC hardware revision used, modify the BOTTOMREV and TOPREV definitions in the main.c
header.
5.
To change the carrier frequency, modify the carrier frequency declarations at the beginning of the main
function in the main.c
For example change
unsigned tx_carrier_frequency = (unsigned) 953e6;
to
unsigned tx_carrier_frequency = (unsigned) 650e6;
12
6.
To change the Radio frequency from low band to high band, change the carrier frequency from
unsigned tx_carrier_frequency = (unsigned) 953e6;
to
unsigned tx_carrier_frequency = (unsigned) 2200e6;
7.
To change the Radio acquisition frequency, modify the acquisition_frequency declaration at the beginning of
the main function in the main.c.
For example change
acquisition_frequency = (unsigned) 40e6;
to
acquisition_frequency = (unsigned) 10.24e6;
A list of valid values for this field can be found in the description of the
E_FMCRADIO_DATARATE_REF_30_72MHZ enum in the fmc_radio_defines.h file.
Note:
The frequency configure by this parameter is the operating frequency of the RF chip of the Radio420. Since
the I and Q samples are interleaved, if you want a specific sampling frequency for I and Q signals, the
Radio420 operating frequency must be configured twice as fast.
The expected console result is:
Bottom Radio420 setup:
Resetting Hardware
Configuring PLL
- Reference frequency: 30720000 Hz
- Acquisition frequency: 10240000 Hz
- Lime frequency: 30720000 Hz
PLL in bypass
Configuring Gain
Configuring Lime PLL
- RX Carrier Frequency: 943 MHz
- TX Carrier Frequency: 953 MHz
Configuration done!
13
The Radio420X RTDEX and Record/Playback example illustrates how to record data from the Radio420X ADC and
how to playback data on the Radio420X DAC. The example handles either a SISO or a MIMO configuration. Figure
2-1 and 2-2 illustrate the example setup.
Record/ Playback
I
Q
ADC Data
Sync
Bottom
FMC
Gigabit
Ethernet or
PCIe
RTDEx
Record
I
Q
Radio420 core
DAC Data
Mem to
Host
Channel 0
TX
To and from
Host
Host to
Mem
Channel 0
RX
ADC Data
Top
FMC
I
Q
Radio420 core
DAC Data
I
Q
IQ Mux
Sync
Playback
I
Q
I Q
DDS
Generator
14
Gigabit
Ethernet or
PCIe
RTDEx
I
Q
ADC Data
Sync
Radio 1
Radio420 core
Channel 1
TX
I
Q
Channel 2
TX
I
Q
DAC Data
To and from
Host
I
Q
IQ Mux
ADC Data
Radio 2
Channel 1
RX
Sync
I
Q
Channel 2
RX
Radio420 core
I
Q
DAC Data
The synchronization blocks allow the user to synchronize the transmitter and receiver channels. On the
PicoSDR4x4, up to 4 TX and 4 RX channels can synchronized through AMC port 14. The blocks make sure the radio
data is written to memory or read from memory at the same time for all four channels.
A write of 1 to custom register 3 (address 0x71000024 of the MicroBlaze AXI-bus) will enable writes to the memory
on all channels, making sure the first sample written to the memory was sampled at the same time on all channels.
Custom register 4 (address 0x71000028 of the MicroBlaze AXI-bus) handles the synchronization of the
transmitters. The TX synchronization block verifies that all transmitters have data to send. To disable the
synchronization, write 0 to the register. To enable a MIMO 2x2 sync on a Radio420m stack, write 1 to the register.
To enable a MIMO4x4 synchronization on the PicoSDR4x4, write 2 to the register.
The MIMO 4x4 example is only supported on the PicoSDR and with GIgabit Ethernet RTDEx.
DDS output
DDS output -3 dB
DDS output -6 dB
15
16
2.7 Requirements
2.7.1 Software requirements
These are the software requirements to run and compile the example depending of the operating system used.
Windows example
PicoSDR with
embedded CPU
Perseus and
embedded PC in a
TCA chassis
1 PicoSDR2x2-E
1 Perseus
1 Perseus
1 Radio420s or Radio420m
1 Radio420s or
Radio420m
1 spectrum analyzer of up to
3.8 GHz
1 signal generator of up to
3.8 GHz
1 spectrum analyzer of up to
3.8 GHz
1 signal generator of up to
3.8 GHz
1 embedded PC running
Linux Fedora or Ubuntu
1 MicroTCA chassis with
its TCA Carrier Hub
(MCH)
1 FPGA JTAG pod1
computer with Xilinx
Impact (to operate the
FPGA JTAG pod)
2 MMCX to SMA or
MMCX to BNC cables
1 MMCX to MMCX cable
1 spectrum analyzer of
up to 3.8 GHz
1 signal generator of up
to 3.8 GHz
17
2.8 Setup
2.8.1 Setup for execution on a PicoSDR on an external PC
MMCX to SMA (RX)
Radio420
2
PicoSDR
Rout
Radio420
1
Signal
Generator
Spectrum
analyzer
The following procedure must be performed to execute the examples on a PicoSDR system with an external PC.
To set up the example:
1.
Connect the FPGA JTAG pod to the external PC and then the PicoSDR back panel.
Refer to the PicoSDR Users Guide documents for details about performing this operation.
2.
Connect the Gigabit Ethernet cable between the external PC and the PicoSDR back panel.
3.
Connect the PCI Express extension cable between the external PC and the PicoSDR back panel.
18
GigE
or
PCIe
Perseus
Rout
Radio420
1
Signal
Generator
Spectrum
analyzer
JTAG
The PicoSDR2x2-E contains an embedded PC and a Perseus. The following procedure must be performed to
execute the examples on a PicoSDR system with its embedded PC.
To set up the example:
1.
Connect the FPGA JTAG pod to the computer and then the PicoSDR back panel.
Refer to the PicoSDR Users Guide documents for details about performing this operation.
19
MCH
SISO
configuration
Chassis
GigE
Radio420
2
GigE
GigE
Radio420
1
Signal
Generator
GigE
Perseus
Perseus
MIMO
configuration
Rout
Radio420
1
Spectrum
analyzer
Signal
Generator
Spectrum
analyzer
JTAG
JTAG
1.
If not already done, install the Radio420s or Radio420m card on the Perseus.
2.
If not already done, connect the FPGA JTAG pod to the computer and then to the Perseus.
3.
Connect the Gigabit Ethernet cable between the MCHs front panel Ethernet connector and your PCs Gigabit
Ethernet network card.
4.
If not already done, insert the Perseus into the TCA chassis.
Refer to the FPGA JTAG pod documentation for details about performing this operation.
20
MCH
GigE
Or PCIe
GigE
Or PCIe
Embedded PC
Embedded PC
SISO
configuration
Chassis
GigE
Or
PCIE
Perseus
Radio420
1
Chassis
GigE
Or
PCIE
Signal
Generator
MIMO
configuration
Radio420
2
Perseus
Rout
Radio420
1
Spectrum
analyzer
JTAG
Signal
Generator
Spectrum
analyzer
JTAG
1.
2.
If not already done, connect the FPGA JTAG pod to the computer and then to the Perseus.
Refer to the FPGA JTAG pod documentation for details about performing this operation.
3.
If not already done, insert the Perseus into the TCA chassis.
Perseus B
Rout
Radio420
1
PicoSDR 4x4
Rout
Radio420
2
Perseus A
Rout
Radio420
1
JTAG
Signal
Generator
Spectrum
analyzer
GigE
or
PCIe
21
Connect a MMCX to SMA cable between the FMCRadio RX connector and the signal generator.
2.
Connect a MMCX to SMA cable between the FMCRadio TX connector and the spectrum analyzer.
3.
If in MIMO configuration, connect the MMCX to MMCX cable between Radio #1's FMC ROUT connector and
the Radio #2's FMC RIN connector.
This allows the two cards to use the same clock reference.
4.
If in MIMO 4x4 configuration, connect MMCX to MMCX cables between Radio #2's FMC ROUT connector and
the Perseus B's Radio #1' FMC RIN connector and between Perseus B's Radio #1 FMC ROUT connector and
Perseus B Radio #2 FMC RIN connector.
This allows the four cards to use the same clock reference.
5.
To compile the Gigabit Ethernet RTDEx example, open the Platform Studio project file in the
\perseus6010_radio420x_rtdex_record_playback\edk_gige\ folder.
2.
In Platform Studio, on the Project menu, click Project Options. Under General tab select your Target Device
matching your Perseus.
3.
4.
Once the Perseus is configured and has booted, power cycle the PC to allow it to enumerate the Perseus PCI
Express device.
2.
Validate the PCI Express link presence. Follow the instructions given in the Installing the PCI Express Drivers.pdf
document at the /documentation/pdf/Perseus location.
3.
Install the PCI Express driver on the host PC. Follow the instructions given in the Installing the PCI Express
Drivers.pdf document at the /documentation/pdf/Perseus location.
2.
3.
Browse to the ..\ perseus6010_radio420x_rtdex_record_playback \host\prj_win\ folder and select the file
named perseus6010_radio420x_rtdex_record_playback.sln.
The host software project opens and the hierarchy of the project appears in the Solution Explorer panel. If the
Solution Explorer panel is not visible, on the View menu click Solution Explorer.
4.
5.
6.
Specify the necessary application parameters for the host software in the
Launch_radio420x_rtdex_record_playback.bat file in the ADPROOT\examples_perseus6010\
perseus6010_radio420x_rtdex_record_playback\host\prj_win\ folder.
The application parameters are specific to the hardware used:
22
Argument 2 is the number of radios used in the test (enter 1 for a SISO test, 2 for a MIMO test and 4
for a MIMO 4x4 test).
The IP_ADDR_PERSEUS parameter contains the IP address of the Perseus port 0 (for example, 192.168.0.101).
The bytes of this address must be separated by periods.
For the example value above, the combined argument would be: SET IP_ADDR_PERSEUS=192.168.0.101.
Notes
The values presented here are for the example purposes; it is important to specify addresses for the
hardware actually used.
7.
8.
9.
23
2.
To build the example, run the following command in the Linux terminal.
sudo ./build_demo.sh
3.
4.
Specify the necessary application parameters for the host software in the
Launch_radio420x_rtdex_record_playback.sh. Change the IP address to match the address of the Perseus.
The application parameters are specific to the hardware used:
Argument 2 is the number of radios used in the test (enter 1 for a SISO test, 2 for a MIMO test and 4
for a MIMO 4x4 test).
5.
6.
7.
To start the example, run the following command in the Linux terminal.
sudo ./Launch_radio420x_rtdex_record_playback.sh
The test starts automatically.
24
SISO script
MIMO script
radio420s_rf_calibrate_demo
radio420m_rf_calibrate_demo
Data record
radio420s_record
radio420m_record
Data playback
radio420s_playback
radio420m_playback
PPS Sync
radio420x_ppssync
radio420x_ppssync
2.
Before running a script, open the associated .txt file (that is, radio420x_siso_record.txt) and replace the
Perseus IP address with a value that is compatible with your system configuration.
3.
To start the example, double-click associated batch file (that is, launch_radio420s_record.bat).
25
Browse to the
/opt/Nutaq/ADP/ADP_MicroTCA/sdk/examples/perseus6010_radio420x_rtdex_record_playback /host/cli
folder.
The folder contains multiple CLI scripts that can be used to test the Radio420X hardware and to record and
playback data. The following scripts can be run.
Test
SISO script
MIMO script
radio420s_rf_calibrate_demo
radio420m_rf_calibrate_demo
Data record
radio420s_record
radio420m_record
Data playback
radio420s_playback
radio420m_playback
PPS Sync
radio420x_ppssync
radio420x_ppssync
2.
Before running a script, open the associated .txt file (that is, radio420x_siso_record.txt) and replace the
Perseus IP address with a value that is compatible with your system configuration.
This is to allow the system to communicate with the Perseus.
3.
To start the example, launch the associated shell file (that is, launch_radio420s_record.sh) using the sudo
prefix
Example: sudo ./launch_radio420s_record.sh
26
The user must choose which test to execute. Once the choice is done, the Radio420 FMCs will be initialized.
27
28
29
30
cte is the cumulative sample error since the start of the algorithm
Once calibration is done (or skipped), the test previously chosen will execute.
31
After the test has run, the user can verify that a tone is present at 954MHz on the spectrum analyzer on all
initialized radios.
The DDS test send a FPGA generated tone on the radio DACs.
After the test has run, the user can verify that a tone is present at 954MHz on the spectrum analyzer on all
initialized radios. If RF calibration was executed, the power ratio between the tone signal (at 954MHz) and both the
local oscillator (at 953MHz) and the lower side band signal (at 952MHz) should be close to 48 dB.
32
Data is saved to the specified file in the batch or shell file, here called record.bin. In MIMO 4x4, data from each
Perseus is stored within a different file (record.binA and record.binB).
Plotting the recorded data in Matlab, the user should see a 1 MHz tone in the displayed FFT for all initialized radios
which were inputted the 944MHz signal.
To plot the received data using Matlab:
1.
2.
33
The playback test uses file playback_sinewave.bin which holds a generated sine waveform of 1MHz when sampled
at 40MHz (20MHz I and 20MHz Q).
When the continuous playback is selected, a tone should appear on the spectrum analyzer at 954 MHz. If RF
calibration was executed, the power ratio between the tone signal (at 954MHz) and both the local oscillator (at
953MHz) and the lower side band signal (at 952MHz) should be close to 48 dB.
Signal generator: 0 dBm signal at 944 MHz for SISO and MIMO test
Signal generator: 0 dBm signal at 943.25 MHz for MIMO 4x4 test
34
Data is saved to the specified file in the batch or shell file, here called record.bin. The streaming rate for each radio
is displayed in the console. The streaming test uses different rates depending on the configuration.
Using Gigabit Ethernet as the RTDEx medium, the default sampling frequencies used are:
SISO: 16 Msps
MIMO: 8 Msps
Using PCI Express as the RTDEx medium, the default sampling frequencies used are:
SISO: 64 Msps
MIMO: 64 Msps
2.
35
36
The test uses files streaming_sinewave.bin and streaming_sinewave_pcie.bin which holds a generated sine
waveform of 1MHz.
streaming_sinewave.bin is used for Gigabit Ethernet tests. When streaming the file, the resulting tone on depends
on the set sampling frequency.
In SISO, the sampling clock is 16 MHz, which places the generated tone at 1MHz
in MIMO, the sampling clock is 8 MHz, which places the generated tone at 0,5 MHz
in MIMO 4x4, the sampling clock is 5,12 MHz, which places the generated tone at 0,32 MHz
streaming_sinewave_pcie.bin is used for PCI Express tests. The resulting tone is 1MHz sampled at 64MHz
The streaming rate for each radio is displayed in the console. The streaming test uses different rates depending on
the configuration.
Using Gigabit Ethernet as the RTDEx medium, the default sampling frequencies used are:
37
SISO: 16 Msps
MIMO: 8 Msps
Using PCI Express as the RTDEx medium, the default sampling frequencies used are:
SISO: 64 Msps
MIMO: 64 Msps
Using PCI Express as the RTDEx medium, the sampling frequencies used are:
If RF calibration was executed, the power ratio between the tone signal and both the local oscillator (at 953MHz)
and the lower side band signal should be close to 48 dB.
Press enter to terminate the streaming. The streaming stats will appear:
38
To plot the SISO test data, use bintofft('radio420s_record_data.bin', 4, 'int16', 65536, 40000000/2);
To plot the MIMO test data, use bintofft('radio420m_record_data.bin', 4, 'int16', 65536, 40000000/2);
A 1 MHz tone should appear on all initialized and connected channels.
The playback test uses file playback_sinewave.bin which holds a generated sine waveform of 1MHz when sampled
at 40MHz (20MHz I and 20MHz Q).
39
A tone should appear at 954 MHz. After calibration has run, the power ratio between the tone signal (at 954MHz)
and both the local oscillator (at 953MHz) and the lower side band signal (at 952MHz) should be close to 48 dB.
40