3 #include "fcs_trg_base.h"
6 void fcs_trg_base::stage_1_202201(u_int s0[],
geom_t geo,
link_t *output)
10 if(fcs_trgDebug>=2) printf(
"Stage1v1 ns=%1d det=%1d dep=%2d\n",geo.ns,geo.det,geo.dep);
15 u_int thr = ht_threshold[geo.det] ;
20 for(
int i=0;i<32;i++) {
41 if(stage_params[0][2]&4) {
49 for(
int ch=0; ch<32; ch++) {
50 padc[geo.ns][geo.dep][ch]=s0[ch];
53 output->d[0] = (t[ 7]<<7)|(t[ 6]<<6)|(t[ 5]<<5)|(t[ 4]<<4)|(t[ 3]<<3)|(t[ 2]<<2)|(t[ 1]<<1)|(t[ 0]<<0);
54 output->d[1] = (t[15]<<7)|(t[14]<<6)|(t[13]<<5)|(t[12]<<4)|(t[11]<<3)|(t[10]<<2)|(t[ 9]<<1)|(t[ 8]<<0);
55 output->d[2] = (t[23]<<7)|(t[22]<<6)|(t[21]<<5)|(t[20]<<4)|(t[19]<<3)|(t[18]<<2)|(t[17]<<1)|(t[16]<<0);
56 output->d[3] = (t[31]<<7)|(t[30]<<6)|(t[29]<<5)|(t[28]<<4)|(t[27]<<3)|(t[26]<<2)|(t[25]<<1)|(t[24]<<0);
60 output->d[7] = mask?0x80:0 ;
66 sum[0] = s0[0] + s0[1] + s0[4] + s0[5] ;
67 sum[1] = s0[2] + s0[3] + s0[6] + s0[7] ;
68 sum[2] = s0[8] + s0[9] + s0[12] + s0[13] ;
69 sum[3] = s0[10] + s0[11] + s0[14] + s0[15] ;
70 sum[4] = s0[16] + s0[17] + s0[20] + s0[21] ;
71 sum[5] = s0[18] + s0[19] + s0[22] + s0[23] ;
72 sum[6] = s0[24] + s0[25] + s0[28] + s0[29] ;
73 sum[7] = s0[26] + s0[27] + s0[30] + s0[31] ;
76 for(
int i=0;i<8;i++) {
82 if(sum[i]>0x7FFF) output->d[i] = 0xFF ;
83 else output->d[i] = sum[i]>>7 ;
97 output->d[i] &= 0xFF ;