Subsections

Tools

A couple of different tools exist for the MSR, to show the internal state of the MSR, to act as a channel-server or build LDPC-codes. In this chapter you'll learn about the different tools and how to use them more accurately. If you have trouble with a tool, you can read here if you find some help.


Visualize

This tool is used to show the internal state of the MSR. It depends on the STFA-module to draw the other signal-processing modules. So, if there is no STFA module in the chain (which is the case for most of the programs in the Test-directory), Visualize can't show the complete chain.

Starting it

To run it, simply type make show and enter. This sets up the path so that the qwt library can be found. The executable first searches for a real-time MSR that puts its data into /proc/sradio, then it searches for the most recent entry in /tmp/username/proc.* If it doesn't find any of these, it stops with an error. Optionally you can also give a path to the sradio/sdb/ directory on the command-line.

Once the correct path has been found, the different modules are displayed on the screen. Optional modules that are not connected to anything are not shown on the screen. The whole display is updated once a second.

Mouse handling

With the left mouse-button you can drag around the whole screen, which is mostly useful on small screens, when not all chains fit on the screen.

The right mouse-button opens an option to exit the program when pressed on an empty part of the visualize-display. When pressed over a module, a menu pops up, where you can choose different display-options: stats and outputs. If a module has more than two stats-entries, you can choose which ones to display by choosing the corresponding entries. Each selected entry is put on top of the list of stats inside the block representing the module. Some of the stats-entries represent blocks of data, which will be displayed in a window apart.


Plotting of values

There is a possiblity to plot the stats-values into a seperate window. This can be used to log values of a certain module, or even to draw plots of one value agains the other. In order to create a plot, go to the File menu and chose Stats Plot XY or Stats Plot Y(t). Now you can click on a module in order to get a list of stats that shall be plotted. If you chose Stats Plot XY, you have to chose a second module and a second stats. Once the stats have been chosen, the plot-window updates once a second with a new value.

You can chose a new value for the udpate-time. The time is given in 1/100s of seconds. Be aware that for performance reasons the screen-update is only twice a second, even if the data-update-value is less than 50. No samples will get lost, only the update will appear slow. To enable long measurements without degrading performance of the visualize tool, only the 1000 most recent samples are shown. This assures that you can have 1 million or more samples, and still have visualize react to your requests. If you chose to export to matlab, all samples will be exported. If you chose export to ps, only the visible samples will be plotted.


Exporting values

Each plot-window has the possibility to export the values either as a postscript-file or to a matlab-file. In order to have a small preview of the data you'll export, you can click on the graphic. This will freeze the update, and allow you to 'chose' which data you want to export.

If there is lots of data, a general update will only show 1000 samples. When you click on the

Known bugs

During simulation-mode,it may be that an update of the screen occurs at the same time as an update from the MSR, which results in broken or incomplete chains. Usually this should 'heal' during the next update.

If the same happens with a plot-window, it may be that you have to close this particular window, and reopen it again.


Channel-server

The channel-server takes the inputs of different radios, mixes them together and sends them back to the different radios.

Starting it

When you're in the Main/ structure somewhere, usually it is enough to type make server to start the channel-server. This is only necessary once.

Known bugs

For the moment the channel-server and the simulations have to be run on the same computer.

If you change something in the implementation of the channel-server, you have to restart it. The most simple way is to type killall server followed by a make server.


LDPC-code generation

In Tools/LDPC you find a program that takes descriptions of LDPC-codes and puts them in a module-readable way.

Starting it

First you need some descriptions of LDPC-codes. For this you have to ask Abdelaziz on how to do this. Then you can type write code1 code2 for putting code1 and code2 into a file called graphs.c which has to be copied into Modules/Coding/LDPC. After a recompilation you're ready to use the new codes.

Known bugs

The length of the code is fixed for the moment at 4000 bits.

Output data-blocks

A small program called convert has the ability to read out any port or any stats-block that is defined in a running software-radio, be it a simulation or a real-time run. It does this by reading out the tree generated by the software-radio. This tool is now more or less obsolete, as the visualize-tool has the ability to export data-structures from any module.

Syntax

convert dir [-h] [-o file] [-p] [nr]

The dir parameter has to point to the appropriate directory, which is /proc/sradio/sdb or /tmp/proc.n/sradio/sdb. Upon running convert with only the directory, it outputs a list of available modules in this directory. You have to add the id of the desired module to the path, and then you can run convert again. If you run it without the -p option, it will tell you what stats-blocks are available, with the -p option, it will output a list of all available output-ports and their types. Now you can run convert one last time, adding the index of the stats-block or the output-port you want to look at, and probably redirecting the output into a file. This file can be read directly by octave. You can also add -o file to set the output-filename.

Linus Gasser 2004-04-14