5 #include "fcs_trg_base.h"
11 void fcs_trg_base::stage_3_202203(
link_t link[], u_short *dsm_out)
15 if( (link[0].d[6] & 0x01) || (link[2].d[6] & 0x01) ) *dsm_out |= 0x1;
16 if( (link[0].d[6] & 0x02) || (link[2].d[6] & 0x02) ) *dsm_out |= 0x2;
17 if( (link[0].d[5] & 0x01) || (link[2].d[5] & 0x01) ) *dsm_out |= 0x4;
18 if( (link[0].d[5] & 0x02) || (link[2].d[5] & 0x02) ) *dsm_out |= 0x8;
19 if( (link[0].d[4] & 0x02) || (link[2].d[4] & 0x02) ) *dsm_out |= 0x10;
20 if( (link[0].d[0] & 0x02) || (link[2].d[0] & 0x02) ) *dsm_out |= 0x20;
21 if( (link[0].d[3] & 0x02) || (link[2].d[3] & 0x02) ) *dsm_out |= 0x40;
22 if( (link[0].d[2] & 0x02) || (link[2].d[2] & 0x02) ) *dsm_out |= 0x80;
23 if( (link[0].d[1] & 0x02) || (link[2].d[1] & 0x02) ) *dsm_out |= 0x100;
24 if( (link[0].d[4] & 0x01) && (link[2].d[4] & 0x01) ) *dsm_out |= 0x200;
25 if( (link[0].d[0] & 0x01) && (link[2].d[0] & 0x01) ) *dsm_out |= 0x400;
26 if( (link[0].d[3] & 0x01) && (link[2].d[3] & 0x01) ) *dsm_out |= 0x800;
27 if( (link[0].d[2] & 0x01) && (link[2].d[2] & 0x01) ) *dsm_out |= 0x1000;
28 if( (link[0].d[1] & 0x01) && (link[2].d[1] & 0x01) ) *dsm_out |= 0x2000;
29 if( (link[0].d[6] & 0x04) || (link[2].d[6] & 0x04) ) *dsm_out |= 0x4000;
36 printf(
"FCS STG3 input 0 = %02x %02x %02x %02x %02x %02x %02x %02x\n",
37 link[0].d[0],link[0].d[1],link[0].d[2],link[0].d[3],
38 link[0].d[4],link[0].d[5],link[0].d[6],link[0].d[7]);
39 printf(
"FCS STG3 input 1 = %02x %02x %02x %02x %02x %02x %02x %02x\n",
40 link[2].d[0],link[2].d[1],link[2].d[2],link[2].d[3],
41 link[2].d[4],link[2].d[5],link[2].d[6],link[2].d[7]);
42 printf(
"FCS STG3 output = %04x = ", *dsm_out);
43 for(
int i=7; i>=0; i--){printf(
"%1d", (dsmout>>i)&0x1);}