-------------------------------- AddInt defs for control Wc, MAc
VAL INT  PCPAR    IS   0:
VAL INT  DESTPC   IS   1:
--*************************************
--              CONSTANTS
--*************************************

VAL INT  VALID    IS   2:
VAL INT  OPC      IS   3:
VAL INT  BW       IS   4:
VAL INT  NUSR     IS   5:
VAL INT  WEN      IS   6:
VAL INT  REN      IS   7:
VAL INT  LSM      IS   8:
VAL INT  SP       IS   9:
-------------------------------  AddInt defs for control from Dec1
VAL INT NTRM      IS   0:
VAL INT DPC       IS   1:
------------------------------- Circuit constants
VAL INT IVSS      IS  0:
VAL INT IVDD      IS  1:
VAL BOOL VSS      IS  FALSE:
VAL BOOL VDD      IS  TRUE:
------------------------------  Dec1 defs for RegCpla output
VAL INT  NIMM     IS  24:
VAL INT  MULT     IS  0 :
VAL INT  TON      IS  19:
VAL INT  TOI3     IS  13:
VAL INT  BWEN     IS  5 :
VAL INT  NRDG     IS  23:
VAL INT  NTOX     IS  22:
VAL INT  NALW0    IS  17:
VAL INT  NALW1    IS  18:
VAL INT  LRNP     IS  25:
-----------------------------------  reg bank
VAL INT ABUS         IS 0:
VAL INT BBUS         IS 1:
VAL INT num.of.reg   IS 37:
VAL INT UNDEF        IS 60:   --not a valid address
-----------------------------------DatInterface
VAL INT ABT IS 0:
-----------------------------------


--**************************************
--     DELAYS (in nanoseconds)  CMOS(?)
--**************************************

VAL INT  REGISTER.DELAY       IS    11:     
VAL INT  REGISTER.DELAY.ASU   IS     9:     
VAL INT  REGCPLA              IS    10:
VAL INT  XOR                  IS     1:
VAL INT  TOGGLE               IS     3:
VAL INT  NOR                  IS     1:
VAL INT  XOR                  IS     1:
VAL INT  MULLERC              IS     2:
VAL INT  SELECT               IS     2:
VAL INT  CALLR                IS     1:
VAL INT  CALLA                IS     3:
VAL INT  ARBITERX             IS     5:
VAL INT  ARBITER              IS     5:
VAL INT  AND.GATE             IS     1:      
VAL INT  OR.GATE              IS     1:       
VAL INT  EVLATCH              IS     1:
VAL INT  SHIFT.DELAY          IS    10:
VAL INT  DESWAIT              IS     3:
VAL INT  MULT.DELAY           IS   100:
VAL INT  MULT.PASS            IS     3:
VAL INT  ALU.DELAY            IS    16:
VAL INT  WRITE.ENABLE         IS     2:
VAL INT  WRITE.COMPLETE       IS     3:
VAL INT  REG.CELL.DELAY       IS     5:
VAL INT  RB.DEC.DELAY         IS     1:    --register bank decode delay
VAL INT  SRAM.DELAY           IS    10:     --delay=(uncertain=ns_4, ZZ=ns_1, out=ns_10)
VAL INT  TUBAS.DELAY          IS    10:     --(delay=ns_10)
VAL INT  ALUPLA.DELAY         IS    10:

--******************************************
--            PIPE DELAYS
--******************************************

VAL INT  DEC3.DELAY         IS   ALUPLA.DELAY + REGISTER.DELAY:
VAL INT  DEC3.DELAY.INT     IS   ALUPLA.DELAY:
VAL INT  NGEN.DELAY.INT     IS   1:  
VAL INT  NGEN.DELAY         IS   ((SELECT+XOR)+NGEN.DELAY.INT) + REGISTER.DELAY: 
VAL INT  DOUT.DELAY.INT     IS   2:
VAL INT  DOUT.DELAY         IS   DOUT.DELAY.INT+ REGISTER.DELAY:
VAL INT  DIN.DELAY.INT      IS   2:
VAL INT  DIN.DELAY          IS   DIN.DELAY.INT + REGISTER.DELAY:
VAL INT  IMM.DELAY.INT      IS   3:
VAL INT  IMM.DELAY          IS   IMM.DELAY.INT + REGISTER.DELAY: 
VAL INT  RDGEN.DELAY        IS   10: 
VAL INT  INCREMENT.DELAY    IS    5:
--*************************************
--            PIPE SIZES
--*************************************
VAL INT  PCPIPE.SIZE           IS  2:
VAL INT  IPIPE.SIZE            IS  5:
VAL INT  DEC1REGB.SIZE         IS  1:
VAL INT  DEC2REGA.SIZE         IS  1:
VAL INT  DEC3.SIZE             IS  3:
VAL INT  CPSR.SIZE             IS  1:
VAL INT  OP.SIZE               IS  1:
VAL INT  DEC2REGB.SIZE         IS  1:
VAL INT  NGENPIPE.SIZE         IS  2:
VAL INT  IMMPIPE.SIZE          IS  2:
VAL INT  RBCTRL2PIPE.SIZE      IS  1:            --Out-REGISTER
VAL INT  MEMCPPIPE.SIZE        IS  5:
VAL INT  MRRPIPE.SIZE          IS  1:
VAL INT  MARPIPE.SIZE          IS  1:
VAL INT  DOUT.SIZE             IS  3:
VAL INT  RBIREG.SIZE           IS  1:
VAL INT  RBWREG.SIZE           IS  1:
VAL INT  RBALKFIFO.SIZE        IS  3:
VAL INT  RBMLKFIFO.SIZE        IS  4:
VAL INT  PCREGPIPE.SIZE        IS  2:
VAL INT  LSMREG.SIZE           IS  1:
VAL INT  APIPE.SIZE            IS  2:
VAL INT  DEC1REGA.SIZE         IS  1:
VAL INT  WCTRLREG.SIZE         IS  1:
VAL INT  DINPIPE.SIZE          IS  1:
VAL INT  CTRL3RREG.SIZE        IS  1:
VAL INT  XPIPE.SIZE            IS  3:
--*************************************
--             PIPELINE IDs
--*************************************
VAL INT  IPIPE                IS   0:   --Dec1/CtrlA
VAL INT  PCPIPE               IS   1:   --Dec1/CtrlA
VAL INT  XPIPE                IS   2:   --XptoXl
VAL INT  DEC1REGB             IS   3:   --Decode2/Dec2Ctrl
VAL INT  DEC1REGA             IS   4:   --AddC
VAL INT  DEC2REGA             IS   5:   --Decode2/Dec2Ctrl
VAL INT  DEC2REGB             IS   6:   --Decode2/Ctrl2
VAL INT  NGENPIPE             IS   7:   --Decode2/Ctrl2 
VAL INT  RBCTRL2PIPE          IS   8:   --Decode2/Ctrl2
VAL INT  RBWREG               IS   9:   --Reg/WriteCtrl 
VAL INT  RBIREG               IS  10:   --Reg/ReadCtrl 
VAL INT  RBALKFIFO            IS  11:   --Reg/Write
VAL INT  RBMLKFIFO            IS  12:   --Reg/Write
VAL INT  DEC3PIPE             IS  13:   --Decode3/Ctrl3
VAL INT  CPREG                IS  14:   --Decode3/Ctrl3
VAL INT  OPREG                IS  15:   --Decode3/Ctrl3
VAL INT  MEMCPPIPE            IS  16:   --DatInt/DestCtrl
VAL INT  MRRPIPE              IS  17:   --DatInt/DestCtrl
VAL INT  MARPIPE              IS  18:   --DatInt/MemCtrl
VAL INT  DOUT.PIPE            IS  19:   --DatInt/MemCtrl
VAL INT  PCREGPIPE            IS  20:   --AddC
VAL INT  LSMREG               IS  21:   --AddC
VAL INT  APIPE                IS  22:   --AddC
VAL INT  WCTRLREG             IS  23:   --AddC 
VAL INT  DINPIPE              IS  24:   --WrtCtrl/ WrtCtrl2
VAL INT  CTRL3RREG            IS  25:   --WrtCtrl/ WrtCtrl2
VAL INT  IMMPIPE              IS  26:   --Decode2/Ctrl2
--*************************************
--             MEMORY
--*************************************

--VAL INT MEMSIZE IS 16384:       --16K RAM
VAL INT MEMSIZE IS 32768:         --32K RAM
VAL INT READ IS 0:
VAL INT WRITE IS 1:

--*************************************
--             PROTOCOLS
--*************************************
VAL INT MESGLEN IS 4:             --message format
VAL INT TIME.STAMP IS 1:
VAL INT TIME.IN IS 2:
VAL INT STALL IS 3:



VAL INT OCCT.SIZE IS 20:          --occupancy table indices:rows
VAL INT OCCT.COL  IS 5:           --occupancy table indices:collumns
VAL INT PIPE.SIZE IS 10:
VAL INT MAX.DELAY IS 11:
VAL INT PIPE.ID  IS 12:
VAL INT T.IN  IS 0:
VAL INT T.OUT  IS 1:




VAL INT DEBMESG IS 140:
VAL INT PREEMPT.SIZE IS 6:

PROTOCOL BUNDLE IS [MESGLEN]INT:


--PROTOCOL BUNDLE.ON.LINK IS INT;[MESGLEN]INT:
--PROTOCOL MONITOR.ON.LINK IS INT;[DEBMESG]BYTE: --this needs to be variant for
                                               --other types of monitoring information

PROTOCOL OUT.CHAR IS BYTE:
PROTOCOL READ.WRITE IS [3]INT:



PROTOCOL LINK.TO.LINK
  CASE
    bundle;INT;[MESGLEN]INT         -- BUNDLE.ON.LINK
    trace1 ;[DEBMESG]BYTE            --TRACE.ON.LINK
    eval1  ; [OCCT.SIZE][OCCT.COL]INT       --OCCUPANCY.TABLE.ON.LINK  
    preempt1 ; [PREEMPT.SIZE]INT  
    out.char; BYTE                  --OUT.CHAR
    read.write; [3]INT              --READ.WRITE
    to.memory; INT
:

PROTOCOL DEB.MESSAGE
  CASE
    trace; [DEBMESG]BYTE            --trace message
    eval ; [OCCT.SIZE][OCCT.COL]INT        --occupancy table
    preempt ; [PREEMPT.SIZE]INT     --process id, preemption frequency, preemption magnitude
:


--***************************************************
--            MONITORING
--***************************************************
VAL INT  KILL                IS   0:
VAL INT  NO.KILL             IS   1:
VAL INT  FLUSH               IS   0:
VAL INT  NO.FLUSH            IS   1:
VAL  [MESGLEN]INT  NULL1     IS   [0,0,0,0]:

VAL INT HIST.SIZE            IS         1000:
VAL INT TIMEOUT              IS   (1406250):   --2 1 mins
VAL INT IOTIMEOUT            IS   (3515625):  -- 5 mins
VAL INT NUM.OF.BCHANS        IS           9:  --# similar chans multiplexed/demultiplexed
VAL INT NUM.OF.DCHANS        IS           1:  --# similar chans multiplexed/demultiplexed

VAL INT BUF.SIZE             IS          12:  --demultiplexor buffers

VAL INT TRACE                IS           0:
VAL INT TRACE.OUT            IS           1:
VAL INT NO.TRACE             IS           2:
VAL INT EVALUATE             IS           1:
VAL INT NO.EVALUATE          IS           0:
VAL INT PREEMPTION.OFF       IS           0:
VAL INT PREEMPTION.ON        IS           1:
--**************************************************
--            TERMINATION
--**************************************************
VAL INT FINISH IS -#FFFF:
VAL INT TERM   IS  #0008:    --0000...1000   Temr[3] = TRUE : control for instruction


--**************************************************
--            PREEMPTIONS
--**************************************************
VAL INT WRTCTRL.ID           IS           0:
VAL INT ADDC.ID              IS           1:
VAL INT DEC1A.ID             IS           2:

VAL INT REPORT.INTERVAL      IS           1000:  --simulated time (1406250/4) :  --0.5 mins 

--**************************************************
--            LOOKAHEAD
--**************************************************
VAL INT        NULL.MESSAGE            IS    #99999999: 

--VAL INT      NO.OF.MSGS              IS     3:     
--VAL INT        PCS.INIT                IS     2:     
--VAL INT        MAX.CYCLES              IS     8:     


-----------------------------------------------------
VAL INT        NO.LIMIT                IS   -1:         
VAL INT        IS.INSTR                IS    2:     
VAL INT        INSTRUCTION             IS    3:
VAL INT        DELETE                  IS    0:
VAL INT        APPEND                  IS    1:
---------------------------------------------------
VAL INT        NORMAL                     IS     0:

VAL INT        SWI                     IS     1:
VAL INT        LDR                     IS     2:
VAL INT        STR                     IS     3:
VAL INT        LDM                     IS     4:
VAL INT        STM                     IS     5:
VAL INT        BRANCH                  IS     6:
VAL INT        DATA.PROCESSING         IS     7:
------------------------------------------------
VAL INT        BRANCH.LAT.LKAHD        IS    100:
VAL INT        SWI.LAT.LKAHD           IS    100:
VAL INT        DP.LAT.LKAHD            IS    100:
VAL INT        LDR1.LAT.LKAHD          IS    100 :
VAL INT        LDR2.LAT.LKAHD          IS    100 :
VAL INT        LDR2.LAT.LKAHD          IS    100 :
VAL INT        STR1.LAT.LKAHD          IS    100 :
VAL INT        STR2.LAT.LKAHD          IS    100 :
VAL INT        LDM1.LAT.LKAHD          IS    100 :
VAL INT        LDM2.LAT.LKAHD          IS    100 :
VAL INT        STM1.LAT.LKAHD          IS    100 :
VAL INT        STM2.LAT.LKAHD          IS    100 :

VAL INT        WRTCTRL.LAT.LKAHD       IS    100 :
VAL INT        AV.STAGE.DELAY          IS    100 :

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





