merging sps buffers for T2574
Project T2574 wants to run a 430 tx experiment with
4 separate setups switching ipp to ipp. The normal sps setup program
allows you to merge at most 2 separate ipps into one buffer. A new
setup program was written to allow merging of up to 5 buffers. The
description below will follow what needs to be done for t2574. -->
shows lines you type in, ... is output from the program
- We want merge 4 ipps together.
- On observer2 or the pointing computer in the control room (the
program runs only on sunos) start the rdm program.
- the rdm program is the same as rd except that it will merge
up to 5 ipps, and it does not support the send command that
sends buffers to vxWorks (you to do it manually.. see below).
- this is a script in ~dtusr/bin. source in
~phil/vw/datatk/tclPrgs/atm/rawDatM.c. Executable in
- -->new sb1
(we are using the sbraw program with the setup number 1 to
store the info)
- You want to do the following commands for each of the 4 backup
- qz1_dec11 qz2_dec11 qz3_dec11 qz4_dec11 ..
i'll go through the steps for only qz1_dec11
- ...Enter backup file suffix to use
- --> qz1_dec11
(backup file to store info on 1st ipp (1 millisec)
- in /home/online/atm/RawDat/files/rawDat.sb1.xxx.qz1_dec11
- Make sure ippsperbuf, numbufs are 1 for each backup file:
- --> ippsperbuf 1
- --> numbufs 1
- --> edit
to edit the sps buffer to be whatever you want
- -->q to quit
when you've finished editing..
this will save your changes to the backup file
- After you have created, edited the 4 backup files, you can then
- You don't have to edit a backup file if it already has what
- --> merge
- ..Enter number of bufs to merge (max=5)
- --> 4
- ...file1: Enter backup file suffix to use.
- --> qz1_dec11
- ...file2: Enter backup file suffix to use.
- --> qz2_dec11
- ...file3: Enter backup file suffix to use.
- --> qz3_dec11
- ...file4: Enter backup file suffix to use.
- --> qz4_dec11
files are merged and you return to the main menu:
- Set the ippsPerBuf and the numBufs for the merged ipp
- --> ippsPerBuf 5
- This gives a vxWorks buffer
length of 51380..
this number should be less than 65536 or bad things happen!!
- --> numBufs 125
tells how many merged ipps to run before moving to the next program.
- Each buffer is 5 summed ipps (.015*5=.075
millisecs). 125*.075=9.375 seconds..
- If you want to change how long sb1 runs between cycles,
you'll need to remerge the buffers and reedit ippsperbuf and numbufs.
- You are now done and should quit rdm
- The merged info is now stored
in the current sb1 files:
- Move the merged buffer to the sps buffers on vxWorks. This is
done in the unix shell
- --> sb1send
- This is a shell script in ~dtusr/bin/sb1send
# send merged sb1 buffer
- You can now start the datataking sequence from the vw% prompt:
- vw% sbraw 1
or sbraw m1
for mracf and sb1
Some things to watch out for:
- You should only output the merged buffers to disc from rdm . You
should not try to read in the merged buffer with rdm.
- The merged buffer output file contains keyword,values
describing the sps buffer as well as the contents of the spsbuffer. The
spsBuffer contents are correct, the keyword values are not correct
since there is not an array of keywords describing the N different ipps
in the merged buffer.
- When sending to vxWorks, only the sps buffer is used, The sps
keyword values are ignored.
- When rdm or rd reads in a config file, it uses the
keyword,values in the file to regenerate the sps buffer.
The spsbuffer in the file is ignored.
- The backup files should have ippsperbuf and numbufs set to 1.
- after merging and before exiting rdm you should set ippsperbuf
and numbufs to reasonalbe values (buffer length less the 64K but big
enough so the i/o can keep up). numbufs should have how long to dwell
on sb1 before switching to the next program.