Other shutdown pages:
The pdev spectrometer is used as
the data acquisition device for the 12meter. It was built my
jeff mock and installed jan2007. It's primary use is
as a spectrometer. It also has the ability to take complex
voltage data. After the passing of jeff mock, we began to
refer to the pdev device as the mock spectrometer.
--> in the writeup below i will refer to the boxes as
"mock boxes" or "pdev boxes". They are different
names for the same thing.
Terminology:
- mock box/pdev box
- holds the 2 fpga's and single gigabit ethernet output to
pdev computer
- mock fpga
- each fpga has a power pc core running linux, and
spectral processing code to compute the spectra
- a/d board
- complex sampling boards. 4 x 12bit a/d's
- 2 a/d's for polA, 2 a/d's for polB
- one a/d board for each fpga input, So each mock box has
2 a/d boards
- mock mixer:
- takes the 0 to 500 Mhz output of the downstairs if/lo
if2 and mixes it to baseband (complex mixing)
- polA and polB are fed to a single mixer box.
- pdev/mock computers
- connects to a mock box over ethernet.
- reads the data and writes it to a local disc (5TBytes)
The different pieces that make up the
mock device
Hardware:
- a single mock box.
- This contains two large fpga's
- each fpga contains:
- a power pc processor running linux that manages data
movement
- signal processing code that currently contains
- digital mixer (high res mode)
- digitial filters (factors of 1 to 1024 in steps of
1.
- pfb/fft for 4x8192 channels (polA,polB,stokesU,V)
- power computation, and accumulation
- clock rates of 150 to 172.032 Mhz (complex sampling)
can be used:
- the clock comes from a single synthesizer
that feeds all of the mock boxes.
- an a/d board with a 4 12bit a/d converters feeds each
fpga (complex sampling).
- 2 a/d's for polA, 2 a/d's for polB
- When the alfa receiver was present each fpga would
172Mhz from a single pixel
- We then had box processing 172*2 or 344 Mhz
from a single pixel of alfa.
- For single pixel observing (12meter):
- we only use a single fpga of each box (the higher
freq band) covering 172 Mhz
- the low freq band had some mixer limitations on
where it could be placed.
- Each mock box has a gigabit ethernet that connects to
the computer that takes the data from the box.
- There are 7 mock boxes that can be used to cover the 1-2
GHz If of the downstairs if/lo
- There are 7 more mock boxes that are currently not used by
the 12meter observing
- This is called group 1.
- they had been used to do piggy back observations with
the 305 meter telescope
- eg: 1 set doing pulsar observing
- the 2nd set doing spectral line observing;
- The mock mixers
- these are complex mixers.
- The center of the IF input is mixed to DC.
- the input comes from the 0 to 500Mhz outputs of the
downstairs IF/LO.
- The downstairs if/lo has 8 separate mixers so each
mock mixer can have a different center freq.
- (as long as it sits in the up to 1GHz bandwidth of the
rf signal.
- There is 1 mock mixer box that feeds:
- the group 0 mock box;
- the group 1 mock box
- They are fed by one 500 Mhz band from the
downstairs if/lo
- The mixer splits the input into two separate 172 Mhz
bands
- one input centered at 175Mhz (going to the low band
fpga of a box)
- one input centered at 325Mhz (going to the high band
fpga of a box)
- The 12meter only used the high band who's
input is centered at 325Mhz
- There are two programmable synthesizers that feed
each mock mixer box
- one set to 175Mhz for the lower band
- one set to 325 Mhz for the upper band
- they are common for all of the mock boxes.
- there is a 0 to 31 db programmable attenuator in the
mixer chassis.
- The mixer chassis contains a serial interface that is
used by the corresponding mock computer to set the
attenuators.
- Pdev/mock computers
- Each mock box is connected to a standard computer via a
gigibit ethernet connection
- Each computer runs the linux os and has about 5 TBytes
of disc storage.
- The computer talks to the mock box via a 1 gbit ethernet
- the compute controls the attenuators in the mock mixer
chassis through it's serial ports.
- These computer names are:
- group 0 mocks:
- pdevs1,pdevs2,pdevs3...pdevs7
- group 1 mocks (not used by 12meter observing).
- pdevs8, pdevs9,pdevs10,pdevs11,pdevs12,pdevs13
- pdevs1 is used differently than the other 7 mocks
of a group0
- It runs software that:
- takes commands from the outside world and
distributes the requests to the software running on
all 7 mock computers of the group.
Software:
There are different levels of sofware
that make up the mock spectrometer:
- fpga spectral processing code that runs on each mock box
fpga
- linux code that runs on the powerpc linux os embedded in
the fpga
- software that runs on a mock/pdev computer to run the data
taking
- software that runs on pdevs1 that controls all of the up
to 7 mock cpus used for an experiment
- tcl code that lets the user send commands to pdevs1
to configure/control an experiment.
mock fpga spectral processing code:
- software on pdevs1 under /home.local/pdev/pdev/gx/
- this is the fpga design
- ./jfft - polyphase filter,fft
- ./plinth base verilog code
- ./sp verilog code for
signal processing
Power pc in fpga
- software on pdevs1 under /home.local/pdev/pdev/sw
- kernel, drivers, programs
- prun.c - program that takes commands for the fpga to do
something
Software than runs on a pdevsN cpu
- base directory: /shar/megs/phil/svn/pdev/pdev/
- pnet - control of a mock box
- takes ascii input from pnetctl
- sends requests to mock box
- starts psrv when data takings starts
- location ./datatk/pnet.phil (perl program)
- psrv: takes recorded data from mock box and puts it in
shared memory buffers
- gets started by pnet when datataking starts
- goes away when scan is complete.
- location: ./psrv.phil.c c code
- bpInp: takes data off of share memory buffers (placed
there by psrv), processes it, puts processed data on shared
memory buffers.
- processing includes bit flipping the fft output.
- location: ./datatk/bpInp.c c code
- bpOut: takes processed blocks from shared memory, adds
fits header info, and outputs to disc
- location: ./datatk/bpOut.c c code
- bpCmd: program that's used by pnetctl to send header
information to bpOut so it can be put in the fitsheader.
- location: ./datatk/bpCmd.c c code
- bufpoolD: buffer pool daemon
- controls the 4GB of buffers that is used to pass
the data psrv->bpInp->bpOut->disc
- location: datatk/bufpoolD.c
- started by xinitd
- scramShm: listens on broadcast socket for if/lo, pointing
packets that are sent once a second
- catches broadcast packets and generates info for
fits header.
- location: datatk/scramShm.c c code
- pnetsig: calls pnet --sigstat to get the
current voltage sigmas in counts
- normally started via pdevattn when adjusting power
levels:
- it loops forever, and its output it piped back to
pdevattn when setting the power to 1sigma=30a/d counts
- Note that we can have multiple pnets running. one
talking to pnetctl, and this one talking to pdevattn.
- locations: ./datatk/pnetsig perl program.
- pdevattn: controls the mock mixer attenuators via the
serial ports
- started by pnet when it gets an adjust or query power
request
- also talks to paru
- location: ./datatk/pdevattn perl program
Software that runs on pdevs1:
- pnetctl: control an experiment (all mocks in a group)
- sits on pdevs1 for mock group 0 (uses by 12meter)
- sits on pdevs8 for mock group 1 (use by 305m when doing
piggy back observations).
- server started by xinetd and listens on a socket
for connection request
- accepts and forks a copy to control a group of mock
boxes
- user sends line oriented ascii requests. gets ascii
replies
- talks to the pnets and bpCmd program on each mock cpu
that is used.
- controls:
- the synthesizer used for the mock fpga clock
- the 2 synths that generate the low (175Mhz) hi
(325Mhz) mock mixer los
- pdevsyn: controls the synthesizers for the mock clock and
clock mixer lo's
- pnetctl starts, talks to this programl
- location: datatk/pdevsyn perl program
Low level tcl code that lets the caller control the mock
spectrometers
- Tcl routines that connect the tcl session to pnetctl on
pdevs1
- communication is line oriented ascii requests, replies.
- location: /share/megs/phil/svn/aosoft/p12m/tcl/pnet
- low level communication functions:
- pnetopen - open socket connection to
pnetctl
- pnetclose - close socket connection to pnetctl
- pnetsend - send request to pnetctl
- pnetinp - get reply from
pnetctl
- pnetflushinp - flush any pending input from
pnetctl. vw pnet
- mocktakedata: start datataking. wait till i
completes or the caller enters mockstop
- mockstdinmon: when taking data, the stdinp
handler is switched from the tty driver to this routine.
- When it sees the global variable scram(dtstate)
switch, it will return to normal operation
- It tries to execute anything typed in. It is mainly
looking for the command mockstop
- mockstop: function used to
prematurely stop datataking.
- How the low level communications works:
- tcl doesn't have signals and we aren't running multiple
copies so there is a bit of a kludge
- for a normal command:
- pnetsend command to pnetctl
- setup a timeout
- vwait for reply or timeout.
- for datataking:
- i wanted a way for the user to be able to stop an
observation
- tcl does not have signals, so ctrl-c just aborts the
entire session.
- mocktakedata is used to start a scan
- pnetsend sends the start request with
integration time to pnetctl
- It then switches the stdinp of the tcl session from
the terminal handlers to a tcl routine:
- a global variable scram(dtstate) is set to 1
- It then does a vwait on a global variable
scram(dtstate) waiting for it to change.
- If the user types something into the terminal,
mockstdinmo will be activated:
- it first checks if the dtstate variable has
changed , if so go back to normal operation
- if the work mockstop is entered, it
will cause the acquistion ot stop (setting
dtstate to -1)
- anything else, it will try to execute it (probably
not recommended)
- While datataking is going on:
- pnetinp is grabbing all of the progress
messages being sent by pnetctl
- most of these are written to the log file
- if the end of datataking is found,t then it
sends scram(dtstate) so mocktakedata will wake up
- after wake it restores stdin to the normal
location.
- The upshot is:
- mockstop during
datataking will stop it immediately
- If you are not taking data and end up waiting for a
long time, all you can do is ctrl-c which gets you out
of the session.
TCL code for higher level operation using pdev/mocks