program=pc2tp -c0 bid=1 init: asm $(program) -i CNF/sc_send_rob.dat -o out -nioase -r inits: asm $(program) -i CNF/sc_send_rob.dat -o out ini: clean init initc: # prepare the packed configuration # cat CNF/wrk/full.dat CNF/wrk/dmem.dat > CNF/wrk/fulld.dat pack_tcnf CNF/sc_send_rob.dat CNF/wrk/full_dbank.dat CNF/wrk/full_dbank_ver.dat CNF/wrk/full_conf_ver.dat # read the state # $(program) -i rstat.dat # write the packed configuration, start the unpacking $(program) -i CNF/wrk/full_dbank.dat -o out # read and verify the packed configuration and calculated checksum $(program) -i CNF/wrk/full_dbank_ver.dat -o verdb.out # read and verify the unpacked configuration $(program) -i CNF/wrk/full_conf_ver.dat -o vercf.out grep -i "wrong" verdb.out grep -i "wrong" vercf.out # read the state # $(program) -i rstat.dat # for debugging only # $(program) -slv 16 -dsa 0 -dea 0x3FF -dm dm # go to acquisition mode $(program) -prem 5 1 1 # read the state # $(program) -i rstat.dat # reset ORI $(program) -j2c 12 0x98 initn: # reset $(program) -i CNF/wrk/reset.dat -o out # init the IMEM $(program) -i CNF/wrk/fitred.dat -o out # send directly the tables in DMEM $(program) -i CNF/wrk/dmem.dat -o out # prepare the packed configuration check_trap_conf CNF/wrk/full.dat CNF/wrk/full_dbank.dat CNF/wrk/full_dbank_ver.dat CNF/wrk/full_conf_ver.dat # read the state # $(program) -i rstat.dat # write the packed configuration, start the unpacking $(program) -i CNF/wrk/full_dbank.dat -o out # read and verify the packed configuration and calculated checksum $(program) -i CNF/wrk/full_dbank_ver.dat -o verdb.out # read and verify the unpacked configuration $(program) -i CNF/wrk/full_conf_ver.dat -o vercf.out grep -i "wrong" ver??.out # read the state # $(program) -i rstat.dat # for debugging only # $(program) -slv 16 -dsa 0 -dea $3FF -dm dmem16.out # go to acquisition mode # $(program) -prem 5 1 1 # read the state # $(program) -i rstat.dat # reset ORI $(program) -j2c 12 0x98 prep: @nioase -r > pred_rep @-rm evn00000001.txt @$(program) -prem 7 1 1 >> pred_rep @nioase -ea -1 -o32 evn00000001.txt -r >> pred_rep @./scrd.gaps >> pred_rep read_raw -d 0 -i1 evn00000001.txt -zs2 0 -hw2 3 -i2 scs00000001.txt -o1 data/ -cmp pred: @nioase -r > pred_rep @-rm evn00000001.txt @$(program) -prem 1 1 1 >> pred_rep @nioase -ea -1 -o32 evn00000001.txt -r >> pred_rep @./scrd.gaps >> pred_rep # -@diff evn00000001.txt scs00000001.txt read_raw -d 0 -i1 evn00000001.txt -zs2 0 -hw2 3 -i2 scs00000001.txt -o1 data/ -cmp # analyseADC -i evn -o data/evnt -r $(bid) > data/rms_ori.txt # tail -n 20 data/rms_ori.txt > data/rms-x-adc.txt # tail -n 39 data/rms_ori.txt | head -n 16 | cut -c 14- > data/rms-x-mcm.txt pre: nioase -r -rm data/* evn00000001.txt $(program) -i CNF/wrk/pre.dat -o out # @$(program) -prem 1 1 1 >> pred_rep -grep -i wrong out nioase -ea -1 -o32 evn00000001.txt -r @./scrd.gaps >> pred_rep read_raw -d 0 -i1 evn00000001.txt -zs2 0 -i2 scs00000001.txt -o1 data/ -cmp # diff evn00000001.txt scs00000001.txt # analyseADC -i evn -o data/evnt -r $(bid) > data/rms_ori.txt # read_raw evn00000001.txt data/ # tail -n 20 data/rms_ori.txt > data/rms-x-adc.txt # tail -n 39 data/rms_ori.txt | head -n 16 | cut -c 14- > data/rms-x-mcm.txt # read_raw -al err.log -zs1 1 -d 2 -i1 evn00000001.txt |less pre2: nioase -r # $(program) -i CNF/wrk/pre.dat -o out @$(program) -prem 1 1 1 nioase -ea -1 -o32 evn00000001.txt -r # $(program) -i CNF/wrk/pre.dat -o out @$(program) -prem 1 1 1 nioase -ea -1 -o32 evn00000002.txt -r read_raw -zs1 0 -d 2 -i1 evn00000001.txt |less read_raw -zs1 0 -d 2 -i1 evn00000002.txt |less pres: -rm data/* $(program) -i CNF/wrk/pre.dat -o out scrd.gaps analyseADC -i scs -o data/evnt -r $(bid) > data/rms_ori.txt tail -n 20 data/rms_ori.txt > data/rms-x-adc.txt tail -n 39 data/rms_ori.txt | head -n 16 | cut -c 14- > data/rms-x-mcm.txt adc: analyseADC -i evn -o data/evnt -r $(bid) > data/rms_ori.txt tail -n 20 data/rms_ori.txt > data/rms-x-adc.txt tail -n 39 data/rms_ori.txt | head -n 16 | cut -c 14- > data/rms-x-mcm.txt asm: cd CNF && $(MAKE) ni16: nioase -ea -1 -o16 ni16 -r ni32: nioase -ea -1 -o32 evn00000001.txt -r analyseADC -i evn -o data/evnt -r 4 > data/rms_ori.txt tail -n 20 data/rms_ori.txt > data/rms-x-adc.txt tail -n 39 data/rms_ori.txt | head -n 16 | cut -c 14- > data/rms-x-mcm.txt eep_wr : $(program) -i CNF/write_eeprom.dat -o out -grep "0x9 0xf0e0" out stop_ltc : $(program) -i CNF/stop_ltc.dat -o out eep_rd : $(program) -i CNF/read_eeprom.dat -o out -grep "0x9 0xf0e0" out ltc_rd : $(program) -i CNF/read_ltc.dat -o out -grep "0x9 0xf0e0" out plot-p: gnuplot SCRIPTS/p1-scs-scr.plt plot-b: gnuplot SCRIPTS/plot16scs-scr.plt plot-r: gnuplot SCRIPTS/rms-scr.plt plot-p-png: gnuplot SCRIPTS/p1-scs-png.plt plot-b-png: gnuplot SCRIPTS/plot16scs-png.plt plot-r-png: gnuplot SCRIPTS/rms-png.plt clean: -rm data/* evn00000001.txt out cd CNF && $(MAKE) clean --no-print-directory state: rstat.dat $(program) -i rstat.dat -o out cat out rstat.dat: rstat.tcs tcc rstat.tcs > rstat.dat test: pre # head -20 evn00000001.txt # tail -3 evn00000001.txt cat evn00000001.txt test1: nioase -r pc2tp -i CNF/prog/scsn.dat -o out > qq nioase -o16 ni16 diff -B -w --strip-trailing-cr -a -i ni16 CNF/prog/ni-out16.dat |wc -l test2: nioase -r gentrack pc2tp -i scsn.dat -o out > qq nioase -o16 ni16 diff -B -w --strip-trailing-cr -a -q -i ni16 ni-out16.dat .PHONY : clean init pre ni16 ni32 plot-p plot-b plot-r plot-p-png plot-b-png plot-r-png asm adc