J. Linnemann D. Edmunds 13 November 1997 L2 Global Processor Input Format Draft 7 This draft introduces a trailer to help checking data integrity. The details of the format may change if it looks advantageous more closely resemble the L3 format. Header and trailer lengths cannot change from event to event, but the event must be padded after the trailer so as to give an even number of 128-bit blocks. The format below is described in terms of 32 bit longwords as seen by the Global Processor Alpha Processor. Both Alpha and VAX are little-endian, while Motorola, Sun, and AIX are big-endian. The bytes are listed from MSB down to LSB. The * items indicate limitations imposed by this header format Header: longword 1 ---------- MSB Hdr Len 1B length of header in longwords >= 3 (including this longword) Hdr Fmt 1B = 1 (Version number of header/trailer format) Obj Len 1B length of each object in longwords * ALL objects produced by this processor must have the same length If different types of object are produced by a processor, a type code will be needed in the object format Source ID 1B L2 Global input port # ie L2 Preprocessor ID Current assignment 0 L1 framework (L1 accept mask) 1 SCL L1 info (event #, time, qualifiers) 2 Muon 1 3 Muon 2 4 CFT R-Phi 5 Central Preshower 6 Forward Preshower 7 Cal EM 8 Cal Tower Jets 9 Cal Etmiss 10 STT (Proposed) 11-15 Spares LSB longword 2 ---------- MSB Event # 3B 24 bit Geographic Section L1 Trigger # Status 1B Status bits for Preprocessor. Meaning if bit is set: MSb of byte 7 Error during processing: ignore data 6 Incomplete Data sent (eg truncated, timed out) 5 Not run this event 4 Mark and Pass processing 3 Monitoring event captured this event 2 Spare 1 Spare 0 Real Data (off = Monte Carlo) LSb of byte LSB longword 3 ---------- MSB Version 2B use as wish, but MUST change if object format changes so that offline programs can read data Num Objs 2B LSB . . preprocessor-specific words, if any . (integer # of longwords) -------------- 4LW = 16B (Minimum overhead, including trailer) Data: Objects follow this will be a block of (Num Objs)*(Obj Len) longwords containing data rules for object format: No internal headers are required for objects Each preprocessor defines its own format, but fixed length per object The object length is an integer number of 4B longwords Multi-byte fields should not cross longword boundaries Changes in format or contents MUST be accompanied by a change in version number, so that offline software can interpret data If different types of object are produced by a processor, a type code will be needed in the object format (they must still each have the same length) * The objects should be sorted in decending order of Pt [see below] * Receipt of a "Not Required" qualifier allows a preprocessor to send 0 objects to global for this event, which would save preprocessor time and L2 bandwidth. Trailer: Changes in the trailer format imply a change in the header format. In order to simplify the receiver hardware, which sends data on a 128 bit wide bus, the event must be padded so that the total transfer size, including the trailer and any padding is such that the number of 32-bit words is divisible by 4. longword 1 ---------- MSB Event # 3B 24 bit Geographic Section L1 Trigger # Source ID 1B L2 Global input port # (as for Header) LSB longword 2-4 (as required) -------------- Padding: such that the total number of longwords in the transfer is divisible by four. For example, if the transfer data is 3 words, the header is 3 words and the trailer is 3 words, the total number of words transfered is 7, and one padding word is required. Four data words would require no padding, while 5 words would require 3. Content of padding is entirely up to the user; one suggestion is alternate 0's and 1's. Comments: -------- The header/trailer format number for each data source can change independently. Any change in the first word of a header implies a format number change, which in turn requires code change in the L2 Global executables. Additional information beyond the L2Global Input may be written by the L2 preprocessors for their output to the DAQ. The global processor backplane can transfer perhaps 100 MB/sec = 100 B/usec The typical event is about .5KB/event. Transfers 10X this large would give a transfer time of 5000 B / 100B/usec = 50 usec, about 50% of the time budget. There are two places where such transfers might be limiting: if cycle-stealing is needed to transfer the data into main memory during processing of succeeding events, and in filling cache (at about 320 MB/sec) from main memory once processing of an event begins. So it is proposed to cut off the lists at 10X typical. Is this likely to be an acceptable restriction? We propose that * we decide on a maximum # of objects for each preprocessor * the data sent to global be Pt sorted, since such a restriction results in position biases otherwise here is a guess as such limits typical max longwords max (using packed formats) L1 framework 1 1 5 + few Muon 11 255 29 + 1020 CFT R-Phi 6 100 5 + 200 Central Preshower 5 50 5 + 50 Forward Preshower 5 50 5 + 50 Cal EM 2 20 5 + 60 Cal Tower Jets 2 20 5 + 40 Cal Etmiss 1 1 5 + 40 STT proposed 3 30 5 + 120 ------- about 1.7KW = 7KB The data transport will probably support variable-length transfers. Thus, it may be advantageous to send data to L2 Global with important quantities in individual longwords, rather than packed by bytes or 2B words. This is because extraction of a byte takes 2-3 Alpha instructions, while access of a longword requires only one instruction. However, this expansion would cost approximately a factor of two in data volume and thus transfer time. Simple data transport for the minimal header/trailer structure is currently 160B for 10 sources. This by itself does not pose a serious burden in raw transport time (1.6 usec). If for any reason it became necessary, it would be possible to shrink the header down from 3 to 2 Longwoards, at the cost of some loss of redundancy and clarity.