GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSE / V1-3-6
Constituent: lsew     Tag: linux-gcc
#include "LSE/CDF_acd_std.h"
#include "LSE/CDF_acd_maps.h"
#include "CDF_acd_def.h"
#include "EDS/ACD_unpack.h"
#include "EDS/ACD_rec.h"
#include "EDS/ACD_map.h"
#include "EDS/EDR_acd.h"
#include "EDS/ECR_acd.h"
#include "EDS/EDA_acd.h"
#include "EDS/EBF_gem.h"
#include "EDS/FFS.h"
#include "LDT/BFP.h"
#include <string.h>
#include "LSE/cdf_buf_print.h"
#include "dprintf.h"
Include dependency graph for CDF_acd_std.c:
Data Structures | |
struct | _Summary |
Hit summary status. This is the OR of the Ha,Hb,Pa,Pb,V bits. More... | |
Typedefs | |
typedef _Summary | Summary |
Typedef for struct _Summary. | |
Functions | |
static __inline unsigned int | acd_std_pack_adrs (CDF_acd *cdf, unsigned int *buf, unsigned int pos, const EDR_acd *acd, const EBF_gem *gem, Summary *summary) |
Packs the list of ACD addresses. | |
static __inline unsigned int | acd_std_pack_adr (unsigned int *buf, unsigned int pos, unsigned int summary, unsigned int adr) |
Packs the ACD addressing information. This is an 8 bit value, 7-bits of actual address, 1 bit of stop information. | |
static __inline unsigned int | acd_std_pack_pats (CDF_acd *cdf, unsigned int *buf, unsigned int pos, const EDR_acd *acd, const EBF_gem *gem, const Summary *sum, const unsigned short int *map) |
Packs the list of ACD discriminator patterns. | |
static __inline unsigned int | acd_std_pack_pat32 (unsigned int *buf, unsigned int pos, const unsigned short int *map, unsigned int summary, unsigned int v, unsigned int hb, unsigned int ha, unsigned int pb, unsigned int pa) |
Packs the ACD discriminator pattern information for 32 channels. | |
static __inline unsigned int | acd_std_pack_phas (CDF_acd *cdf, unsigned int *buf, unsigned int pos, const EDR_acd *acd) |
Adds the ACD phas. | |
static __inline unsigned short int | acd_std_assess_phas (const unsigned int paccepts[2][4], const unsigned short int *phas, const unsigned short int *peds) |
Assesses the global properties of the PHAs, by effectively oring all 14 bits together. | |
static __inline unsigned int | acd_std_pack_pha (unsigned int *buf, unsigned int pos, unsigned int pb, unsigned int pa, unsigned int msk, unsigned int chn, const unsigned short int *phas, int shift, int width) |
Packs the ACD Pha values. | |
unsigned int | CDF_acd_std_compress (CDF_acd *cdf, unsigned int *buf, unsigned int pos, const EDR_acd *acd, const EBF_gem *gem) |
Adds the ACD record proper and the ACD portion of the GEM. | |
static __inline unsigned int | prepare (unsigned int w) |
Prepares the initial word of being used in the formation of the pattern word. | |
static __inline unsigned int | form (unsigned int v, unsigned int hb, unsigned int ha, unsigned int pb, unsigned int pa, int bit) |
Creates a 5 bit number with 5 bits representing the pattern of hit discriminators for the selected bit. |
CVS $Id: CDF_acd_std.c,v 1.4 2007/02/14 04:21:53 russell Exp $
This repacks the ACD and the ACD hit list in the GEM using non-statistical methods, effectively just rearranging the bit patterns. This reformatting of the ACD/GEM information can be done in a variety of ways determined by the format definition block. This block begins with a single escape bit, which
This bit provides a path to future expansion. At this time, only the standard encoding has been implemented
At the highest level, the standard encoding consists of 3 major blocks.
is run through a static Huffman code table that gives a code and code length. Thisis emitted into the output stream. For example, the pattern 0x1f, i.e. all bits set, is very common and given the code 0 with a length of 1 bit. Note that, by definition, the discriminator pattern list must be non-zero.
GEM Record ---------- Trigger : ThrTkr 10001100 CalHiLo 00000000 CondCno 0c030000 Acd : XZ 00010000 YZ 00000000 XY 00000000 RU 00000000 Times : Livetime 0075deda Event 01511659 PPS 7e6704e9 Counters: Discarded 00476cdc Prescaled 00000000 CondTim 3ffffc1f dWin d117d274 ACD Record ---------- Missing Start Bit: 0000 Header Parity Errors : 0000 PHA Unmatched : 0000 PHA Parity Summary: 0000 ACD hits : 00010000 00000000 00000000 00000000 00010000 00000000 00000000 00000000 PAccepts : 00010000 00000020 00000000 00000000 00010000 00000060 00000000 00000000 NAccepts : 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Number of PHAs : 5 XZ PhaA PhaB YZ PhaA PhaB XY PhaA PhaB RU PhaA PhaB --- ---- ---- --- ---- ---- --- ---- ---- --- ---- ---- 400 6b3 7a6 111 10f 110 0d4 130
Tile Address | Pattern | PHA B | PHA A |
0xf | 0x1f | 0x7a6 | 0x6b3 |
0x39 | 0x01 | 0x10f | |
0x3a | 0x03 | 0x0d4 | 0x130 |
Value | Binary | Description
|
0 | 0 | No exception, use standard encoding
|
0 | 0 | Stop address list, no
|
0x0f | 000 1111 | Tile address
|
0 | 0 | Stop address list, no
|
0x39 | 011 1001 | Tile address
|
1 | 1 | Stop address list, yes
|
0x3a | 011 1010 | Tile address
|
0x2 | 10 | Use static Pattern Encoding Table
|
0> | 0> | Code for pattern 0x1f
|
0x22 | 100010 | Code for pattern 0x2
|
0x23 | 100011 | Code for pattern 0x3
|
0 | 00 | No PHAs with either range 1 or data parity error
|
0x6b3 | 0110 1101 0011 | PHA value for A side, tile 0xf
|
0x7a6 | 0111 1010 0110 | PHA value for B side, tile 0xf
|
0x10f | 0001 1000 1111 | PHA value for B side, tile 0x39
|
0xd4 | 0000 1101 0010 | PHA value for A side, tile 0x3a
|
0x130 | 0001 0011 0000 | PHA value for B side, tile 0x3a
|
00000111100111001101110101100100 01010001101101001101111010011000 01100011110000110100100001001100 0
|
Assesses the global properties of the PHAs, by effectively oring all 14 bits together.
|
|
Packs the ACD addressing information. This is an 8 bit value, 7-bits of actual address, 1 bit of stop information.
|
|
Packs the list of ACD addresses.
|
|
Packs the ACD discriminator pattern information for 32 channels.
|
|
Packs the list of ACD discriminator patterns.
|
|
Packs the ACD Pha values.
|
|
Adds the ACD phas.
|
|
Adds the ACD record proper and the ACD portion of the GEM.
|
|
Creates a 5 bit number with 5 bits representing the pattern of hit discriminators for the selected bit.
V Hb Ha Pb Pa Bit#(5) |
|
Prepares the initial word of being used in the formation of the pattern word.
|