WFD STOP MASTER FINAL CALL!!!

RONGZHI LIU ("VAXGS::CITHEX::RZL"@lngs.infn.it)
Fri, 4 Jun 1993 7:02:45 +0300 (CET-DST)

Gentle WFD Funs,

Here is the final call to remind you that we are about ready to
program the WFD stop masters. If you have any questions, suggestions,
and complains, you are very welcome to send them to me. I have prepared
the following introduction (draft) for you to check how the design goes.
I will also encourage you to ask questions or even challenge me with
better ideas.

The Actel chip is antifuse technology which means as soon as we programmed
it we cannot change it until we have money to buy new chips. I hope all
your feedback could be sent to me within two weeks. After that, if you
want to make a change, you will pay the price!

Your humble servant
Rongzhi Liu

-----------------------------------------------------------------------

W A V E F O R M S T O P M A S T E R
--------------- ------- -----------

1.1 Purpose

This piece of electronics is designed to manage the MACRO scintillator
triggers in order to properly stop the new waveform system. (this short
introduction will only describe the function of the electronics. Mainly
the two ACTEL chips. The outside supporting parts such as line drivers
and level adapters will be completed in the real manual later.)

1.2 General Description

The WFD (WaveForm Digitizer) stop master is planning to take care of all
the triggers, mainly the scintillator triggers, which need to read out the
waveform information. The scintillator triggers include
FMT (Fast Monopole Trigger),
ERP,
CSPAM,
LIP (Lightly ionization particle),
Caltech MNP (Caltech Slow Monopole trigger).
Also for ST_MNP (Streamer Tube Monopole) trigger, the master will allow
it to stop the WFD.

The WFD stop master is one supermodule based which means each super
module will have its own stop master to manage the stop issue in that
SM for all triggers. The question which you may immediately ask for
is how it handles the events crossing multi SM's. To answer that question,
let's discuss different types of triggers separately.

There are basically two types of triggers in MACRO scintilltor system.
One is face coincidence triggers such as the FMT, the CSPAM, and the
LIPs. The other is single face triggers like ERP and the Caltech MNP.
For the FMT and the CSPAM which have two combined SM's together, the
stop signal will be sent to the WFD's in both SM's. For the ERP trigger,
two SM's will have their own triggers which are going to stop each SM
respectively. The relative time of these two triggers can be gotten
from the ERP inter-SM time which has already been installed. For the
Caltech MNP, if the event crosses over two SM's, one SM will have a
coincidence signal while the other SM's will have a signal face trigger.
If we want to read out very detailed information for coincidence event
such as reading out every channel in that SM while only read out a
couple of channels for the single face event, it's still fine in
this case. However, it will not get any coincidence trigger for a
monopole event crossing through more than three SM's. Therefore, we
will not get very detailed information as before. I have made a Monte
Carlo simulation to calculate the probability to get such kind of
large angle events. It turns out that 99.2% events will stay within
two SM's. Hence, from the sense of acceptance, we don't loss much
by doing this simple way. The relative trigger time in two SM's can be
obtained from the UTC time in the uVAX. It's not so accurate because
of different cable delay in each SM, but it should be OK for the slow
monopole events.

Simply speaking, the waveform stop signal will be generated at one
millisecond after one of the scintillator triggers or the ST_MNP
trigger happens. The reason for one millisecond long delay is to give
enough time for the slowest monopoles to fly through the detector.
More clearly, the WFD stop signal will be generated by the trigger
which arrived at the WFD master at first. But for those later triggers,
the master will record the time information relative to the first
trigger. However, for the Caltech Slow Monopole there is a little
bit difference. Namely, when the Caltech MNP happens, the stop signal
will not be generated until one millisecond delay obtained after the
Caltech MNP trigger regardless any other triggers happened before it.
For instance, if the Caltech MNP happened at 500us after the CSPAM
trigger, the WFD stop signal will be generated at 1.5ms after the CSPAM
trigger or 1ms after the Caltech MNP trigger.

The following simple time diagrams are trying to help your understanding.
The first one is the case that the Caltech MNP didn't trigger while the
second one is the case that the Caltech MNP triggered.
____
CSPAM _______| |______________________________________________________
___
ERP _____________| |_________________________________________________
_____
STOP _____________________________________________| |_______________

time 0 1ms

____
CSPAM _______| |______________________________________________________
___
ERP __________| |____________________________________________________
____
TOHM ______________________| |_______________________________________
_____
STOP ___________________________________________________________| |_

time 0 0.3ms 1ms 1.3ms

The reason which we do this way is just to try to give an
advantage to the Caltech MNP. But, nevertheless, it doesn't
really add 1ms extra delay for every trigger as it looks. The
reason is quite simple. If the Caltech MNP happens first, it's
just like usual one millisecond delay. Those who are familiar
with the current system may remember that a large number of the
Caltech MNP trigger happened just by themselves. Sometimes, it
triggers by muon events, but in this case the trigger signal
comes out very quickly just about five microseconds after the
muon triggers. As you see from the above time diagram, the
extra-delay is only that a few microseconds. Only a very small
probability does the Caltech MNP trigger take place very late in
the 1ms time window which will surely cause another 1ms extra
delay.

For the Caltech MNP trigger, there are some more details should be
taken care of such as face coincidence and time info for the trigger from
each different face because we are not going to use the old Latching
Scaler anymore. Therefore, there are total five inputs for the Caltech
slow monopole trigger corresponding to BOTTOM, CENTER, TOP, WEST, and NORTH
or SOUTH faces.

Since all other types of triggers have taken computer busy
into account in their own trigger circuits, the stop master will use the
computer busy signal to take care of the slow monopole trigger. It has been
design in such a way that if any slow monopole trigger happens before the
computer busy shows up, the master will ignore the computer busy and finish
its 1ms counting period. However, if the computer busy signal shows up
before any slow monopole trigger, it will freeze the circuit not to accept
any slow monopole till the computer busy signal is up. That means the
circuit will be unfrozen at the falling edge of the computer busy signal.

The circuit used two Actel (1020A) FPGA chips to take care of
both the Caltech MNP and the other triggers. Both chips has CAMAC
interface. It allows the CAMAC to talk with each chip
independently.

All the time info is gotten by using an external clock with 16
bits Flip- Flops counter. Therefore, the period of the clock time
can be as short as 20ns, which we probably don't need. The one
millisecond delay is controlled through MSB by CAMAC, which will
be set up during the initialization at the beginning of each run.
It allows to choose whatever time we want. (Note that the
flip-flop counters have been synchronized.) Since each chip has
its own CAMAC interface, the delay time for the Caltech MNP can
be set at different value from other triggers in the other chip.

1.3 CAMAC FUNCTION

F = 9 ---> CLEAR EVERYTHING
F = 2 ---> READ chip 1
F = 3 ---> READ chip 1
F = 4 ---> READ chip 2
F = 5 ---> READ chip 2
F = 16---> WRITE to chip 1
F = 17---> WRITE to chip 2

Initialize the circuit
F:16 A:8 XXXX write bit 0 to bit 3 for the delay time control
F:16 A:9 XXXX write bit 4 to bit 7
F:16 A:10 XXXX write bit 8 to bit 11
F:16 A:11 XXXX write bit 12 to bit 15

For example, if we use 10MHz (100ns) clock, THe binary number for 1ms time
window with 100ns is 101110001000000. The pattern for all 16 bits which
we should set up is that the bit 13, bit 11, bit 10, bit 9 and bit 5 are
1 while all other bits should be set to zero. Therefore, the CAMAC commands
should be
F:16 A:8 0000
F:16 A:9 0100
F:16 A:10 0011
F:16 A:11 0101

CAMAC FUNCTION TO READ THE TRIGGER TIME FOR DIFFERENT TRIGGERS
F:2 A:0 CALTECH SLOW MONOPOLE
F:2 A:1 ERP
F:2 A:2 ST_MNP (Streamer Tube monopole trigger)
F:2 A:3 FMT
F:2 A:4 CSPAM
F:2 A:5 LIP
F:2 A:6 spare input 1 for future use
F:2 A:7 spare input 2 for future use

``F'' is CAMAC function and ``A'' IS CAMAC ADDRESS.

Therefore, F:2 A:1 will read out the time info for caltech slow mnp relative
to the first trigger which is one of these eight input trigger signals. But
if it is the first trigger, the time is ZERO. For those inputs which don't
have trigger signals during 1ms period, their times will count down to the
full scale which is 1ms.

CAMAC function can read out the trigger register information and also
the WFD clear information which to let each readout know whether or
not it should clear the WFD's after readout.
F:3 A:0 read out an sixteen bits number for eight designed triggers,
where bit 0: Caltech slow monopole,
bit 1: ERP,
bit 2: ST. MNP,
bit 3: FMT,
bit 4: CSPAM,
bit 5: LIP,
Bit 6: spare 1,
bit 7: spare 2,

bit 8: for the ERP to check after its readout,
bit 9: for St_MNP,
bit 10: for Caltech Monopole,
bit 11: for FMT,
bit 12: for Cspam,
bit 13: for LIP,
bit 14: for spare 1.

For instance, readout 1110000000100010 means that the ERP and the LIP
triggered. But the ERP cannot clear the WFD's because bit 8 is zero
which means another trigger also happened. After LIP readout, it checks
the bit 13 and since bit 13 is set the LIP will clear the WFD's.
Note that the readout order is the order of the trigger number. In
another words, the trigger number 2 will be read first if both trigger
2 and trigger 3 happened. Therefore, What I did for these WFD's clear
information is simply checking all the other triggers which should be read
out after the current trigger. For example, bit 8 is the ``NOR'' of all
other seven triggers because the ERP (trigger number 2) is the first
trigger in the scintillator trigger system. If the bit 8 hasn't been set,
that means that there are some other triggers happened. Hence, the ERP
cannot clear the WFD's after its readout. The same idea will be applied
for the other triggers. Apparently, the last trigger don't need check
anything and directly clear the system.

The WFD clear is a pretty important issue. There is another way
which I have made inside the circuit. It going to clear the
circuit at the end of the computer bust signal. The advantage is
that the circuit will be guaranteed cleared after each trigger.
But it will be cleared every event cycle no matter whether there
is or not a trigger for the WFD stop master.

The following CAMAC function is to read the time information for
each faces for the caltech slow monopole trigger (in Actel chip
2).

F:4 A:1 BOTTOM
F:4 A:0 CENTER
F:4 A:7 TOP
F:4 A:4 WEST
F:4 A:5 EAST
F:4 A:6 NORTH OR SOUTH

F:5 A:0 the least significant seven bits registed for slow monopole trigger
from each face and the coincidence trigger.
BIT 0: COINCIDENCE TRIGGER WITHIN 1MS GATE
BIT 1: CENTER FACE
BIT 2: BOTTOM FACE
BIT 3: WEST FACE
BIT 4: EAST FACE
BIT 5: NORTH/SOUTH FACE
BIT 6: TOP FACE

The bit number of ``XXXX XXXX'' should be counted like 7654 3210, which is
the least significant bit in the right.

1.4) Schematics

It will be ready later in the postscript file.