
#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/Decode3/Dec3"
#USE "/home/amu5/users/georget/Phd/Simul/Decode3/Ctrl3"


PROC Decode3(CHAN OF BUNDLE FromDec1D,ToDec1A,MemDabt0,MemDabt1,AIDabt0,
                             Toctrl2D,ALUgo,Ctrl2OP1,Ctrl2OP2,
                             OPCtrl2A,Ctrl2CPD,Ctrl2CPA,ToWrCtrlD1,
                             ToWrCtrlD2,FWctrlA,PCpr,
             []CHAN OF DEB.MESSAGE screen, VAL INT report, evaluate, preemption)  --8

  CHAN OF BUNDLE FromDec3D1,FromDec3D2,ToDec3A,FOPregDA,
                 FOPregDB,FromCPregD,ToCPregA,ToOPregA,FWrregA,
                 ToWrregD1, ToWrregD2,AIDabt0i,ALUgoi,Toctrl2Di,PCpri:

  -------------------------------------------------------------------
  PROC OPReg (CHAN OF BUNDLE D1in, D2in,D1out, D2out, Ain, Aout)
    SEQ
      two.input.stage (D1in, D2in,D1out, D2out, Ain, Aout)
  :
  -----------------------------------------------------------------
  PROC RReg (CHAN OF BUNDLE D1in, D2in,D1out, D2out, Ain, Aout)
    SEQ
      two.input.stage (D1in, D2in,D1out, D2out, Ain, Aout)
  :
  --------------------------------------------------------------  
  PROC CPReg (CHAN OF BUNDLE  Din, Dout, Ain, Aout )
    SEQ
      last.fifo.stage (Din, Dout, Ain, Aout)
  :
  ----------------------------------------------------------------
  PROC Alugo.buffer(CHAN OF BUNDLE Din, Dout)
    SEQ
      buffer( Din, Dout)
  :
  --------------------
  PROC ALx.buffer(CHAN OF BUNDLE Din, Dout)
    SEQ    
      buffer(Din, Dout)

  :
  ----------------------    
  PROC Pcpar.buffer(CHAN OF BUNDLE Din, Dout)
    SEQ
      buffer( Din, Dout)

  :
  -----------------------
  PROC AIabort.buffer(CHAN OF BUNDLE Din, Dout)
    SEQ
      buffer(Din, Dout)

  :
  -------------------------


  SEQ
    PAR
      OPReg(Ctrl2OP1,Ctrl2OP2,FOPregDA,FOPregDB,OPCtrl2A,ToOPregA )

      CPReg(Ctrl2CPD,FromCPregD,Ctrl2CPA,ToCPregA)


      Dec3( FromDec1D,ToDec1A,FromDec3D1,FromDec3D2,ToDec3A, screen[5], report, evaluate)


      Ctrl3(FOPregDA,FOPregDB, FromDec3D1,FromDec3D2,FromCPregD,
            MemDabt0,MemDabt1,AIDabt0i,Toctrl2Di,ALUgoi,ToCPregA,
            ToOPregA,ToDec3A,ToWrregD1,ToWrregD2,FWrregA,PCpri,
             [screen FROM 0 FOR 5], report,evaluate, preemption)


      RReg(ToWrregD1,ToWrregD2,ToWrCtrlD1,ToWrCtrlD2 ,FWrregA,FWctrlA  )


      Alugo.buffer(ALUgoi,ALUgo)

      ALx.buffer(Toctrl2Di,Toctrl2D)
    
      Pcpar.buffer(PCpri,PCpr)

      AIabort.buffer(AIDabt0i,AIDabt0)


:




 

