// switch and reset test of DUT // // 0 only the local scsn slave // 1 the local and the other fpga slave // 2 the local, the other fpga slave and the 4 traps for ni test // 3 the local and the DUT // 4 the local, the DUT and the 4 traps for ni test // 5 the local and the WT // 6 the local and the 4 traps for ni test // 7 the local, the other fpga and the WT // In cases without DUT in the chain, bit3 of the switch determines // the static value to SCSN0 input of DUT (useful for JTAG tests) include src/ori/chip_def.tcs restrict WAFER; // wafer tester only! write 0x4400, 0; // fpga2 only reset; // FPGA only wait 20; write 0x4400, 7; // fpga2-fpga1-WDUT // here the reset output config of the fpga1 write fpga1, 0x6000, (t_false_bit << 0) | (t_parit_bit << 4) | (rst_inv << 8) | (rst_opend << 9); // exclude and parity bits in FPGA design, reset conf and reset read back // check if the pull up of the reset is seen expect fpga1, 0x6000, (t_false_bit << 0) | (t_parit_bit << 4) | (rst_inv << 8) | (rst_opend << 9) | (1 << 10); restrict 1; // IN ALL CASES! reset nop; // SOME COMMON PARAMETERS // reduce power write ADCEN, 0; // now filter preprocessor can be switched off, // the filter clock is absolutely necessary for writing into the event buffers!!! //write FILCLK, 0; // now filter preprocessor can be switched off, write PRECLK, 0; // ... but we need some clocks!!! // different setting gave worse performance, power problem? write ARBTIM, 1010b // enable/disable hamming correction hamming_imem = HAMMIM | (HAMMIM << 1) | (HAMMIM << 2) | (HAMMIM << 3); hamming_dmem = HAMMDM | (HAMMDM << 1) | (HAMMDM << 2) | (HAMMDM << 3); write MEMCOR, hamming_imem | (hamming_dmem << 4) | (HAMMDB << 8); // DMEM conf write DMDELA, 0 write DMDELS, 15 write chip_mode, SEBDOU, 0; write chip_mode, SEBDEN, 11b; write chip_mode, SEBDOU, 11b;