PBusCacheProg.mesa
Copyright Ó 1987, 1988 by Xerox Corporation. All rights reserved.
Created by Jean Gastinel, May 23, 1988 3:03:33 pm PDT
Pradeep Sindhu May 10, 1988 9:06:08 pm PDT
DIRECTORY
Atom; 
PBusCacheProg: CEDAR PROGRAM
IMPORTS Atom
EXPORTS
~ BEGIN
C: PROC [c: CARD] RETURNS [rc: REF ANY] = {rc ← NEW[CARD ← c]};
Atom.PutProp[$PBusEmul, $PKList, LIST[
LIST[$Wait, C[100]], -- wait for the DBus and the memory controller to be intialized
LIST[$SetByteSelect,C[0FH]],   -- Word selection
LIST[$SetMode,C[0]],    -- test in Kernel mode
      
LIST[$IOWrite,C[9H],C[01234567H]],     --AID register
LIST[$IOWrite,C[3H],C[98765432H]],     --CWSnew register
LIST[$IOReadAndCheck,C[9H],C[01234567H]],  
LIST[$IOReadAndCheck,C[3H],C[98765432H]],
LIST[$IOWrite,C[0ABCDEFH],C[01357H]],    -- IO external to the cache
LIST[$IOReadAndCheck,C[0ABCDEFH],C[01357H]],
LIST[$ReadAndCheck,C[00112233H],C[09ABCDEFH]],  -- read user disabled  
LIST[$Write,C[00045123H],C[000FH]],   -- write user disabled 
LIST[$Write,C[00046124H],C[09AFH],C[11H]],  -- write kernel disabled  
LIST[$SetMode,C[1]],    -- Test in User mode
Without Re-Reading the MapInfo
LIST[$ReadAndCheck,C[00112233H],C[0],C[11H]], -- read user disabled  
LIST[$Write,C[00045123H],C[000FH],C[11H]],   -- write user disabled 
With re-Reading the MapInfo
LIST[$ReadAndCheck,C[00132233H],C[0],C[11H]], -- read user disabled  
LIST[$Write,C[00047123H],C[000FH],C[11H]],   -- write user disabled 
LIST[$Write,C[00046124H],C[09AFH],C[11H]],  -- write kernel disabled
LIST[$Write,C[00049125H],C[0ABCEFH],C[0]],              
LIST[$Write,C[00200000H],C[0ABCEFH],C[15H]],     -- Timout error         
    
$StopSimul,
$Nop,
LIST[$Jump, $Nop]
]];
END.