While doing FPGA development, David and Ed found that the digitizer could not keep up with 130k sample depth at 5kHz trigger rate.
Instructions to run the test step by step
# make a temp directory mkdir ~/tmp # make a spectrum directory mkdir ~/tmp/spectrum-support
cd ~/tmp/spectrum-support tar xvf ~/Download/spectrum-support.tar
Parameters we are interested in ~/tmp/spectrum-support/xmcTest/xmc1151.h
Parameters | Desired Value | Max Value | Description |
---|---|---|---|
COLLECTSIZE | 131072 | ~ 25600 | Number of samples to digitize per trigger. |
cd ~/tmp/spectrum-support/xmcRead make
cd ~/tmp/spectrum-support/xmcTest/
make
sudo ./xmcTest
~/tmp/spectrum-support/xmcRead/xmcRead -v -m -i lvisF_00000004.dat
~/tmp/spectrum-support/xmcRead/xmcRead -v -m -i lvisF_00000004.dat | grep trigger
../xmcRead/xmcRead -v -m -i lvisF_00000004.dat | grep trigger | awk 'NR%2==0'
../xmcRead/xmcRead -v -m -i lvisF_00000004.dat | grep 'event Start Dig'| awk 'NR%2==0'
Remove the clutter around the values, so we can plot some data
../xmcRead/xmcRead -v -m -i lvisF_00000004.dat | grep 'event Start Dig'| awk 'NR%2==0' > time.txt
../xmcRead/xmcRead -v -m -i lvisF_00000004.dat \ | grep 'event Start Dig'| awk 'NR%2==0' \ | sed -e 's/^[^\[]*//;s/\][^\[]*\[/\] \[/g;s/[^]]*$//;' \ | tr -d '[]' > time.txt
../xmcRead/xmcRead -v -m -i lvisF_00000004.dat \ | grep 'trigger'| awk 'NR%2==0' \ | sed -e 's/^[^\[]*//;s/\][^\[]*\[/\] \[/g;s/[^]]*$//;' \ | tr -d '[]' > trigger.txt
Ed has recorded “event Start Dig” and “event End Dig”. How does that behave with samples to record?
Using that same 4 ns internal clock (one quarter the input clock, or 250 MHz for our 1 GHz input). Checking trigger time.
Here is 5khz example:
~/tmp/spectrum-support/xmcRead/xmcRead -v -m -i lvisF_00000002.dat *** counter [00994] *** trigger [13219] *** window A start [00000] *** window A stop [00125] *** window B start [00137] *** window B stop [00250] *** window C start [00262] *** window C stop [00375] *** window D start [00450] *** window D stop [00537] *** thresh Win3 Value [00600] *** thresh Win3 Loc [00000] *** thresh Win3 Count [00000] *** noise Win4 max [00000] *** noise Win4 min [00000] *** noise Win4 cnt [00000] *** noise Win4 sum [00000] *** noise Win4 sum Sq [00000] *** event PPS [00000] *** event Start Dig [660956440] *** event End Dig [660957527] *** event Logic Done [10085] *** event Restart [660908108] *** counter [00995] *** trigger [13219] *** window A start [00000] *** window A stop [00125] *** window B start [00137] *** window B stop [00250] *** window C start [00262] *** window C stop [00375] *** window D start [00450] *** window D stop [00537] *** thresh Win3 Value [00600] *** thresh Win3 Loc [00000] *** thresh Win3 Count [00000] *** noise Win4 max [00000] *** noise Win4 min [00000] *** noise Win4 cnt [00000] *** noise Win4 sum [00000] *** noise Win4 sum Sq [00000] *** event PPS [00000] *** event Start Dig [660956440] *** event End Dig [660957527] *** event Logic Done [10085] *** event Restart [660908139] *** counter [00997] *** trigger [13222] *** window A start [00000] *** window A stop [00125] *** window B start [00137] *** window B stop [00250] *** window C start [00262] *** window C stop [00375] *** window D start [00450] *** window D stop [00537] *** thresh Win3 Value [00600] *** thresh Win3 Loc [00000] *** thresh Win3 Count [00000] *** noise Win4 max [00000] *** noise Win4 min [00000] *** noise Win4 cnt [00000] *** noise Win4 sum [00000] *** noise Win4 sum Sq [00000] *** event PPS [00000] *** event Start Dig [661006441] *** event End Dig [661007529] *** event Logic Done [10086] *** event Restart [660958193] *** counter [00998] *** trigger [13223] *** window A start [00000] *** window A stop [00125] *** window B start [00137] *** window B stop [00250] *** window C start [00262] *** window C stop [00375] *** window D start [00450] *** window D stop [00537] *** thresh Win3 Value [00600] *** thresh Win3 Loc [00000] *** thresh Win3 Count [00000] *** noise Win4 max [00000] *** noise Win4 min [00000] *** noise Win4 cnt [00000] *** noise Win4 sum [00000] *** noise Win4 sum Sq [00000] *** event PPS [00000] *** event Start Dig [661156443] *** event End Dig [661157533] *** event Logic Done [10088] *** event Restart [661123109]
Testing 130k versus 64k, I am finding the start digi and end digi indeed take half as long.
d=c130k.EVENTENDDIG - c130k.EVENTSTARTDIG print,mean( c130k.EVENTENDDIG - c130k.EVENTSTARTDIG ) * t2s 6.5787344e-05 print,mean( c64k.EVENTENDDIG - c64k.EVENTSTARTDIG ) * t2s 3.3019777e-05
Looks to be that the event reset time is shifted by one sample.
d = shift(c130k.EVENTDIGRESTART,-2)- c130k.EVENTENDDIG print,mean(double(d(where(d LT 40000 AND d GT 1000)))) * t2s 0.00010969424 ; 110 usecs d = shift(c64k.EVENTDIGRESTART,-2)- c64k.EVENTENDDIG print,mean(double(d(where(d LT 20000 AND d GT 5000)))) * t2s 4.9933655e-05 ; 50 usecs