#INCLUDE "/home/amu5/users/georget/Phd/Simul/Defs/defs.inc"

#USE "/home/amu5/users/georget/Phd/Simul/library"
#USE "/home/amu5/users/georget/Phd/Simul/Dec1/Dec1"
#USE "/home/amu5/users/georget/Phd/Simul/Decode2/Decode2"
#USE "/home/amu5/users/georget/Phd/Simul/Decode3/Decode3"
#USE "/home/amu5/users/georget/Phd/Simul/Reg/Reg"
#USE "/home/amu5/users/georget/Phd/Simul/WrtCtrl/WrtCtrl"
#USE "/home/amu5/users/georget/Phd/Simul/DatInt/DatInt"
#USE "/home/amu5/users/georget/Phd/Simul/AddInt/AddInt"
#USE "/home/amu5/users/georget/Phd/Simul/IMMPipe/IMMPipe"


PROC ARMstCore(CHAN OF BUNDLE  MemDabt0,MemDabt1,AMemDabt1, AMemDabt0, 
                            MrrDin, MrrPAbtin, MrrAin,
                            MEMad, MEMd, MEMc, MEMa,
               []CHAN OF DEB.MESSAGE screen, VAL INT report,evaluate,preemption)   --43   (4 more available...)


  
  CHAN OF BUNDLE FromRegA,FromRegB, FWCtrlD,FWCtrlC,ToApipe,
                  FromApipe,ToDatIntBw,ToDatIntMb, FDatIntAc, FromCPsrA,
                  ToCPsr,FromOplat,ToOplatA,ToOplatB,FromImm,ToImm,
                  ToRegack,Dec1NG,NGDec1A, Dec1Dec2,Dec2Dec1A,Ctrl3Alx,
                  FromDec1D, ToDec1A, AIDabt0,ALUgo,ToWrCtrlD1,ToWrCtrlD2,
                  FWctrlA,ToAddInta,ToAddIntb,FAddIntA,FAdInWlx,FRegBA,
                  FDatInta,FDatIntb,ToDatIntA,IpToDec1a,IpToDec1b,Dec1ToIpA,
                  FAddIntD,FAddIntC,ToAddIntA,ToAddIntD,FrAddIntA,Dec1toXPD,
                  XPtoDec1A,PCToDec1,Dec1PCA, XLtoDec1D,Dec1XLA,ToRegBI,
                  ToRegBPC,FromRGA,ToImmD,FromImmA,FDec3PCp: 


  PAR

    Dec1 (ToRegBI,ToRegBPC,FromRGA,ToImmD,Dec1toXPD,
          Dec1NG,FromImmA,XPtoDec1A,NGDec1A,ALUgo,
          ToAddIntD,FrAddIntA,Dec1Dec2,Dec2Dec1A,FromDec1D,ToDec1A,
          IpToDec1a,IpToDec1b,Dec1ToIpA,PCToDec1,Dec1PCA,
          XLtoDec1D,Dec1XLA,FDec3PCp,                       
          [screen FROM 1 FOR 6], report,evaluate, preemption)  


    
    Decode2 (FromRegA,FromRegB,FromApipe,FDatIntAc,FromCPsrA,
             FromOplat,FromImm,ToApipe,ToDatIntBw,ToDatIntMb,ToCPsr,
             ToOplatB, ToOplatA,ToRegack,ToImm,Dec1NG,Dec1Dec2,
             NGDec1A,Dec2Dec1A,Ctrl3Alx,                       
             [screen FROM 7 FOR 8], report,evaluate)                  

    Decode3 (FromDec1D,ToDec1A,MemDabt0,MemDabt1,AIDabt0,
            Ctrl3Alx,ALUgo,ToOplatA,ToOplatB,
            FromOplat,ToCPsr,FromCPsrA,ToWrCtrlD1,
            ToWrCtrlD2,FWctrlA,FDec3PCp,                       
             [screen FROM 15 FOR 8], report,evaluate,preemption)                           


    Reg (FWCtrlD, FWCtrlC,FRegBA,ToRegBI,ToRegBPC,FromRGA,
         FromRegA,FromRegB,ToRegack,                       
             [screen FROM 23 FOR 6], report,evaluate)           


    WrtCtrl (ToWrCtrlD1,ToWrCtrlD2, FAddIntA,FAdInWlx,
            FRegBA,FDatInta,FDatIntb,ToAddInta,ToAddIntb,
            FWCtrlD, FWCtrlC,FWctrlA,ToDatIntA,                       
             [screen FROM 29 FOR 3], report,evaluate, preemption )              
  
    DatInt (ToDatIntMb,ToDatIntBw, FDatIntAc, MrrDin, 
            MrrPAbtin, MrrAin,IpToDec1a,IpToDec1b, 
            Dec1ToIpA, FDatInta,FDatIntb, ToDatIntA, 
            FAddIntD, FAddIntC, MEMad, MEMd, MEMc, MEMa,ToAddIntA,                       
             [screen FROM 32 FOR 4], report,evaluate)


    AddInt (ToApipe,ToAddInta,ToAddIntb,ToAddIntD,
            FAddIntD,FAddIntC, FromApipe,FrAddIntA, FAddIntA,
            ToAddIntA,PCToDec1,Dec1PCA,Dec1toXPD, XPtoDec1A,
            XLtoDec1D,Dec1XLA, AMemDabt1, AMemDabt0, AIDabt0,FAdInWlx,                       
            [screen FROM 36 FOR 4], report,evaluate, PREEMPTION.ON)   

    IMMPipe( ToImmD, FromImm, FromImmA,ToImm )                

:            
