TGXOrTest.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Neil Gunther February 27, 1986 11:33:42 am PST
Barth, February 28, 1986 3:29:08 pm PST
DIRECTORY Core, CoreOps, Ports, PW, Rosemary, RosemaryUser, Sisyph;
TGXOrTest:
CEDAR PROGRAM
IMPORTS CoreOps, Ports, PW, Rosemary, RosemaryUser, Sisyph
= BEGIN
MyTestProc: RosemaryUser.TestProc = {
CycleXOrGate:
PROC = {
Step: TYPE = [0..4);
ALevel: ARRAY Step OF Ports.Level ← [H, H, L, L];
BLevel: ARRAY Step OF Ports.Level ← [H, L, H, L];
OLevel: ARRAY Step OF Ports.Level ← [L, H, H, L];
FOR step: Step
IN Step
DO
p[A].l ← ALevel[step];
p[B].l ← BLevel[step];
p[XOrAB].l ← OLevel[step];
Eval[];
ENDLOOP;
};
p[A].l ← p[B].l ← p[XOrAB].l ← L;
Eval[! Rosemary.Stop => RESUME];
CycleXOrGate[];
};
ct: Core.CellType ← Sisyph.ExtractSchematicByName["TGXOr.sch", Sisyph.Create[PW.OpenDesign["///Users/Barth.pa/DA/PrismCells"], Sisyph.defaultGlobalNames]];
Vdd: NAT = CoreOps.GetWireIndex[ct.public, "Vdd"];
Gnd: NAT = CoreOps.GetWireIndex[ct.public, "Gnd"];
A: NAT = CoreOps.GetWireIndex[ct.public, "A"];
B: NAT = CoreOps.GetWireIndex[ct.public, "B"];
XOrAB: NAT = CoreOps.GetWireIndex[ct.public, "XOrAB"];
[] ← Rosemary.SetFixedWire[ct.public[Vdd], H];
[] ← Rosemary.SetFixedWire[ct.public[Gnd], L];
FOR i:
NAT
IN [0..ct.public.size)
DO
[] ← Ports.InitPort[wire: ct.public[i], initType: l];
ENDLOOP;
[] ← Ports.InitTesterDrive[wire: ct.public[A], initDrive: force];
[] ← Ports.InitTesterDrive[wire: ct.public[B], initDrive: driveStrong];
[] ← Ports.InitTesterDrive[wire: ct.public[XOrAB], initDrive: expect];
RosemaryUser.MakeStandardViewer[name: "TGXOr Tester", cellType: ct, testButtons: LIST[["MyTest", MyTestProc]], displayWires: RosemaryUser.DisplayPortLeafWires[wire: ct.public], flatten: TRUE];
END.