FromSinixInverterTesting.mesa
Copyright © 1985 by Xerox Corporation. All rights reversed.
Spreitzer, October 2, 1985 4:04:52 pm PDT
DIRECTORY BasicTime, BitOps, BitSwOps, BitTwiddling, Core, CoreProperties, GetMe, IO, Rope, RoseBehavior, RoseBind, RoseControl, InverterTesterRoseDefs;
FromSinixInverterTesting:
CEDAR
PROGRAM
=
BEGIN OPEN RoseBehavior, RoseControl, SwitchInvTesterRoseDefs;
Invert: ARRAY Level OF Level = [H: L, L: H, X: X];
ToStrength:
PROC [str: Strength, l: Level]
RETURNS [sv: SwitchVal] = {
sv ←
SELECT l
FROM
L => [s: [q: str, u: none, d: str], val: L],
H => [s: [q: str, u: str, d: none], val: H],
X => [s: [q: str, u: str, d: str], val: X],
ENDCASE => ERROR;
};
TestSwitchInv
:
PROC [
testeeType: Core.CellType,
testData, switchInstructions, simpleInstructions, driveInstructions, stateAny: REF ANY,
Eval: PROC
]
= {
instr: REF InverterTesterSwitch = NARROW[switchInstructions];
instr.Vdd ← ToStrength[input, H];
instr.Gnd ← ToStrength[input, L];
FOR l: Level
IN Level
DO
instr.In ← ToStrength[drive, l];
Eval[];
IF instr.Out.val # Invert[l] THEN ERROR;
ENDLOOP;
stateAny ← stateAny;
};
END.