9 #include "mix_fe101_2009_a.hh"
11 void mix_fe101_2009_a(
Board& fe101,
int t){
12 int* fe101channels = (
int*)fe101.channels[t];
13 int qt1sum = getbits(fe101channels[0],0,17);
14 int qt2sum = getbits(fe101channels[1],0,17);
15 int qt3sum = getbits(fe101channels[2],0,17);
16 int qt4sum = getbits(fe101channels[3],0,17);
17 int sum1 = qt1sum+qt2sum;
18 int sum2 = qt3sum+qt4sum;
19 const int R0 = fe101.registers[0];
20 const int R1 = fe101.registers[1];
21 const int fpeThr = R1 << 12 | R0;
22 int fpe1 = sum1 > fpeThr;
23 int fpe2 = sum2 > fpeThr;
24 fe101.output[t] = fpe1 | fpe2 << 1;