-- File: [Indigo]<Sakura>Dragon>DragonImpl1.sak
-- 11-Mar-82  9:32:43

DIRECTORY
  DragonArbiter1,
  DragonCache,
  DragonClock,
  DragonMap,
  DragonMemory,
  DragonProcessor,
  SakuraRT,
  SimIO;

DragonImpl1: MONITOR IMPORTS DragonArbiter1, c1: DragonCache, c2: DragonCache, 
  DragonClock, DragonMap, DragonMemory, p1: DragonProcessor, p2: DragonProcessor,
  SakuraRT, SimIO  
  = {
  SimIO.Start[];
  CIRCUIT {
    COMPONENTS proc1: p1.Processor, proc2: p2.Processor, 
      cache1: c1.Cache, cache2: c2.Cache,
      arbiter: DragonArbiter1.Arbiter, clock: DragonClock.ClockGenerator,
      map: DragonMap.MapProcessor, memory: DragonMemory.Memory
    NODES op1, pcexception1, pcreject1, pcdata1, pcreq1, 
      op2, pcexception2, pcreject2, pcdata2, pcreq2, 
      cmshared, cmd, cmdata, clockA, clockB, arqp1, agrp1, arqp2, agrp2: NODE
    REPRESENTATION
    CONNECTIONS
      clock[ClockA: clockA, ClockB: clockB],
      proc1[ClockA: clockA, ClockB: clockB, Op: op1, Fault: pcexception1, 
        Reject: pcreject1, InData: pcdata1, RQ: pcreq1,
        OutData: pcdata1],
      proc2[ClockA: clockA, ClockB: clockB, Op: op2, Fault: pcexception2, 
        Reject: pcreject2, InData: pcdata2, RQ: pcreq2,
        OutData: pcdata2],
      cache1[Op: op1, PDataIn: pcdata1, MDataIn: cmdata, ClockA: clockA, 
        ClockB: clockB, 
        CMDIn: cmd, RQ: pcreq1, SharedIn: cmshared, Grant: agrp1,
        Exception: pcexception1, Reject: pcreject1, SharedOut: cmshared, 
	CMDOut: cmd, Rq: arqp1, PDataOut: pcdata1, MDataOut: cmdata],
      cache2[Op: op2, PDataIn: pcdata2, MDataIn: cmdata, ClockA: clockA, 
        ClockB: clockB, 
        CMDIn: cmd, RQ: pcreq2, SharedIn: cmshared, Grant: agrp2,
        Exception: pcexception2, Reject: pcreject2, SharedOut: cmshared, 
	CMDOut: cmd, Rq: arqp2, PDataOut: pcdata2, MDataOut: cmdata],
      arbiter[ClockA: clockA, ClockB: clockB, Proc1Rq: arqp1, Proc1Gr: agrp1,
        Proc2Rq: arqp2, Proc2Gr: agrp2],
      map[ClockA: clockA, ClockB: clockB, CMDIn: cmd, MDataIn: cmdata,
        CMDOut: cmd, MDataOut: cmdata],
      memory[ClockA: clockA, ClockB: clockB, CMDIn: cmd, SharedIn: cmshared, 
        MDataIn: cmdata, MDataOut: cmdata]
    };
  SimIO.Stop[];
  }.