include src/chip_def.tcs // clear the ni-input in FPGA write fpga2, 0x4480, 0 // pretrigger write fpga2, 0x4008, 1 nop nop nop nop // clear //write fpga2, 0x4008, 2 // number of 16-bit words const nw16_fpga = 2*(nchips*(nwords+1)*4+2+2)-1+oase_mode; expect fpga2, 0x4480, nw16_fpga | (nw16_fpga << 12); expect fpga2, 0x4481, 0 read dut, 0x0C00 read dut, 0x0C08 read dut, 0x0C10 read dut, 0x0C18 expect dut, NFSM, 1 expect dut, SMCMD, 0x300003a0 restrict (nchips>1) expect ni0, NFSM, 1 expect ni0, SMCMD, 0x300001a0 expect ni1, NFSM, 1 expect ni1, SMCMD, 0x300001a0 expect ni2, NFSM, 1 expect ni2, SMCMD, 0x300001a0 expect ni3, NFSM, 1 expect ni3, SMCMD, 0x300001a0 // readseq fpga2, 0x4800, (nw16_fpga >> 1)