
*************************************************************************
*                                                                       *
*                           LEVEL 1 TRIGGER                             *
*                     VME Transfer Computer Program                     *
*                                                                       *
*                  VERSION: 4          DATE:  3-NOV-1993                *
*                ----------------------------------------               *
*                                                                       *
*                For Use with March July 1993  COMINT PROM's            *
*              -----------------------------------------------          *
*                                                                       *
*************************************************************************

*************************************************************************
*                                                                       *
*             MODIFICATION - ADDITION                  DATE      NAME   *
*   ----------------------------------------------   ---------   ----   *
*                                                                       *
*************************************************************************


*******************************************************************************
*                                                                             *
*    Address Map of the Level 1 Trigger VME Crate (133A's view)               *
*                                                                             *
*    $0000 0000  through  $000F FFFF    133A Module Memory                    *
*    $0030 0000  through  $0030 7FFF    VME 214 Module for COMINT Trig Block  *
*    $0034 0000  through  $0034 7FFF    "2nd" VME 214 Module for Vertical     *
*                                          Interconnect Data when Reading     *
*    $0038 0000  through  $003F FFFF    VBD Buffer Memory                     *
*                                                                             *
*    $0064 0000  through  $0064 7FFF    "2nd" VME 214 Module for Vertical     *
*                                          Interconnect Data when Loading     *
*                                                                             *
*    $FFFF 9000  through  $FFFF 97FF    Short 214 IO Space Memory             *
*    $FFFF A000  through  $FFFF BFFF    VBD Control Memory                    *
*    $FFFF C000  through  $FFFF C0FF    Crate ID Register Card                *
*    $FFFF F000  through  $FFFF F00F    Ironics 1623 Digital IO Card          *
*                         $FFFF ????    Vertical Interconnect Reg.            *
*                                                                             *
*    $10uv wxyz   Vertical Interconnect to Central Calorimeter.               *
*    $11uv wxyz   Vertical Interconnect to South End Cap Calo.                *
*    $12uv wxyz   Vertical Interconnect to North End Cap Calo.                *
*    $13uv wxyz   Vertical Intrcnct to Central Detector and Abso Time.        *
*                                                                             *
*                                                                             *
*    The following is a list of the memory locations that will be used in     *
*    the VME-214 Memory module.   Recall that this module lives in VME        *
*    addresses $00300000  through  $00307FFF.                                 *
*                                                                             *
*        VME Address Range                     Contents                       *
*    ---------------------------      --------------------------------        *
*    $00300000 through $00302C6C       Data built by the COMINT Card.         *
*    $00305000 through $0030501F       Crate Header data 5 longwords          *
*                                                                             *
*                                                                             *
*    The following is a list of the memory locations that will be used in     *
*    the "2nd" VME-214 Memory module to hold data read over the Vertical      *
*    Interconnect.   Recall that this 2nd memory module lives in VME          *
*    addresses $00340000  through  $00347FFF.                                 *
*                                                                             *
*        VME Address Range                     Contents                       *
*    ---------------------------      --------------------------------        *
*    $00340000 through $003400FF       Central Detector Pulser Data           *
*    $00340100 through $003401FF       Calorimeter Pulser Data                *
*    $00340800 through $00340817       Absolute Time Data                     *
*                                                                             *
*                                                                             *
*                                                                             *
*         List of VBD DMA sections used to build the data block               *
*            Block Structure of the April 1992 COMINT PROM's                  *
*       ---------------------------------------------------------             *
*                                                                             *
*                                                         Rev.  20-APR-1992   *
*                                                                             *
*                                     BLOCK                                   *
*          BLOCK LENGTH IN       STARTING LOCATION                            *
*       ---------------------   -------------------                           *
* BLK   967 ITEMS   LONGWORDS   967 ITEM   LONGWORD                           *
* Num    DECIMAL     DECIMAL    DECIMAL    ADRS HEX           CONTENTS        *
* ---   ---------------------   -------------------   ----------------------  *
*                                                                             *
* **"0"    "10"         5        "    "   $305000      Crate Header           *
*                                                                             *
*   1      532        266            1    $300004      Current Framework      *
*                                                                             *
*   2     1280        640          535    $300430      Current CTFE Et Data   *
*                                                                             *
*   3      532        266         1817    $300E34      Previous Framework     *
*                                                                             *
*   4     1280        640         2351    $301260      Previous CTFE Et Data  *
*                                                                             *
*   5      130         65         3633    $301C64    Reserved Block 130 Items *
*                                                    This was EM Et Jet List  *
*                                                                             *
*   6      130         65         3765    $301D6C    Reserved Block 130 Items *
*                                                    This was Tot Et Jet List *
*                                                                             *
*   7      640        320         3897    $301E74      Mask of Jet Patterns   *
*                                                                             *
*   8      320        160         4539    $302378    Reserved Block 320 Items *
*                                                    This was TRD Hot Tower   *
*                                                                             *
*   9       82         41         4861    $3025FC    Spec Trig Prog  vs       *
*                                                      EM or Tot Et Ref Set   *
*                                                    Reserved Block 18 Items  *
*                                                      This was the Spec Trig *
*                                                      Programmed & Fired     *
*                                                    Spec Trig Prog  vs       *
*                                                      Large Tile Ref Set     *
*                                                                             *
*  10       40         20         4945    $3026A4     Large Tile Jet Pattern  *
*                                                                             *
*  11       72         36         4987    $3026F8      Level 1.5 Data         *
*                                                                             *
*  12       12          6         5061    $340800      Absolute Time data     *
*                                                                             *
*  13      340        170         5075    $3027A8      Additional Level 1     *
*                                                      Scalers and Foreign    *
*                                                      Scalers                *
*                                                                             *
* **"14"   "256"      128        "5417"   $340000      Pulser Programm Data   *
*                                                                             *
*                                                                             *
*   Notes:  The symbol ** implies that this line is for reference only.       *
*           This is NOT part of the COMINT PROM's.                            *
*                                                                             *
*           From the start of the Header through the L1 & Foreign Scalers is  *
*           a total of 2714 LongWords.                                        *
*                                                                             *
*           From the start of the Header through the Pulser Programming Data  *
*           is a total of 2843 LongWords  (equals 11,372 Bytes).              *
*                                                                             *
*******************************************************************************


***************************************************************************
*                                                                         *
*                                                                         *
*    Program Outline:                                                     *
*                                                                         *
*       1. Get the Version Number and the Rivision Numbers                *
***************************************************************************

VTC_Main  IDNT                          ; title.
          ORG     $95000                ; start of code (MVME133A).

          JMP     StrInt                ; Jump to the start of initialization.

*************************************************************************
*  This sections calls all of the include files.                        *
*                                                                       *
*  68020_EQUATES.INC defines macros to be used to call MVME133ABUG ROM. *
*                                                                       *
*************************************************************************

        INCLUDE  68020_Equates.Inc       ; Get the MVME133A BUG ROM Calls.

        INCLUDE  Main_Symbols.Include    ; Get the global symbol include file.

*************************************************************************
*                                                                       *
*        **********     START OF THE PROGRAM     **********             *
*                                                                       *
*************************************************************************
*                                                                       *
*  Send the Wake-Up message to the 68k terminal.                        *
*                                                                       *
*************************************************************************

StrInt  PEA.L   ResetTerm               ; Put the Reset Terminal string for
        SysCall .Write                  ; a VT-320 on the stack and send it.

        PEA.L   Hello                   ; Push the Hello message address on
        SysCall .WriteLn                ; the stack and send it out.

        PEA.L   BlankLn                 ; Push the Blank Line address on the
        SysCall .WriteLn                ; stack and send it out.
        PEA.L   Motto                   ; Push the Motto message address on
        SysCall .WriteLn                ; the stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        SysCall .WriteLn                ; stack and send it out.

*************************************************************************
*                                                                       *
*   Get the MVME133A-20 instruction cashe memory running.               *
*************************************************************************

        Move.L   #1,D0                 ; Turn on the 68020 instruction cashe.
        MoveC    D0,CaCR

*************************************************************************
*  Initialization:                                                      *
*                                                                       *
*  Call the following routines to initialize the hardware and the       *
*  software for both the L1 Trigger and for the Pulser and the          *
*  Absolute Time data that we are transporting.                         *
*************************************************************************

        JSR   Begin_Initialize_Hard_Soft      ;

        JSR   Begin_Initialize_Pulser         ;

        JSR   Begin_Initialize_Time           ;


*************************************************************************
*  Cyclic Event Processing                                              *
*                                                                       *
*  Call the routine that handles the cyclic event processing.           *
*                                                                       *
*************************************************************************

        JSR   Begin_Cycle_Master              ;

*************************************************************************
*  Define Constants:                                                    *
*                                                                       *
*  Data used to send messages to the 68k terminal screen.               *
*                                                                       *
*************************************************************************

ResetTerm     DC.B    11,$9B,'!p',$9B,'2J',$9B,'0;0H'

Hello         DC.B    44,'Level 1 Trigger VME Transfer Program  Ver: 4'

Motto         DC.B    42,'             DUM LICET UTERE              '

BlankLn       DC.B     4,'    '


*************************************************************************
*  Define Constants:                                                    *
*                                                                       *
*  Specify the symbols to Import.                                       *
*************************************************************************

        XREF   Begin_Initialize_Hard_Soft,Begin_Initialize_Pulser
        XREF   Begin_Initialize_Time,Begin_Cycle_Master

        END

