diff options
| -rw-r--r-- | README-SFN | 127 | ||||
| -rw-r--r-- | README.md | 20 | ||||
| -rw-r--r-- | test.config | 67 | ||||
| -rw-r--r-- | test.ini | 71 | 
4 files changed, 285 insertions, 0 deletions
| diff --git a/README-SFN b/README-SFN new file mode 100644 index 0000000..de4ef7c --- /dev/null +++ b/README-SFN @@ -0,0 +1,127 @@ +README for the SFN patch  +======================== + +Concept +------- + +Each modulator receives ETI frames with absolute timestamps. These timestamps +are composed of two parts: +- The TIST field as defined in the ETI standard, giving an offset after the +  pulse per second signal; +- A time information transmitted using the MNSC, representing the precise time +  when the frame must be transmitted, with one-second resolution. + +When CRC-DABMUX is called with -s, the TIST is defined in each frame. The +Time is always encoded in the MNSC. + +In a SFN setup, it is not possible to rely on a modulator to slow down the +Ensemble multiplexer. CRC-DABMUX takes an additional parameter -r to output one +ETI frame every 24ms. This output parameter only adds a simul:// output. + +The ETI stream must then be made available to several transmission sites. For +this, the eti_tcp server can be used. +The eti_tcp server listens on the port specified on the command line. +An example invocation is: +./mux-throttled.sh -s -m 1 | ./eti_tcp/eti_tcp.py 54001 + +Each modulator then receives the ETI stream through a TCP connection. Each frame +contains the complete timestamp, to which an per-modulator offset is added. +The sum is then given to the USRP. The offset can be specified in two ways: + +using -o delay: +Adds a constant delay specified on the command line (see 1st example). + +using -O delayfile +Adds the delay specified in the given file. The file must contains a single +line containing a floating point number. This file is read each 50 frames, and +the modulator delay is updated. + +In both cases, the units are seconds. + +Example modulator invocation (for a B100 USRP supporting 2048Msps and with a +fixed delay of 2.3 seconds) +nc localhost 54001 | ./moduhd-2048.sh -o 2.3 + +Example modulator invocation (for an USRP requiring resampling and with a delay +specified in a separate file "moddelay") +nc localhost 54001 | ./moduhd-resample.sh -O moddelay -G 5 + +It is also possible to set daugherboard gain using -G. Furthermore, the transmission +frequency is set on the command line, as seen in the examples in moduhd-XXX.sh. + +CRC-DABMOD uses the UHD library to output modulated samples to the USRP device. +When started, it defines the USRP time using the local time and the PPS signal. +It is therefore important to synchronise computer time using NTPd. + +When a frame arrives with a timestamp that is in the past, the frame is dropped. +If the timestamp is too far in the future, the output module waits a short +delay. + +Synchonisation can be verified by using an oscilloscope and a receiver. It is +very easy to see if the null symbols align. + + +Hardware requirements +--------------------- + +The following hardware is required to test the SFN patch to the CRC mmbTools: +- Two USRPs ; +- One or two computers with the mmbTools installed ; +- A network connection between the two computers ; +- A 10MHz refclk source ; +- A 1PPS source synchronised to the 10MHz ; +- An oscilloscope to check synchronisation. + +The lab setup used in the experiments : +http://pic.mpb.li/IMAG0411.jpg + +In this example, one USRP B100 and one USRP2 are used. Modulation is done on two +different computers, but it also works with a single computer. In that case, the +device string for the -u option for CRC-DABMOD must specify the device. (e.g. +-u "type=b100", -u "type=usrp2" or -u "serial=ABC123") + +The HP33120A generator at the bottom is used to generate the 10MHz REFCLK (sine, +2Vpp). It's sync output is used as 10MHz IN for the Agilent 33250A generator. +The Agilent is set to a square wave, 1Hz. Its sync output is then wired to the +PPS input of the USRPs. + +List of changes made +-------------------- +To CRC-DABMUX: +- Throttled output option instanciates a simul output +- Set TIST and use MNSC to transmit time +- Command line arguments handling + +Files: +Modified Eti.h and DabMux.cpp + +To CRC-DABMOD: +- Added multithreaded UHD Output module +- Added normalisation for UHD (we must divide output samples by +  32768.0) +- Command line arguments handling +- Changed the flowgraph to be able to chose between outputs +- Added decoding of time in MNSC +- Added delay control for the modulator using -o and -O +- Initially set the timezone to UTC, because the MNSC is in UTC + +Files: +Added OutputUHDThreaded.{cpp,h}, TimestampDecoder.{cpp,h}; Modified DabMod.cpp, +DabModulator.h, Eti.h, EtiReader.{cpp,h}; Changed some .h files to include +<stdio.h> because of compilation issues; Corrected OutputMemory char* name(). + + +Future elements to be changed +----------------------------- +- Communicate delay and buffer information between multiplexer and modulators,  +  to have a better control about delays. +- Handle UHD asynchronous messages in another thread, and use this information +  for monitoring + +Repository: +http://hg.mpb.li/mmbtools-sfn/ + +2012-07-11 +Matthias P. Braendli +matthias@mpb.li + diff --git a/README.md b/README.md new file mode 100644 index 0000000..c2ab110 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +Auxiliary tools and scripts for mmbTools +======================================== + +This folder contains a weakly structured collection of scripts and tools. + +Additional information might be found in README-SFN, that was written mid-2012. + +There is: + * a few .ini files: example configuration files for CRC-DABMOD + * test.config for CRC-DabMux + * scripts to encode to mp2 + * moduhd\*.sh illustrate how to start dabmod before configuration files were created + * mux-throttled.sh same for dabmux + * filter/ utility to generate taps for FIRFilter + * qrg.txt list of channels/frequencies + * eti\_tcp.py used to send ETI over TCP to dabmod + * eti-udp/ experimental UDP transport with FEC + * zmq-rx.py python tool to receive data from a ZeroMQ socket + +mpb diff --git a/test.config b/test.config new file mode 100644 index 0000000..20859ed --- /dev/null +++ b/test.config @@ -0,0 +1,67 @@ +general { +    ; the DAB Transmission mode (values 1-4 accepted) +    dabmode 1 + +    ; the number of ETI frames to generate (set to 0 to get an unlimited number) +    nbframes 0 + + +    ; Enable TCPLog on port 12222 +    tcplog false +    writescca false +    tist false +} + +; Some ensemble parameters +ensemble { +    id 20479 +    ecc 1249 ; Extended Country Code (decimal) +    label "TuxMux" +    shortlabel "Tux" +} + +services { +    fbp { +        label "fb+" +        shortlabel "fb+" +        pty 0 +        language 0 +        ; also supports id +    } +} + +; The subchannels are defined in the corresponding section. +; supported types are : audio, bridge, data, enhancedpacket, +;                       dabplus, dmb, packet, test +subchannels { +    fbp { +        type dabplus +        inputfile "fb.dabp" +        nonblock false +        bitrate 96 +        id 10 +        protection 3 +    } +} + +; For now, each component links one service to one subchannel +components { +    ; the component unique identifiers are not used anywhere, but +    ; are useful to disambiguate different components. +    funky { +        label "CoSin" +        shortlabel "CoSin" +        service fbp +        subchannel fbp +    } +} + +; A list of outputs, in the format +; unique_id "uri" +outputs { +    foobar "fifo:///dev/stdout?type=raw" + +    ; This throttles muxing down to nominal rate +    throttle "simul://" + +} diff --git a/test.ini b/test.ini new file mode 100644 index 0000000..a9e1b70 --- /dev/null +++ b/test.ini @@ -0,0 +1,71 @@ +; Sample configuration file for CRC-DABMOD + +[remotecontrol] +telnet=1 +telnetport=2121 + +[log] +syslog=0 +filelog=1 +filename=/dev/stderr + +[input] +#transport=file +#source=/home/bram/pdm/mmbtools-sfn/scripts/eti/fb_framed.eti +#source=/dev/stdin + +transport=zeromq +source=tcp://localhost:8080 +loop=0 + +[modulator] +; Gain mode: 0=FIX, 1=MAX, 2=VAR +gainmode=2 + +; Transmission mode +; If not defined, take the mode from ETI +;mode=2 + +; Set to 0 to disable CicEqualiser +dac_clk_rate=0 + +digital_gain=1.0 + +; Output sample rate +rate=2048000 + +[firfilter] +enabled=1 +filtertapsfile=filter/simplefiltertaps.txt + +[output] +; choose output: possible values: uhd, file +output=uhd + +[fileoutput] +filename=/dev/null + +[uhdoutput] +device=master_clock_rate=32768000,type=b100 +frequency=234208000 +txgain=2 + +; possible values : internal, external, MIMO +refclk_source=internal + +; possible values : none, external, MIMO +pps_source=none + +; behaviour when external clock reference lock lost +; possible values: ignore, crash +behaviour_refclk_lock_lost=crash + +; Used for SFN with the UHD output +[delaymanagement] +synchronous=0 + +; choose between fixed and dynamic offset definition +management=dynamic + +fixedoffset=0.002 +dynamicoffsetfile=modulatoroffset | 
