1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 18:15:45 -05:00
sdrangel/plugins/samplesink/limesdroutput
2022-10-05 15:40:09 +01:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
limesdroutput.cpp Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion. 2022-08-27 17:08:03 +01:00
limesdroutput.h Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion. 2022-08-27 17:08:03 +01:00
limesdroutputgui.cpp Device GUIs: Stop timers in destructors. 2022-10-05 15:40:09 +01:00
limesdroutputgui.h Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion. 2022-08-27 17:08:03 +01:00
limesdroutputgui.ui Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion. 2022-08-27 17:08:03 +01:00
limesdroutputplugin.cpp Updated versions and changelogs 2022-09-18 10:51:03 +02:00
limesdroutputplugin.h Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
limesdroutputsettings.cpp Massive UI revamping (v7): fixed device workspace index save/restore and removed useless geometry blobs. Fixes #1207 2022-04-20 20:08:41 +02:00
limesdroutputsettings.h Massive UI revamping (v7): fixed device workspace index save/restore and removed useless geometry blobs. Fixes #1207 2022-04-20 20:08:41 +02:00
limesdroutputthread.cpp LimeSDR: use constant instead of define for buffer size 2020-04-09 06:49:16 +02:00
limesdroutputthread.h LimeSDR: use constant instead of define for buffer size 2020-04-09 06:49:16 +02:00
limesdroutputwebapiadapter.cpp Fixed wrong structure being used in some sample source and sink plugins web API adapters. Fixes #842 2021-04-15 15:30:29 +02:00
limesdroutputwebapiadapter.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00
readme.md Lime: Report calibration errors in GUI. Check LPF is reasonable for up/downconversion. 2022-08-27 17:08:03 +01:00

LimeSDR output plugin

Introduction

This output sample sink plugin sends its samples to a LimeSDR device.

⚠ Version 18.04.1 of LimeSuite is used in the buildsand corresponding gateware loaded in the LimeSDR should be is used (2.16 for LimeSDR-USB and 1.24 for LimeSDR-Mini). If you compile from source version 18.04.1 of LimeSuite must be used.

⚠ LimeSDR-Mini seems to have problems with Zadig driver therefore it is supported in Linux only.

LimeSDR is a 2x2 MIMO device so it has two transmitting channels that can run concurrently. To activate the second channel when the first is already active just open a new sink tab in the main window (Devices -> Add sink device) and select the same LimeSDR device.

Build

The plugin will be built only if LimeSuite is installed in your system. Please use version tagged v17.06.0 or maybe later. To build and install LimeSuite from source do:

  • git clone https://github.com/myriadrf/LimeSuite.git
  • cd LimeSuite
  • mkdir builddir
  • cd builddir
  • cmake -DCMAKE_INSTALL_PREFIX=/opt/install/LimeSuite
  • make -j8
  • make install

Then add the following defines on cmake command line:

-DLIMESUITE_DIR=/opt/install/LimeSuite

Installation from binary packages

☞ LimeSuite is built in the binary packages so there is no external dependency

Interface

The top and bottom bars of the device window are described here

LimeSDR output plugin GUI

1: Start/Stop

Device start / stop button.

  • Blue triangle icon: device is ready and can be started
  • Green square icon: device is running and can be stopped
  • Magenta (or pink) square icon: an error occurred. In the case the device was accidentally disconnected you may click on the icon to stop, plug back in, check the source on the sampling devices control panel and start again.

2A: DAC sample rate

This is the sample rate at which the DAC runs in kS/s (k) or MS/s (M) after hardware interpolation (8). Thus this is the host to device sample rate (10) multiplied by the hardware interpolation factor (8).

☞ Note that changing the hardware interpolation factor (8) or the host to device sample rate (10) may change the ADC clock sample rate and therefore the Rx side hardware decimation factor and/or device to host sample rate. In fact ADC and DAC sample rates can be equal or related by a factor of 2.

2B: Stream sample rate

In host to device sample rate input mode (10A) this is the baseband I/Q sample rate in kS/s. This is the host to device sample rate (10) divided by the software interpolation factor (9).

In baseband sample rate input mode (10A) this is the host to device sample rate in kS/s. This is the baseband sample rate (10) multiplied by the software interpolation factor (9)

Transmission latency depends essentially in the delay in the sample FIFO. The size of sample FIFO is calculated to give a fixed delay of 250 ms or 48000 samples whichever is bigger. Below is the delay in seconds vs baseband sample rate in kS/s from 48 to 250 kS/s. The 250 ms delay is reached at 192 kS/s:

BladeRF output plugin FIFO delay other

3: Center frequency

This is the center frequency of transmission in kHz.

The NCO must be enabled with a negative value in order to set this below 30MHz.

3A: Center frequency units

This is the center frequency units thus kHz (fixed)

4: Channel number

LimeSDR is a 2x2 MIMO device so it has two transmitting channels. This shows the corresponding Tx channel index (0 or 1).

5: NCO toggle

The button is lit when NCO is active and dark when inactive.

Use this button to activate/deactivate the TSP NCO. The LMS7002M chip has an independent NCO in each Tx channel that can span the bandwidth sent to the DAC. This effectively allows non zero digital IF.

6: NCO frequency shift

This is the frequency shift applied when the NCO is engaged thus the actual LO frequency is the center frequency of transmission minus this value. Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware interpolation factor.

☞ In the LMS7002M TSP block the NCO sits after the interpolator (see Fig.14 of the datasheet p.7) so it runs at the actual DAC rate. Hence the NCO limits are calculated as +/- half the device to host sample rate multiplied by the hardware interpolation factor. For example with a 4 MS/s device to host sample rate (10) and a hardware interpolation of 16 (8) you have +/- 32 MHz span around the LO for the NCO. In this example you can tune all HF frequencies with the center frequency set at its lowest (30 MHz).

7: Transverter mode open dialog

This button opens a dialog to set the transverter mode frequency translation options:

LimeSDR source input stream transverter dialog

Note that if you mouse over the button a tooltip appears that displays the translating frequency and if translation is enabled or disabled. When the frequency translation is enabled the button is lit.

7.1: Translating frequency

You can set the translating frequency in Hz with this dial. Use the wheels to adjust the sample rate. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

The frequency set in the device is the frequency on the main dial (1) minus this frequency. Thus it is positive for down converters and negative for up converters.

For example a mixer at 120 MHz for HF operation you would set the value to -120,000,000 Hz so that if the main dial frequency is set at 7,130 kHz the PlutoSDR will be set to 127.130 MHz.

If you use a down converter to receive the 6 cm band narrowband center frequency of 5670 MHz at 432 MHz you would set the translating frequency to 5760 - 432 = 5328 MHz thus dial +5,328,000,000 Hz.

For bands even higher in the frequency spectrum the GHz digits are not really significant so you can have them set at 1 GHz. Thus to receive the 10368 MHz frequency at 432 MHz you would set the translating frequency to 1368 - 432 = 936 MHz. Note that in this case the frequency of the LO used in the mixer of the transverter is set at 9936 MHz.

The Hz precision allows a fine tuning of the transverter LO offset

7.2: Translating frequency enable/disable

Use this toggle button to activate or deactivate the frequency translation

7.3: Confirmation buttons

Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.

7A: External clock control

Use this button to open a dialog that lets you choose the external clock frequency and enable or disable it. When disabled the internal 30.72 MHz VCTCXO is used.

LimeSDR input plugin gain GUI

7A.1: External clock frequency

Can be varied from 5 to 300 MHz

Use the thumbwheels to adjust frequency as done with the LO (1.1). Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. The boundaries are dynamically calculated from the LO center frequency, sample rate and hardware decimation factor.

7A.2: Enable/disable external clock input

Use this checkbox to enable or disable the external clock input

7A.3: Confirm changes

Use the "OK" button to confirm your changes

7A.4: Dismiss changes

Use the "Cancel" button to dismiss your changes

8: LMS7002M hardware interpolation factor

The TSP block in the LMS7002M hardware has an interpolation chain that acts on both Tx channels. It is composed of 5 halfband interpolation stages and therefore can achieve interpolation between 1 (no interpolation) and 32 in increasing powers of 2: 1, 2, 4, 8, 16, 32.

Thus the actual sample rate of the DAC is the stream sample rate (10) multiplied by this factor. In the screenshot example this yields a 40 MS/s rate at the DAC.

9: Software interpolation factor

The I/Q stream from the baseband is upsampled by a power of two by software inside the plugin before being sent to the LimeSDR device. Possible values are increasing powers of two: 1 (no interpolation), 2, 4, 8, 16, 32.

10A: Host to device sample rate / Baseband sample rate input toggle

Use this toggle button to switch the sample rate input next (10) between host to device sample rate and baseband sample rate input. The button shows the current mode:

  • SR: host to device sample rate input mode. The baseband sample rate (2B) is the host to device sample rate (10) divided by the software interpolation factor (9).
  • BB: baseband sample rate input mode. The host to device sample rate (2B) is the baseband sample rate (8) multiplied by the software interpolation factor (9).

10: Sample rate

This is the LMS7002M device to/from host stream sample rate or baseband sample rate in samples per second (S/s). The control (10A) is used to switch between the two input modes. The device to/from host stream sample rate is the same for the Rx and Tx systems.

The limits are adjusted automatically. In baseband input mode the limits are driven by the software interpolation factor (9). You may need to increase this interpolation factor to be able to reach lower values.

This is the LMS7002M device to/from host stream sample rate in S/s. It is the same for the Rx and Tx systems.

Use the wheels to adjust the sample rate. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows.

The LMS7002M uses the same clock for both the ADCs and DACs therefore this sample rate affects all of the 2x2 MIMO channels.

11: Tx hardware filter bandwidth

This is the Tx hardware filter bandwidth in kHz in the LMS7002M device for the given channel. Boundaries are updated automatically but generally are from 5 to 130 MHz in 1 kHz steps. Use the wheels to adjust the value. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

The filter is centered at the LO frequency, so if using the NCO to achieve frequencies below 30MHz, the filter bandwidth needs to be set wide enough for not only your desired signal but the offset from the 30MHz LO as well.

12: TSP FIR filter toggle

The TSP in the LMS7002M chip has a FIR filter chain per channel. Use this button to activate or deactivate the TSP FIR filter.

13: TSP FIR filter bandwidth

Use the wheels to adjust the bandwidth of the hardware TSP FIR filter. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

14: Gain

Use this slider to adjust the global gain of the Tx chain. LimeSuite software automatically set optimal values of the amplifiers to achieve this global gain. This gain can be set between 0 and 70 dB in 1 dB steps. The value in dB appears at the right of the slider.

15: Antenna selection

  • ** No **: no output
  • ** Lo **: Tx low range 30 MHz to 1.9 GHz
  • ** Hi **: Tx high range: 2 GHz and above

16: Stream status indicator

This label turns green when status can be obtained from the current stream. Usually this means that the stream is up and running but not necessarily streaming data. The various status elements appear next on the same line (16, 17, 18)

17: Stream warning indicators

  • U: turns red if stream experiences underruns
  • O: turns red if stream experiences overruns
  • P: turns red if stream experiences packet drop outs
  • C: turns red if calibration fails

18: Stream global (all Tx) throughput in MB/s

This is the stream throughput in MB/s and is usually about 3 times the sample rate for a single stream and 6 times for a dual Tx stream. This is due to the fact that 12 bits samples are used and although they are represented as 16 bit values only 12 bits travel on the USB link.

19: FIFO status

This is the fill percentage of the Tx FIFO in the LimeSuite interface. In normal conditions this should be ~100%. On the picture the Tx is not started.

20: Board temperature

This is the board temperature in degrees Celsius updated every ~5s. Before the first probe the display marks "00C" this is normal.