-- File: [Indigo]<Sakura>Dragon>DragonCache.sak
-- 15-Mar-82 11:37:56

DIRECTORY
  SakuraRT: TYPE;

DragonCache: DEFINITIONS
  
  = BEGIN
  PbusType: TYPE = 
    RECORD [body: SELECT kind: {Instruction, Data} FROM 
                    Instruction => [vp: LONG CARDINAL, -- actually 25 bits -- 
                                    bl: INTEGER [0..37B], 
                                    word: INTEGER [0..3]],
                    Data => [data: LONG CARDINAL]
                    ENDCASE]; 
  PbusOp: TYPE = {Fetch, FetchHold, Store, MapOp}; 
  
  MbusType: TYPE = 
    RECORD [body: SELECT kind: {Instruction, MapCommand, Data} FROM 
                    Instruction => [command: MbusCommand, 
                                    rp: LONG CARDINAL, -- actually 25 bits -- 
                                    bl: INTEGER [0..37B], 
                                    word: INTEGER [0..3]],
                    MapCommand => [command: MbusCommand, 
                                   mapop: MapOpKind, 
                                   fault: BOOLEAN, 
                                   rpdirty: BOOLEAN, 
                                   vp: LONG CARDINAL],
                    Data => [data: LONG CARDINAL]
                    ENDCASE]; 
  MbusCommand: TYPE = {ReadQuad, WriteQuad, WriteSingle, NotReady, ReadMap, 
                       ReadMapAndSetRpDirty, DoMapOp, SetRpDirty, MapOpDone}; 
  MapOpKind: TYPE = {SetMap, SetMapFlags, GetMapFlags}; 
  
  CheckVal: PROC
       [vp: LONG CARDINAL, bl: INTEGER [0..37B], word: INTEGER [0..3], val: LONG 
          CARDINAL]; 
  
  Cache: PROC
       [Op: SakuraRT.Handle, PDataIn, MDataIn: SakuraRT.Handle, 
        ClockA, ClockB, CMDIn, RQ, SharedIn, Grant: SakuraRT.Handle, 
        Exception, Reject, SharedOut, CMDOut, Rq: SakuraRT.Handle, 
        PDataOut: SakuraRT.Handle, MDataOut: SakuraRT.Handle];
  

  END.