Hi Waveform Funs, I have finished the first version of the stop master design based on our last meeting last month at Caltech. The following message is trying to tell you what it does. Please read it and send all your comments or any good ideas to me. If you have any question which I probably havn't described clearly in this following mail, please tell me. I plan to make an ACTEL chip later this week. --Rongzhi *********************************************************************** W A V E F O R M S T O P M A S T E R --------------- ------- ----------- 1.) General Description The circuit used Actel (A1010) FPGA to take care of both CAMAC interface and digital part of the circuit itself. The waveform stop will be generated at one millisecond after one of the scintillator triggers happened. The scintillator triggers include FMT (Fast Monopole Trigger) ERP CSPAM LIP (Lightly ionization particle) ST_MNP (Streamer Tube MoNoPole trigger) Caltech MNP (Caltech Slow Monopole trigger) For Caltech Slow monopole 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. Therefore, there are total five inputs for the Caltech slow monopole trigger corresponding to BOTTOM, CENTER, TOP, WEST, AND NORTH OR SOUTH faces. All the time info is gotten by using an external clock with 16 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 by 14 bits external switch. It allows to choose whatever time we want. (Note that the flip-flop counters have been synchronized.) 2.) CAMAC FUNCTION F = 9 ---> CLEAR EVERYTHING F = 2 ---> READ F = 3 ---> READ CAMAC FUNCTION TO READ THE TRIGGER TIME FOR DIFFERENT TRIGGER TYPE F:2 A:0 UNCONNECTED PINT 8 F:2 A:1 CALTECH SLOW MONOPOLE F:2 A:2 ERP F:2 A:3 PMT F:2 A:4 CSPAM F:2 A:5 LIP1 F:2 A: ST_MNP (Streamer Tube monopole trigger) F:2 A:7 spare for future use F:2 A:8 spare 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. For the caltech slow monopole trigger, there are more information installed such as face coincidence trigger and time information for the triggers from different faces. The following CAMAC function is to read the time information for each faces for the caltech slow monopole trigger. F:3 A:0 BOTTOM F:3 A:1 CENTER F:3 A:2 TOP F:3 A:3 WEST F:3 A:4 EAST F:3 A:5 NORTH OR SOUTH F:3 A:8 TELLS US WHICH TRIGGER HAPPENED, WHERE TOTAL 16 BITS STAND FOR BIT 0: TOHM BOTTOM FACE BIT 1: TOHM CENTER FACE BIT 2: TOHM TOP FACE BIT 3: TOHM WEST FACE BIT 4: TOHM EAST FACE BIT 5: TOHM NORTH OR SOUTH FACE BIT 6: TOHM FACE COINCIDENCE TRIGGER BIT 7: TOHM SINGLE FACE TRIGGER BIT 8: ERP BIT 9: FMT BIT 10: CSPAM BIT 11: LIP BIT 12: SPARE BIT 13: ST_MNP BIT 14: SPARE BIT 15: JUNK The bit number is from low to high as bits XXXX XXXX should be counted like 7654 3210. Hi WFD funs, Here are the answers to some questions about our new waveform stop master which asked by someone. It certainly helps to make a real stop MASTER. I thank you for your questions and suggestions. Again, I would like to ask you to harass me with more questions. Dumb questions are welcome. I was not able to program any chip later last week because our ACTEL programmer had been moved and not yet been re-installed. Q: Did the MASTER take computer busy into account? A: Most scintillator triggers have been taken the computer busy signals into account inside their circuits except the Caltech Slow Monopole trigger. The waveform master will take the computer busy for the Caltech Slow Monopole trigger. If the computer busy showed up before any slow monopole trigger happened, it would freeze the slow monopole trigger signals (not accept any slow monopole triggers). However, if any slow monopole trigger happened before the computer busy signal, the master would ignore any busy signals and finish its 1ms event cycle. Q: What happens if two slow monopole triggers are from the same face? A: The master will ignore any further slow monopole triggers from the same face because they are not the coincidence events which we want. Q: What is the decision for the inter-SM events? A: The master is based on each SM. For the inter-SM events we should check information and decide how to read out because 1ms delay has given enough time to record all the events inside. For both FMT and CSPAM events, two SM's waveforms will be stopped at the same time after 1ms delay. For the ERP trigger, two SM's waveforms will be stopped separately if there are two triggers happened for two SM's. Hence, for those who analyze the data, it's a little bit more work. But the data are there! Q: What if we decide change 1ms delay to some shorter time because the trigger rates are too high? A: In my last mail, I said that I was going to use a 14-bit external switches. I have decided not to use that, but use software instead. The master will be initialized at the beginning of the RUN and the delay information will be written through CAMAC bus. This time 16 bits all are under control. Q: Who is going to clear the waveform digitizer? A: The master has a inside register which registers all the triggers. By checking that register in the readout, the last one will clear the system. For example, if an event has both CSPAM and ERP triggers, the ERP will check other bits before it clears the waveform. In this case, it will not clear the waveforms because CSPAM triggered also. When the CSPAM finish readout, it will check all the triggers and decide whether to clear or not. Q: If a monopole trigger just happened before 1ms delay cycle, what does the MASTER do? A: There are two solutions to this question. The first is the same as the current WFD setup. That is that the stop signal will be delayed by another sufficiently long time in order to take care of that monopole passing through our detector. In the new WFD system, that means we have to wait another 1ms to obtain that goal. The second answer is that we will forget any further delay and stop the WFD's by only delay 1ms after the first trigger no matter when the slow monopole trigger happens within that delay time. The second answer sounds a little bit silly because we throw the event away after we know that it is a trigger. However, I think the real issue here is how long the delay can be so that the system can handle. We already sacrifice 1ms to wait for the coincidence signal coming out. Should we delay for another 1ms under the condition that the slow monopole triggers? At this moment, the MASTER will just go ahead without any further delay. But I think people should think about it. I personally intend to make another delay. Let me stress here that the further delay for slow monopole doesn't happen all the time. For example, most of the slow monopole triggers have only the Caltech slow monopole trigger itself. Therefore, the stop signal will be only delayed by 1ms. Some slow monopole triggers caused by muon events happened right after the other muon triggers (about 5us late), therefore, the extra delay is only several microseconds. Clearly the extra 1ms delay only happens for a very small number of events. Ciao, --Rongzhi Return-path: Received: from CITHE1.CITHEP.CALTECH.EDU by CITHE1.CITHEP.CALTECH.EDU (PMDF #12631) id <01GYYGRANTNK9VUJLH@CITHE1.CITHEP.CALTECH.EDU>; Thu, 3 Jun 1993 22:01 PST Date: Thu, 3 Jun 1993 22:01 PST From: RONGZHI LIU Subject: WFD STOP MASTER FINAL CALL!!! To: walter@CITHE501.CITHEP.CALTECH.EDU, kate@CITHE501.CITHEP.CALTECH.EDU, hong@budoe.bu.edu, KEARNS@BUPHYC.HEPNET, LUDLAM@BUPHYC.HEPNET, LANE@DUPHY4.PHYSICS.DREXEL.EDU, stone@BUPHYC.HEPNET Message-id: <01GYYGRANTNK9VUJLH@CITHE1.CITHEP.CALTECH.EDU> X-Envelope-to: KEARNS@BUPHYC.HEPNET, LUDLAM@BUPHYC.HEPNET, stone@BUPHYC.HEPNET X-VMS-To: @WFD X-VMS-Cc: RZL 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. Return-path: Received: from CITHE1.CITHEP.CALTECH.EDU by CITHE1.CITHEP.CALTECH.EDU (PMDF #12631) id <01GZ69FYLS009VUJTO@CITHE1.CITHEP.CALTECH.EDU>; Wed, 9 Jun 1993 11:58 PST Date: Wed, 9 Jun 1993 11:58 PST From: RONGZHI LIU Subject: Questions and answers about WFD To: walter@CITHE501.CITHEP.CALTECH.EDU, kate@CITHE501.CITHEP.CALTECH.EDU, hong@budoe.bu.edu, KEARNS@BUPHYC.HEPNET, LUDLAM@BUPHYC.HEPNET, LANE@DUPHY4.PHYSICS.DREXEL.EDU, stone@BUPHYC.HEPNET Message-id: <01GZ69FYLS009VUJTO@CITHE1.CITHEP.CALTECH.EDU> X-Envelope-to: KEARNS@BUPHYC.HEPNET, LUDLAM@BUPHYC.HEPNET, stone@BUPHYC.HEPNET X-VMS-To: @WFD X-VMS-Cc: RZL Dear WFD Super Funs, Thanks for your great concerning and carefully reading my mail! Here are some answers to the questions asked by some of you. Q.) I don't understand what you are saying about cross-SM slow monopoles. A.) Since the WFD stop master is based on each SM, we have to worry more about the coincidence triggers or non-coincidence triggers for the Caltech Slow MNP trigger. The reason is, as I said, that for a coincidence trigger we plan to read out every channel in the SM while for a single face trigger event we are only going to read out several channels. If a monopole crosses three SM's, we may get three single face triggers from three SM's even though it's a real coincidence trigger. What I was trying to say is that if a monopole event crosses two SM's we should get at least one coincidence trigger from one SM because we have three horizontal layers. Therefore, my argument is that we will be fine because we get one SM very detailed info plus another several channels info from the other SM. This argument is just try to tell that one SM based electronics is still fine for the Caltech SLow MNP trigger. Now for a monopole event crossing more than three SM's, we will get three single face triggers in three SM's. Hence, we cannot get any detailed information at this one SM based configuration. But, the thing is not so bad because the probability to get that large angle events is less that 0.8%. Q.) I am not sure that UTC time will be useful for TOF calculation. We need resolution good enough for FMT searches. A.) You have already known how good the UTC clock is. But one thing which you forgot is that the FMT is two SM's trigger, which means if a monopole crosses two SMs, the WFD in two SM's will either be stopped at the same time or we can get the time information from the stop master which should be better than 100ns. For very fast monopole, this resolution is certainly not good enough, but remember that I have modified the ERP which can give us a better inter-SM time. Q.) I am worried that your extra delay of the stop in the case of a late CIT trigger will cause problems. A.) Good worry! At first, I bet that it will not happen very often as I discussed in my last mail. It seems to me that we all agree that the dead time is not a problem by using this feature. You are worried about the readout system. If we plan to use smart readout to read different time window, adding this extra delay is not going to give any trouble. One the other hand, if we want to keep simple and read out only 1ms, we have to be more careful to select the readout window. To cover this problem and keep the readout simple, we probabily want to read 2ms. It sounds not good, but it's really determined by how good our zero suppression works. With 2mV threshold (suppression), it has only 50 pulses within 1ms window. (note that I used 50KHz trigger rate for 2mV threshold.) Well, I am waiting for the answer from WFD designers. I thought that we had asked someone to design a smart readout system, hadn't we? Q.) Did you miss up the EAST face for the monopole trigger? A.) Nope, but I did miss typing it in my mail. Q.) Should the WFD clear by the computer busy be used regarding the cross-talk? A.) Both bit-set and computer busy methods could be stopped if we don't want to use. The way which I built the computer busy to clear the system is that I have sent the signal out and then use an external input to clear. Hence, we can disconnect the input line to forget it. Another advantage of using this external I/O is that we can add other external clear if we want to. Now back to you discussion about the cross-talk, I assume that the cross-talk which you talked about is inside the stop master. If that is the case, I shall find it out and solve the problem. I don't know if you guys have seen any cross-talk mistake in the computer busy signal before. Since we have several choices, we can decide which way is the best in the real ACQ system. Q.) Why are you doing CAMAC writes only 4 bits at a time? A.) Because of I/O limit, I cannot have sixteen bit write lines. Instead, I used four write lines. Apparently, it's slower than 16 lines. But since the initialization only happens at the begining of each RUN, it's not going to be a problem. Q.) Did you have input for HIPT (Highly Ionization Particle Trigger)? A.) Yes, I have two extra inputs reserved for those who need them. Q.) What is the plan for the WFD readout? A.) It's too tough for me to answer. As I mentioned a little bit in above, I don't know any decision being made on that issue. But, I bet that you will see the real discussion on it soon. So, keep your eyes open! Q.) Should we keep these old WFD for the FMT/CSPAM use? A.) Ask our boss! It's a good idea to keep the old WFD for the FMT use because with 5:1 attenuation, we can get a very good resolution for big pulse and it's linear. Ciao, Rongzhi