page1
4
2
3
0
4
3
1 = running
0
1
1
unknown
unknown
Sequence
DSP
par_init()
Run Status bit1
1=Start
0=Stop
DAQ program
(collector in
case of unidaq)
InitializeAMT()
A loop with watching Run Status bit1 until it become 1
AMT0
Program
DP
Ram
Pcount
Icount
EchoPoint
AMT status
Scount
unknown
0
unknown
0
unknown
AMT1
AMT2
AMT3
DSP I/O
AMT control
CNTR
(0xFE00)
0
Variables
mode
me_ing
event_c
0
0
0
1
1
1
1 = running
STPC
(0xFE04)
STAR
(0xFE01)
Make “Common start/stop time”
Make “Recording data status”
Calculate time difference with AMT3 hit
Make “Hit data”
Make “Error report” (if exists)
Make “End of data”
2 = end
1
0
me_mode()
Set 0
Set 0
Set 0
AMT Reset
mc_init()
Set Start via VME
Set 1
Set Comm. Start or Stop mode
Set CSR0 global_reset = 1
Set values to CSR 0 - CSR15
Set Trigger mode and bunch reset
Set size of partition
Set Scount=0
Set Icount=0
Set 0
Set 0
Watching Run Status bit1
Set AMT status = 1 (running)
Set measurement time for comm. start
Set Comm. Start or Stop mode, Start measurement, and Trigger mode
CNTR
(0xFE00)
CNTR
(0xFE00)
CNTR
(0xFE00)
Check if ATM3 is ready. if NOT, wait
Read comm. start or stop data from AMT3
STAR
(0xFE01)
Check status of ATM0-2
Read comm. start or stop data from AMT0
Calculate time difference with AMT3 hit
Make “Hit data”
Read comm. start or stop data from AMT1
Calculate time difference with AMT3 hit
Make “Hit data”
Read comm. start or stop data from AMT2
Add Number of event in “Recording data status”
Increment
Set AMT status = 2 (end)
user_event()
After trigger signal is entered in Input Register,
wait until (Icount&0x3 != Scount&0x3)
Set EchoPoint with same value of Pcount
Set recoding data buffer address
If reading hit data is finished,
increment
1
Set 0
Check if Pcount==EchoPoint. If yes, go to start, if not, return
Set 1
Set 1
Increment
ps_mode()
start:
Set 1
Set 1
Increment
2
1
Set AMT status = 1 (running)
Set measurement time for comm. start
Set Comm. Start or Stop mode, Start measurement, and Trigger mode
STPC
(0xFE04)
CNTR
(0xFE00)
*
Increment
Set AMT status = 2 (end)
2 = end
Set 0
0
2
me_mode()
same
process
with *
If Scount != Icount,
Set recoding data buffer address related to Scount
ps_mode()
start:
1 = running
Check if Pcount==EchoPoint. If yes, go to start, if not, return
Set AMT status = 1 (running)
Set measurement time for comm. start
Set Comm. Start or Stop mode, Start measurement, and Trigger mode
STPC
(0xFE04)
CNTR
(0xFE00)
Increment
Set AMT status = 2 (end)
2 = end
me_mode()
same
process
with *
If Scount != Icount,
Set recoding data buffer address related to Scount
Set 1
Set 1
Increment
1
Set 0
0
ps_mode()
start:
3
Set 1
Set 1
Increment
1
Set 0
1 = running
Check if Pcount==EchoPoint. If yes, go to start, if not, return
Set AMT status = 1 (running)
Set measurement time for comm. start
Set Comm. Start or Stop mode, Start measurement, and Trigger mode
STPC
(0xFE04)
CNTR
(0xFE00)
Increment
Set AMT status = 2 (end)
2 = end
If Scount != Icount,
Set recoding data buffer address related to Scount
me_mode()
same
process
with *
ps_mode()
start:
0
If Scount==Npart,
Scount=0
Check if Pcount==EchoPoint. If yes, go to start, if not, return
If Scount == Icount, return
ps_mode()
start: