
#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/AddInt/AddressInt"
#USE "/home/amu5/users/georget/Phd/Simul/AddInt/AddC"

PROC AddInt(CHAN OF BUNDLE ApDin,W,Wc,LSMP,MAout,MAcout,
            ApAin, LSMPa,Wa,MAAout,PCToDec1,Dec1PCA,Dec1toXPD, XPtoDec1A,
            XLtoDec1D,Dec1XLA,MemDabt1, MemDabt0, AIDabt0,WLx,
            []CHAN OF DEB.MESSAGE screen, VAL INT report, evaluate, preemption) --4
         
  CHAN OF BUNDLE ApDAC, MA, MAc,ACAAp,LSMa,Pca1,MAa,Pcout,WLxbuf,LSMout:

  ---------------------------------------------------------
  PROC  WLx.buffer(CHAN OF BUNDLE In,Out)
    SEQ
      buffer(In,Out)
  : 

  ---------------------------------------------------------------
  PROC Apipe(CHAN OF BUNDLE Din, Dout,            
             Ain, Aout)      -- 2 stage pipeline
   
    CHAN OF BUNDLE Data:
    CHAN OF BUNDLE Ack:
    
    SEQ
      PAR
        fifo.stage(Din,Data,Ain, Ack)
        last.fifo.stage(Data,Dout,Ack, Aout)
  :

  ----------------------------------------------------------------
  SEQ
    PAR
      Apipe(ApDin, ApDAC ,ApAin, ACAAp)

      AddressInt(MA, MAc,MAout,MAcout,PCToDec1,Dec1PCA,LSMout,
                 MAa,MAAout,Pcout,Pca1,LSMa,Dec1toXPD, XPtoDec1A,
                 XLtoDec1D,Dec1XLA, MemDabt1, MemDabt0, AIDabt0,
                [screen FROM 0 FOR 3], report, evaluate)
      
      AddC(Pcout,ApDAC,LSMout,W,Wc,MA,MAc,LSMP, MAa,Pca1,Wa,WLxbuf,ACAAp,
           LSMPa,LSMa, screen[3], report, evaluate, preemption )
      WLx.buffer(WLxbuf,WLx) 

:









