PhotoFinish Versions Logs for FPGA (Verilog), Rabbit (Dynamic C) and test GUI (VB6) =================================================================================== A.S. astummer at physics.utoronto.ca, started 4 March 2008 XXX xingxing at physics.utoronto.ca, involved IMPORTANT NOTE Xingxing Xing revamped both the GUI and embedded software in 2010. This document might be superceded! Rabbit - Dynamic C ============================================== 1.3.0 2016 March 29 A.S. - removed all monitors - removed leftover artifacts from TCP - removed second timer, now only use the 1 sec heartbeat - added deletion of cmd if wrong size for cmd 'R' - various minor cleanups 1.2.4 25 Aug 2010 XXX - compatible with FPGA 1.2.5, currently in use - added RabbitReadingData line - changed MTU to 1460, maximum number of counts per packet now is 200 (1402 byte.) - bug fix: upon receiving a 'stop' command, coin report len is not set. - precise 1s of singlesreport: wait 5ms before stop running. - debug mode can be off and the 1s is still precise. 1.2.3 20 Aug 2010 XXX - compatible with Verilog 1.2.2, tested okay - Changed to UDP. 1.2.2 19 Aug 2010 XXX - use the rabbit as the timer for a certain duration. - removed time stamping enable command 'T'. - changed R pakcet, including run time, time stamping enable. - added CountTime, 0 is counting forever (actually, 18hrs, 65535 sec.) once started. - added clear FPGA counters command after receiving a 'Run' from host. - when sending packets, moved tcp maintainance tcp_tick after sock_fastwrite. - rewrite part of code in CoinCheck() in assembly. - bug fix: first 1 or 2 seconds of singles report is not accurate. added reset counters at 'Run'. - bug: packet data get lost at certain count rate. and it depends on TCP_BUF_SIZE constant! at ((MTU_E-40)*4), this lost happens at ~900Hz, at ((MTU_E-40)*8), this happens ~2800Hz. At lower rate, there is no problem. 1.2.1 15 Aug 2010 XXX - changed singles report, added wait time report. - ##debug on mode, the singles count are more stable. 1.2.0 14 Aug 2010 XXX - changed singles report, removed the run time report, added timed coincidence report - removed code to read out the runtime register from FPGA. - added back tcp packet maintainance. - added FPGA version read out. 1.1.7 13 Aug 2010 XXX - changed singles report to include the run time register. - added code to read out the runtime register from FPGA. - for test: Channel A value was calibrated with RunTime. 1.1.6 12 Aug 2010 XXX - rewrite the CoincidenceCheck() function in assembly - added a command 'T', for time stamping enable/disable - changed the singles report to include the coincidence counter. - changed the SINGLES_PEROID to 1100ms, and set the time for SinglesReport() to be 100ms. - disable the tcp_tick function while sending a full packet. Causes loss of packets, may need to add back even with a lower maximum counting rate and loss of counts. 1.1.2 29 July 2010 A.S. & XXX - changed Singles report as shown in FPGA version 1.1.6 1.1.1 4 Feb 2009 A.S. - in command handler, when starting to run, set the next report to be in 1 second (was not set before). 1.1.0 12 Nov 2008 A.S. - added singles counters. 1.0.6 2 Sept 2008 A.S. - when running display shows hits per second instead of total hits. Requested by Xingxing. 1.0.5 4 April 2008 A.S. - bug fix: coincidence report, last two bytes were reversed (offset and overrange/A-before-B) 1.0.4 7 March 08 A.S. - rearranged order of initializing global vars at boot time. - added display of FPGA version 1.0.3 March, status unknown 1.0.2 4 March 08 A.S. - various improvements to raise capture rate from 7.6K to 31.0K per second. 1.0.1 4 March 08 A.S. - initial release. FPGA - Verilog ============================================== 1.2.4 25 Aug 2010 XXX - changed Threshold to 525, increased reset time to 3. - bug fix: while resetting Reg2, conditioned on Rabbit is not reading data. 1.2.3 25 Aug 2010 XXX - compatible with Rabbit 1.2.4 TO BE TESTED - added RabbitReadingData line 1.2.2 22 Aug 2010 XXX - bug fix: 0 counts after calibration. Buffered CalOut in FPGA. - bug: after uncertain amount of time, CalOut will goes high, causing zero count. possible fix: Force CalOutBuf to 0 whenever reading addresses other than 10 or 11. - change CycleTimer increment to non-blocking, instead of ++. - @@To do: use a handshake signal other than RunEn! and get rid of the WaitTime. 1.2.1 15 Aug 2010 XXX - added a waitime register, to count the Rabbit acknowledgement time (RunEn=0). - multiplex add 3 and 4 for reading out the waitime register. - ##bug fix: 0 counts with valid input. DO NOT use output or output reg for if condition. - ##bug fix: waittime regiester clearing, from using output for if condition, added flag for waittime. 1.2.0 14 Aug 2010 XXX - removed the runtime register, since the actual counting time is logically hard to calculate. it depends on the Rabbit read out time and actual pulse rate. - removed the arrival time measurement enalbe register TmStpEn. - start new arrival time measurement only when Rabbit finished reading the previous one. do not use DataReady as condition, since it is a output register. - @@removed command 12, was to cancel calibration mode. - @@added kill calibration mode when start to run NOTE: the above two give problems! - @@check for actual coin window. - changed parameters: THRESHOLD = 520, RESET_TIME = 0. 1.1.8 13 Aug 2010 A.S. & XXX - added a runtime register, accumentlating when waiting for Rabbit to read data - multiplex add 3 and 4 for reading out the runtime register - note: cannot removed command 12 here. reading out of the runtime register error. 1.1.7 12 Aug 2010 XXX - added a 24-bit coincidence counter, read by address 14 [11:0] and 15 [23:12] - added a TimeStampEn register. set when read address 2, and reset when read address 14. - possbile bug fix: arrival time of A and B, if AdcA>AdcB, Reg[2][10]=0. 1.1.6 29 July 2010 A.S. & XXX - reduced offset timer from 8-bit to 4-bit. - changed timeout condition to end at proper cycle (??, possbily still too long). - Changed Reg[2][3:0] still cycle timer, [7:4] unused. - changed singles counter from 16-bit to 20-bit. 1.1.5 27 July 2010 A.S. - changed coincidence window from 100nS to 50nS. 1.1.4 24 June 2009 A.S. - changed coincidence window from 200nS to 100nS. 1.1.3 12 Feb 2009 A.S. - added CalIn and CalHiIn buffers. 1.1.2 13 Nov 2008 A.S. - moved Singles count into its own function. - Singles counts now are independant of coincidec detection (can detect single while waiting for coincidence). 1.1.1 13 Nov 2008 A.S. - changed TIMEOUT and RESET_TIME from parameters to registers (initiated at values, never changed). - changed reset time from 1uS to 40nS. - changed timeout from 1uS to 200 nS. 1.1.0 11 Nov 2008 A.S. - added singles counters. 1.0.5 10 April 2008 A.S. - DO NOT USE, LOCKS UP - decreased both TIMEOUT and RESET_TIME to 100nS each (10 clock cycles). 1.0.4 10 April 2008 A.S. - DO NOT USE, LOCKS UP - decreased both TIMEOUT and RESET_TIME to 100nS each (10 clock cycles). 1.0.3 7 March 08 A.S. - DO NOT USE, locks up after detecting a few dozen coincidences, unknown cause. - major changes to code organization: split into Always() for register reading, state control and data manipulation. 1.0.2 4 March 08 A.S. - initial release. Test GUI - VB6 ============================================== 1.3.0 2016 March 29 A.S. - removed all monitors - removed updating - removed leftover artifacts from TCP - now only use the 1 sec heartbeat - various minor cleanups 1.1.0 11 Nov 2008 A.S. - added singles count. 1.0.9 10 April 2008 A.S. - again changed method of detecting A before B or vice versa. 1.0.8 10 April 2008 A.S. - changed method of detecting A before B or B before A. - removed commas from timing display. 1.0.7 3 April 2008 A.S. - minor bug: A-before-B was not always correct. 1.0.6 4 March 08 A.S. - added simplified keyboard control. 1.0.5 4 March 08 A.S. - initial release.