Products 08: 3D mass
DESC: Product #08, 32 Masses 3D
HIST: 08-31-93 JLC Created file
04-21-94 JLC Rewrote task code to standard struct/format
05-17-94 JLC Moved TOF DMA handling from cis.asm to here
95-01-30 CAI Fixed bug which stopped prod after 1 spin. v1.53
95-11-13 CAI Update memory use comments.
96-01-13 CAI Implement 16-level prioritized tlm queues. v1.94
96-03-21 CAI Add tlm pkt timeout error post. v2.05
96-04-29 CAI Install shortened mass table (L. Kistler, 960426)
in t-mass.asm; add TOF_offset; debug. v2.08
96-05-13 CAI Finish Mass_t entry & debug. v2.09
18-04-96 AMD Ported code to Esic renaming the original product #11 to #8.
He considered the reduced sweeps # in getting the azim.
position of the event. He reduced also the number of
masses to 32. Such reduction was made just / 2 the
original 64 masses output from TOF computational
handling.
14-03-97 AMD V2.23 Ignore events from last (32nd) e-step. according
to CIS-1 v2.15
25-07-97 AMD Introduced the semi-log TOF computation (lin. up to 20)
NOTE: PRODUCT GENERATION
This product monitors the TOF event interface via DMA data
collection. Each event is binned into one of 32 Masses over
6 solid angles at 8 different energy ranges. The mass bin is
computed by adding an offset to the TOF value and multiplying
the sum by a table entry indexed by the HV energy step.
(The HV energy step is given by the markers in the DMA data
stream).
The mass conversion tables are given in T-MASS.ASM.
The solid angle definition table is given in T-SANG.ASM.
SUMMATION BUFFER
The data structure used for collecting the binned events
is summarized below:
Solid Energy Mass Solid Energy Mass
Offset Angle Energy Mass Offset Angle Energy Mass
------ ----- ------ ---- ------ ----- ------ ----
0 0 0 0 287 0 7 31
1 0 0 1 288 1 0 0
2 0 0 2 289 1 0 1
... ... ... .. ... ... ... ..
30 0 0 30 512 2 0 0
31 0 0 31 ... ... ... ..
32 0 1 0 768 3 0 0
33 0 1 1 ... ... ... ..
... ... ... .. 1024 4 0 0
64 0 2 0 ... ... ... ..
... ... ... .. 1280 5 0 0
96 0 3 0 ... ... ... ..
... ... ... .. 1534 5 7 30
256 0 7 0 1535 5 7 31
PACKET BUFFERS
The accumulation buffer is log compressed from 16-bits down
to 8-bits. This results in a product size of 768 (1536/2)
words.
MEMORY USE
The summation buffer memory is reused for the telemetry
packet buffer. In addition four words are allocated just
before the summation buffer for a 2-word packet handling
structure and 2-word packet header. The TOF DMA event
buffer follows the sum buffer(s). Hoggish memory use is:
Length
(words) Description
------ ---------------
2 packet handling structure
2 packet header
1536 accumulation buffer
------
1540 total per product buffer
20 product variables
27 sub-task tss
------
1587 allocation for 1st buffer
27 task tss (at prod task creation)
------
1614 Total allocation for 1-buffer product
1540 allocation for 2nd buffer
------
3154 Total allocation for 2-buffer product
After allocation, the memory is organized as follows:
One Sum Buffer Two Sum Buffers
Offset Memory use Offset Memory use
--------- -------------- --------- --------------
0000-0014 prod vars 0000-0014 prod vars
0015-002F tss_s 0015-002F tss_s
0030-0031 tlm pkt struct 0030-0031 tlm pkt struct 1
0032-0033 tlm pkt hdr 0032-0033 tlm pkt hdr 1
0034-0633 sum buf 0034-0C33 sum buf 1
0634-1033 TOF ring buf 0C34-1033 tlm pkt struct 2
1034-1035 tlm pkt hdr 2
1036-1C35 sum buf 2
1C36-2035 TOF ring buf
DATA COLLECTION
The events are collected from the Esic DPU Event board via
a DMA interface. The DMA interface is configured to prevent
periods of extremely high event frequency from excessively
preempting the CPU by monopolizing the bus. The event
buffer size is set equal to the max # of events per 22.5
degree period (50 words).
P03 (P-EVTS.ASM), P08 (P-MASS.ASM), and P36 (P-CIS.ASM)
share the TOF DMA channel. Only one product at a
time can use the DMA. If another product is using
the DMA when P08_TASK starts (see tof_inuse test in
INIT_P08), P08 will kill itself. (See also CIS.ASM.)
Thus, to init the DMA Event channel during task initialization,
the Enable flag is first set, then the channel address is
tested (if zero it's not been unmasked since reset). If the
address is zero, set the Unmask flag, else test for a non-
negative count. If a negative count, set the Unmask flag.
Otherwise, the DMA event channel is already running, don't
need to Unmask it. The Enable flag is the msbit and the
Unmask flag is the lsbit of the bit flag variable.
The event buffer is processed as a ring buffer by reading
the DMA channel address and maintaining pointers. To avoid
processor monopolization during bursts of events, this task
processes up to 20 events every 10 ms. (Note: max rate is
100 events per 45 degree period, 125 ms; thus
processing 20 events every 10 ms will handle the
the maximum rate confortably .)
The 16-bit event data is defined below:
TOF EVENT BIT DEFINITIONS
*-------*---*---*---*-----------*-------------------------------*
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
*-------|---|---|---|-----------|-------------------------------*
| 0 0 ps sen ep es tof |
*-------*---*---*---*-----------*-------------------------------*
MSbits: 00z = TOF event data; 11z = HV sector marker
ps = proton suppression (0 = all, 1 = 1/16) (ignored by P08)
sen = selected sensitivity (0 = L, 1 = H) (ignored by P08)
ep = event stop address - (ignored by P08)
es = event start address (anode #, 0-7)
tof = time of flight (00-FFh)
If the two MSbits equal 00z, the word is a TOF event
(defined above).
If the two MSbits equal 11z, the word is a HV sector marker
(defined below).
DMA HV MARKER BIT DEFINITIONS
*---------------*-----------------------------------------------*
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
*---------------|-----------------------------------------------*
| 1 1 1 1 0 sector |
*---------------*-----------------------------------------------*
sector = HV step number since SRP+phase (0000-07FFh, 0-2047),
encompassing 4 HV steps per e-step, 32 e-steps per sweep,
and 32 sweeps per spin as follows:
*---------------*-----------------------------------------------*
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
*---------------|-------------------|-------------------|-------*
| 1 1 1 1 0 sweep (0-15) e-step (0-31) HVstep |
*---------------*-------------------*-------------------*-------*
The 7 LSbits of "sector" are used to index the mass table
(Mass_t). The mass table stores a value (square root of
Energy level at HV sector divided by the square of the
distance traveled by the particle?) which when multiplied by
the TOF value (plus a small offset; see above) will provide
a mass bin number from 0 to 63. If the number is bigger
than 63, it is set equal to 63. The semi-log mass sorting
criteria gets directly the first 20 masses achieved by the
above table and divides the results by two when the above
computed index is between 21 and 63.
[ TLM tables ] [ Diag events ] [ Mag field ] [ Moments ] [ 3D Mass ] [ 3D distributions ] [ 3D compr ] [ Scrtch Pxs ]
Home Page