Skip to content

drs-ss/gr-polaris

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
grc
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 

Introduction

This is the GNU Radio OOT module for command and control of the DRS Polaris radio. This block will allow the user to easily adjust the sample rate, frequency, attenuation and streaming setup to allow for IQ and FlexFFT data to be streamed to a host machine.

Installation

If you already have GNURadio installed, you can install this block through the standard install process.

git clone https://github.com/drs-ss/gr-polaris
cd gr-polaris
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

If you are using the default Polaris settings, please ensure that the MTU on your 10Gig Ethernet connection is 9000.

If you experience an error like "bad_alloc" then you may need to reduce the amount of memory allocated to the buffers in the block. You can do this by tweaking the defines found in lib/complex_manager.h and lib/udp_listener.h. Reducing NUM_COMPLEX and NUM_BUFFS by half is usually sufficient. This will likely impact performance at higher sample rates but should not cause a problem at lower rates.

Adjusting System Settings

There are a couple of things you can do to improve the performance.

  • Adjust the net.core.rmem_max value in the sysctl.conf file. The expected value in the source is 50000000. If you change this value, you should update the define RECV_BUFF_SIZE in the udp_listener.h (located in lib/)

  • Adjust your 10 Gig card for optimal settings.

  • Adjust defines in complex_manager.h and udp_listener.h. At the top of these files are a number of defines which can impact the performance of the block. Typically NUM_THREADS/NUM_COMPLEX in complex_manager and NUM_BUFFS/RECV_BUFF_SIZE in udp_listener are all that need to be tweaked to improve performance.

  • Setting the "Min Output Buffer" (which can be found in the "Advanced" tab in the block's properties) to a large value (i.e. 500,000) can improve performance when outputting two streams at different sample rates (or when using Flex FFT streaming and complex streaming at the same time).

Block Reporting

When data loss is detected in the block, it will respond with one of three print outs to the console. Each has a different meaning and can help you optimize your settings for performance.

  • Packet Loss ("L") - When an L is reported it means that the block detected an interrupt in the packet counter. This means that the system failed to capture a packet that came across the wire. Adding more slices to a Myricom card, or assigning unique cores to slices can help improve this. In addition, increasing the net.core.rmem_max value can also help (be sure to adjust the RECV_BUFF_SIZE define as well).
  • Overflow ("O") - When an O is reported the block failed to keep up with incoming data on the back end. Each "O" represents a full buffer flush in udp_listener. This backup can occur in a number of locations. If you are running a graph with a lot of processing this can slow down the rate data is requested from the block, which will cause buffers to back up and overflow. Improving your graphs performance (or capturing data ahead of time) can help with this. You can also force the core affinity of all other blocks in the graph to be the same, this can also sometimes help performance. If the graph is simple (just frequency or null sinks) then it could be that the block isn't using enough threads to process (or that it doesn't have enough room in the buffers). Try increasing NUM_BUFFS in udp_listener or increasing NUM_THREADS in complex_manager.h.
  • Flex Packet Loss ("D") - When a D is reported it means that the block detected an interrupt in the packet counter for a flex stream.
  • Flex Overflow ("Q") - When a Q is reported the block failed to keep up with incoming data from flex streams. Each Q represents a full buffer flush.

About

GNU Radio OOT module for the Polaris Receiver

Resources

License

Stars

Watchers

Forks

Packages

No packages published