1 #ifndef _ITPC_INTERPRETER_
2 #define _ITPC_INTERPRETER_
6 #include <I386/atomic.h>
11 #define ERR_DIFFERENT_FEE_IDS 1
23 void run_start(u_int run) ;
25 void start_event(u_int bytes) ;
28 void fee_dbase(
const char *fname=0) ;
31 int rdo_scan_top(u_int *ddata,
int words) ;
33 int ana_send_config(u_int *
data, u_int *data_end) ;
34 int ana_pedestal(u_int *data, u_int *data_end) ;
35 int ana_triggered(u_int *data, u_int *data_end) ;
37 int rdo_scan(u_int *ddata,
int words) ;
40 u_int *fee_scan(u_int *start, u_int *end) ;
41 u_int *sampa_lane_scan(u_int *start, u_int *end) ;
42 u_int *sampa_ch_hunt(u_int *start, u_int *end) ;
45 void run_err_add(
int rdo1,
int type) ;
64 enum s_type {S_IDLE, S_FEE_ASCII, S_FEE_ASCII_END,S_FEE_PORT, S_TRIGGER, S_FEE_END_A, S_FEE_END_B, S_FEE_END_HDR} ;
79 u_int send_config_errs ;
86 u_int fpga_fee_v_all ;
90 int expected_rdo_version ;
92 int expected_fee_version ;
100 u_int found_ch_mask ;
108 u_short tb_buff[1024] ;
115 char ascii_dta[1024] ;
118 static struct itpc_config_t {
129 u_char sampa_version ;
130 u_char lane_dead_mask ;
131 u_char sampa_dead_mask ;
139 static int itpc_fee_map[24][4][16] ;
140 static u_int ifee_mask(
int sec1,
int rdo1) ;
141 static int fee_map_check() ;
143 static int parse_config(
const char *fname) ;
144 static int parse_default() ;