TITLE Distributor Cap Transmit Sequencer PAL PATTERN Run IIA REVISION 2.0 AUTHOR Dan Edmunds COMPANY MSU HEP DATE 21-July-2003 ; This PAL on the Distributor Cap circuit board controls the sequence ; of steps in transmitting Trigger Tower Et data from the ERPB cards ; to the Spark/Bougie cards. The PAL is installed in the socket ; labeled GAL4 on the DC circuit board. ; In order to initiate a readout cycle, the Transmit_Trigger signal ; must be asserted for > 2 periods of the Xmit_Clk. Xmit_Clk ; currently has a 100 nsec period. The Enable_Transmit signal must be ; High for the Transmit_Trigger signal to have any effect. The ; Transmit_Trigger signal must not be asserted for more than about 130 ; periods of the Xmit_Clk or it will cause a second readout cycle. ; Use of this revision of the Transmit Sequencer PAL required a "white ; wire" to connect the Enable_Transmit signal to pin #8 of this part. ; Use of this revision also requires removing the Run I "white wires" ; that were used to move the strobe signal around via jumper header H2. CHIP DC_Trans PAL22V10 ; Input Pins ; 1 2 3 4 5 Xmit_Clk Xmit_Trig NC NC NC ; 6 7 8 9 10 NC Enb_Trans NC ENB_Confg SQ_Clk_Mask ; 11 12 13 SQ_FBack0 GND NC ; Output Pins ; 14 15 16 17 18 NU_Out_14 NU_Out_15 FSR_Clr Strobe Diag_D0 ; 19 20 21 22 23 Cntr_Clr Cntr_Load Cntr_ENP NU_Out_22 Verify ; 24 "25" VCC GLOBAL ; Note that a 25th pin was defined to use in the global ; set/reset definition of all registers at power up. ; Inputs ; Xmit_Clk is the clock train that runs all the time and is used both as ; the clock signal for this PAL and as the clock signal to sequencer the ; readout from the ERPB's to the Spark/Bougie. ; Xmit_Trig is the signal is the High active signal that tells the DC to ; begin sending out an event. The Xmit_Trig comes from the MTG-X signal. ; Xmit_Trig must be asserted for > 2 periods of the Xmit_Clk for it to ; have any effect. ; Enb_Trans is a High Active signal that enables the DC to perform ; readout cycles. If Enb_Trans is Low then the Xmit_Trig signal has no ; effect. Enb_Trans must be High for normal event readout to happen. ; Enb_Confg is a High Active signal that enables the DC to perform ; LCA Configuration. If Enb_Confg is High then the Xmit_Trig signal ; has no effect. Enb_Confg must be Low for normal event readout to happen. ; SQ_Clk_Mask is the signal from the U26 Sequencer PROM that gates the ; number of Data Strobes that come out of the DC and go along with the ; readout data to the Spark/Bougie. As currently setup, this signal must ; be Low to enable this PAL to output Data Strobes. Note that the ; Data Strobe output is normally Low and pulses High during readout. ; The Data Strobe is High during the time with Xmit_Clk is Low. ; SQ_FBack0 is the signal that controls how long the readout goes for. ; Once readout has been started by the Xmit_Trig signal the DC thinks ; that it is reading out as long as the SQ_FBack0 signal is Low. When ; the SQ_FBack0 signal returns High it forces that DC Sequencer PROM ; Address Counter back to zero which stops the DC readout process. ; It has been verified that all NC input pins to this device are connected ; to a sources of valid logic level which in most cases is a static line. ; Outputs ; FSR_Clr static signal tied Low. Tells the Fault Shift Register to Clear. ; Strobe This is the Data Strobe that is sent to the Spark/Bougie along ; with the ERPB data. ; Diag_D0 static signal tied Low. This becomes DIAB i.e. Diagnostic Data ; going down the Diasy Chain Cable. ; Cntr_Clr When this signal is Low it forces the Sequencer PROM Address ; Counter to zero. ; Cntr_Load static signal tied High. Tells the Sequencer PROM Address ; Counter not to Load. ; Cntr_ENP static signal tied High. Tells the Sequencer PROM Address ; Counter that ENP is asserted. ; Verify internal node used to verify that the Xmit_Trig is asserted ; for two ticks of the Xmit_Clk. ; NU_Out_14, NU_Out_15, NU_Out_22 Not Used Outputs. Defined to Gnd EQUATIONS GLOBAL.RSTF = GND ; Store the fact that Xmit_Trig and Enb_Trans were both asserted High ; for the duration of the Xmit_Clk. Verify := Xmit_Trig * Enb_Trans * /Enb_Confg ; Sequencer PROM Address Counter is forced to zero by Cntr_Clr being Low. ; Cntr_Clr can only become High when Verify, Xmit_Trig, and Enb_Trig are ; all 3 High and Enb_Confg is Low. Once Cntr_Clr is High it will be held ; High as long as SQ_FBack0 remains Low. Cntr_Clr = Xmit_Trig * Enb_Trans * /Enb_Confg * Verify + /SQ_FBack0 ; The Data Strobe goes High only when SQ_Clk_Mask is Low and Enb_Trans ; is High and the Enb_Confg is Low and Xmit_Clk is Low . Strobe = /SQ_Clk_Mask * Enb_Trans * /Enb_Confg * /Xmit_Clk ; Required static output signals Diag_D0 = GND ; Static tied Low FSR_Clr = GND ; Static tied Low Cntr_Load = VCC ; Static tied High Cntr_ENP = VCC ; Static tied High NU_Out_14 = GND ; Static tied Low not used output NU_Out_15 = GND ; Static tied Low not used output NU_Out_22 = GND ; Static tied Low not used output SIMULATION TRACE_ON Xmit_Trig Enb_Trans Enb_Confg Verify SQ_FBack0 Cntr_Clr Xmit_Clk SQ_Clk_Mask Strobe ; Setup normal state between event readouts except with Enb_Trans Low. SETF /Xmit_Trig /Enb_Trans /Enb_Confg SQ_Clk_Mask SQ_FBack0 /Xmit_Clk SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Try to initiate readout with Enb_Trans Low and check that nothing happens. SETF Xmit_Trig SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Now setup normal state between event readouts except with Enb_Confg High. SETF /Xmit_Trig Enb_Trans Enb_Confg SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Try to initiate readout with Enb_Confg High and check that nothing happens. SETF Xmit_Trig SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Now etup normal state between event readouts with Enb_Trans High and ; with Enb_Confg Low. SETF /Xmit_Trig Enb_Trans /Enb_Confg ; Initiate readout and check that Verify and Cntr_Clr both go High ; after the clock edge. SETF Xmit_Trig CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk CHECK Verify Cntr_Clr /Strobe SETF /Xmit_Clk CHECK Verify Cntr_Clr /Strobe ; Let SQ_FBack0 fall Low. Check that Verify and Cntr_Clr remains ; asserted High. SETF /SQ_FBack0 SETF Xmit_Clk SETF /Xmit_Clk CHECK Verify Cntr_Clr /Strobe ; Let Xmit_Trig fall Low. Check that Verify returns Low and that ; Cntr_Clr remains asserted High. SETF /Xmit_Trig SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify Cntr_Clr /Strobe ; Let this run for a few cycles of Xmit_Clk just like it would during ; a readout cycle. Check that nothing changes. SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify Cntr_Clr /Strobe SETF Xmit_Clk SETF /Xmit_Clk CHECK /Verify Cntr_Clr /Strobe ; Let SQ_FBack0 return High at the end of this event readout and check ; that this makes Cntr_Clr return Low. SETF Xmit_Clk SETF SQ_FBack0 CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk ; Now check the generation of the Strobe signal. ; Check that with Enb_Trans at a Low that we have no data Strobe. ; Note that SQ_Clk_Mask is Low and that Enb_Confg is also Low ; both of which need to be Low to enable the data Strobe. SETF /Enb_Trans /Enb_Confg /SQ_Clk_Mask CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Check that with Enb_Confg at a High that we have no data Strobe. ; Note that SQ_Clk_Mask is Low which is needed to enable the data Strobe. ; Note that Enb_Trans is High which is needed to enable the data Strobe. SETF Enb_Trans Enb_Confg /SQ_Clk_Mask CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Now with Enb_Trans at a High and Enb_Confg at a Low we should get ; data Strobe. Start with SQ_Clk_Mask High to block the data Strobe. SETF Enb_Trans /Enb_Confg SQ_Clk_Mask SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe ; Now SQ_Clk_Mask comes Low to enable the data Strobe. SETF /SQ_Clk_Mask SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr Strobe ; Now when SQ_Clk_Mask goes back High at the end of the event the data ; strobes should stop. SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF SQ_Clk_Mask CHECK /Verify /Cntr_Clr /Strobe SETF /Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe SETF Xmit_Clk CHECK /Verify /Cntr_Clr /Strobe TRACE_OFF