Early First Prototype Version
used in May 2003 - June 2004 beamtests, still used at UCLA
Note 1: The current format for the 16-bit DDU input has been designed to easily interface with a 64-bit readout system through S-LINK64 (see DDU Output Format). This requires that all data sent to the DDU must have an integer multiple of 4 16-bit words for each event. Furthermore, the highest bit of each 16-bit word from a DMB is reserved as a special flag for `DDU Code' words; since we are constrained by a 16-bit fiber-optic transmission system, only the lowest 15 bits are available for physics data.
Note 2: The 16-bit DDU Code words are always sent in groups of 4 to make a 64-bit DDU word. The lowest 16-bit portion of a 64-bit DDU word is the first word received by the DDU, and is designated as word "a". The second 16-bit portion received by the DDU is word "b", the third is word "c", and the last (and highest) 16-bit part of a 64-bit DDU word is designated as word "d". The DMB-DDU word labels can be distinguished from HEX codes in this page which use the capital letters A-F, sometimes preceded by the "0x" designator as used in C programming.
15 14 13 12 |
Code |
|
|
|
DMB Lone Word: L1A received, but no matching LCT on CSC, and no useful data is present. |
|
|
DMB First Header Word: More data follows for this event (also Header Word 1; see below). |
|
|
DMB Generic Header Word: DMB Event information (there is now 1 of these, Header Word 2; see below). |
|
|
Error/Interrupt : Not fully implemented yet. (3 bit error type + last 9 bits have debug data; see below). |
|
|
FMM/Status Word: (not used yet) Possible option: use for RELOAD Done/Busy or FIFO Almost Full? |
|
|
Trigger Trailer Word: Last word from the TMB or ALCT for this event (generated by TMB and ALCT). |
|
|
DMB Last Trailer Word: Marks the LAST word from the DMB. |
|
|
DMB First Trailer Word: Indicates End of Event; the NEXT word is the LAST word from the DMB. |
Header Word | Highest 4 bits | DDU Code | Lowest 12 bits [11:0] |
---|---|---|---|
1a | 1001 | 9 | TMB_DAV(1) + ALCT_DAV(1) + CFEB_ACTIVE(5:1) + CFEB_DAV(5:1) |
1b | 1001 | 9 | DMB_L1A[11:0] |
1c | 1001 | 9 | DMB_L1A[23:12] |
1d | 1001 | 9 | DMB_BXN[11:0] |
2a | 1010 | A | TMB_DAV(1) + ALCT_DAV(1)
+ Active-DAV Mismatch(1) +
TMB_DAV(1) + ALCT_DAV(1) + TMB_DAV(1) + ALCT_DAV(1) + CFEB_DAV(5:1) *recent change, 12/9/02* |
2b | 1010 | A | DMB_CRATE(8) + DMB_ID(4) |
2c | 1010 | A | CFEB_MOVLP(5:1) + DMB_BXN[6:0] *recent change, 11/4/02* |
2d | 1010 | A | DMB-CFEB-Sync[3:0] + DMB_L1A[7:0] *recent change, 1/16/03* |
Trailer
Word |
Highest
4 bits |
DDU Code | Lowest 12 bits [11:0] |
---|---|---|---|
1a | 1111 | F | Repeat 1a |
1b | 1111 | F | CFEB_MOVLP(5:1) + TMB_HALF(1) + OVLP_HALF(1) + CFEB_HALF(5:1) |
1c | 1111 | F | DMB_L1PIPE(8) + DMB_BXN[3:0] |
1d | 1111 | F | Repeat Header 2b |
2a | 1110 | E | TMB_FULL(1) + CFEB_FULL(5:1) + TMB_MT(1) + CFEB_MT(5:1) |
2b | 1110 | E | ALCT_TIMEOUT(1) + CFEB_ENDTIMEOUT(5:1) + TMB_TIMEOUT(1) + CFEB_STARTTIMEOUT(5:1) *recent change, 12/9/02* |
2c | 1110 | E | Repeat Trailer 2b |
2d | 1110 | E | Repeat Trailer 2b |
The First Trailer is a flag for the DDU indicating End Of Event.
The Second Trailer is actually the Last Word of the event.
Lone
Word |
Highest
4 bits |
DDU Code | Lowest 12 bits [11:0] |
---|---|---|---|
1a | 1000 | 8 | 0000.0000.0000 |
1b | 1000 | 8 | DMB_L1A[11:0] |
1c | 1000 | 8 | DMB_L1A[23:12] |
1d | 1000 | 8 | DMB_BXN[11:0] |
DMB-DDU Header/Trailer bit definitions (some bits get repeated for bit error mitigation)
CF_WC = {[(16 channels) * (6 layers)] + 1 CRC + 2 CFEB_INFO + 1 dummy} * (N_ts)
Each of the 96 data words has the following format:
CFEB Data Bit | Bit Definition |
---|---|
15 | Always LOW for data words. HIGH for DDU Code word (e.g. DMB Trailer or Error case 2 above). |
14 | Overlapped sample flag (normally HIGH; set LOW when two separate LCTs share a time sample). |
13 | Serialized CFEB-SCA controller data (trigger time and capacitor block number; see below). |
12 | Out of range flag from CFEB ADC. |
|
12-bit Digitized CFEB ADC data. |
The 15-bit CRC word (the 97th word in each time sample) is calculated for the set of 96 data words in a time sample. It is created using a CRC-15 algorithm (description, code, generator) with 1-bit error correct, multiple-bit error detect. Words 98 and 99 contain CFEB Status information:
Word 98: L1PIPE_MT(1) + LCTPIPE_MT(1) + L1PIPE_FULL(1) + LCTPIPE_FULL(1) + LCTPIPE_CNT(4) + NF_SCA(4)L1PIPE and LCTPIPE refer to CFEB-SCA Controller internal pipeline status; NF_SCA is the number of free SCA blocks (12 max); BUSY indicates that the system is digitizing data; CFEB_PUSH indicates that data is being sent to the DMB; LCT_POP indicates that a used SCA block is now available. Word 100 is a dummy: 0x7FFF.
Word 99: BUSY(1) + SCA_FULL(1) + CFEB_PUSH(1) + LCT_POP(1) + L1PIPE_CNT(8)
CFEB Data Stream
The ordering of the words in the data stream from a single CFEB is
described by the following nested loops:
do (N_ts time samples){Should an error occur, the CF_WC may deviate from this scheme (case 2 above). Whenever that happens, a DDU Code word will be sent indicating an error condition (see below) that modifies the word count.do (Gray code loop over 16 CSC Strips; S=0,1,3,2,6,7,5,4,12,13,15,14,10,11,9,8){}do (loop over 6 CSC Layers; L=3,1,5,6,4,2){}
}
CRC word
CFEB Info word 98
CFEB Info word 99
Dummy word (0x7FFF)
Serialized CFEB-SCA Controller Data
Bit 13 of each data word carries the serialized 16-bit CFEB-SCA Controller
(SCAC) status word, containing trigger and SCA information. This
data word is serialized (LSB first) with one bit in each of the 16 strips
read out, yielding the 16-bit word. Due to the
innermost-loop
over the 6 CSC layers, each bit of a 16-bit SCAC word is actually sent
6 times in a row (once for each layer). Since there are 16 strips
read out for each time sample, the complete SCAC word can be reconstructed
independently in every time sample. The 16-bit word is defined as
follows (highest-to-lowest bit):
TS_FLAG(1) + SCA_FULL(1) + LCT_PHASE(1) + L1A_PHASE(1) + SCA_BLK(4) + TRIG_TIME(8)
TRIG_TIME indicates which of the eight time samples in the 400ns SCA block (lowest bit is the first sample, highest bit the eighth sample) corresponds to the arrival of the LCT; it should be at some fixed phase relative to the peak of the CSC pulse. SCA_BLK is the SCA Capacitor block used for this time sample. L1A_PHASE and LCT_PHASE show the phase of the 50ns CFEB digitization clock at the time the trigger was received (1=clock high, 0=clock low). SCA_FULL indicates lost SCA data due to SCA full condition. The TS_FLAG bit indicates the number of time samples to digitize per event; high=16 time samples, low=8 time samples.
Pattern of Bits
15 14 13 12 |
Pattern of Bits
11 10 9 (error code) |
Code Definition | Lowest 9 bits [8:0] |
---|---|---|---|
1011 | 000 | unused | unused |
1011 | 001 | CFEB: SCA Capacitors Full | 0 + 4-bit Block Number + 4-bit FIFO1 word count |
1011 | 010 | CFEB: FPGA FIFO full** | 0 + 4-bit FIFO3 word count + 4-bit FIFO1 word count |
1011 | 011 | unused | unused |
1011 | 100 | unused | unused |
1011 | 100 | unused | unused |
1011 | 100 | unused | unused |
1011 | 101 | DMB: FIFO full* | 0 0000 0000 |
1011 | 110 | DMB: FPGA FIFO full* | 0 + 4-bit GFIFO word count + 4-bit LFIFO word count |
1011 | 111 | unused | unused |
* Note that for these error conditions, the word count can no longer be verified...resynch required!
** The data may be corrupted in this case...resynch required!
Revision Summary: