#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/Dec1CtrlA"
#USE "/home/amu5/users/georget/Phd/Simul/Dec1/Dec1CtrlB"
#USE "/home/amu5/users/georget/Phd/Simul/Dec1/RdGen"

PROC Dec1(CHAN OF BUNDLE ToRGrs,ToRGpc,FromRGA,ToImmd,ToXp,ToNGD,FromImmA,
                          FromXpA,FromNGA,ALUgo,ToAddIntD,FrAddIntA,
                          ToDec2D,FrDec2A,ToDec3D,FrDec3A,
                          IpToDec1a,IpToDec1b,Dec1ToIpA,
                          PCToDec1,Dec1PCA,XLtoDec1D,Dec1XLA,FDec3PCp,
                          []CHAN OF DEB.MESSAGE screen,VAL INT report,evaluate,preemption ) --6


  CHAN OF BUNDLE  I,CtrlAB,PCAB,LSMP0,LSMP1,RdGA,RdGena1,
                   RdGenr,FromregAA,FromregBA,FromregCA,
                   ToregAD,ToregBD,ToregCD,Ia3:

  -------------------------------------------------
  PROC RegA(CHAN OF BUNDLE Din, Dout, Ain, Aout)
    SEQ
      last.fifo.stage(Din, Dout, Ain, Aout)
  :
  -------------------------------------------------
  PROC RegB(CHAN OF BUNDLE Din, Dout, Ain, Aout)
    SEQ
      fifo.stage(Din, Dout, Ain, Aout)
  :
  -------------------------------------------------
  PROC RegC(CHAN OF BUNDLE Din, Dout, Ain, Aout)
    SEQ
      fifo.stage(Din, Dout, Ain, Aout)
  :
  -------------------------------------------------

  SEQ
    PAR
      Dec1CtrlB(I,CtrlAB,PCAB,LSMP0,LSMP1,RdGA,RdGena1,FromregAA,
                FromregBA, FromRGA,FromregCA,FromImmA,
                FromXpA,FromNGA,ALUgo,RdGenr,ToregAD,ToRGrs,
                ToRGpc,ToregBD,ToregCD,ToImmd,ToXp,ToNGD,Ia3,
                [screen FROM 0 FOR 4], report, evaluate)

      Dec1CtrlA(IpToDec1a,IpToDec1b,PCToDec1,
                FDec3PCp,Ia3,
                XLtoDec1D, CtrlAB,I,PCAB,Dec1ToIpA,
                Dec1PCA,Dec1XLA,[screen FROM 4 FOR 2], report, evaluate, preemption)

      RdGen(LSMP0,LSMP1,RdGenr,RdGA,RdGena1)

      RegA(ToregAD, ToAddIntD, FromregAA, FrAddIntA )

      RegB(ToregBD, ToDec2D, FromregBA, FrDec2A)

      RegC(ToregCD, ToDec3D, FromregCA, FrDec3A)
   
:
