BalancedDelayAdderTest.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Neil Gunther March 3, 1986 5:59:46 pm PST
DIRECTORY Core, CoreOps, Ports, PW, Rosemary, RosemaryUser, Sisyph;
BalancedDelayAdderTest: CEDAR PROGRAM
IMPORTS CoreOps, Ports, PW, Rosemary, RosemaryUser, Sisyph
= BEGIN
BDATestProc: RosemaryUser.TestProc = {
CycleBDAdder: PROC = {
-- Construct TT
Step: TYPE = [0..8);
levIn0: ARRAY Step OF Ports.Level   ← [L, L, L, L, H, H, H, H];
levIn1: ARRAY Step OF Ports.Level  ← [L, L, H, H, L, L, H, H];
levCarryIn: ARRAY Step OF Ports.Level  ← [L, H, L, H, L, H, L, H];
levSum: ARRAY Step OF Ports.Level   ← [L, H, H, L, H, L, L, H];
levCarryOut: ARRAY Step OF Ports.Level ← [L, L, L, H, L, H, H, H];
FOR step: Step IN Step DO
p[In0].l ← levIn0[step];
p[In1].l ← levIn1[step];
p[CarryIn].l ← levCarryIn[step];
p[SumOut].l ← levSum[step];
p[CarryOut].l ← levCarryOut[step];
Eval[];
ENDLOOP;
}; --CycleBDAdder
p[In0].l ← p[In1].l p[CarryIn].l ← p[SumOut].l ← p[CarryOut].l ← L;
Eval[! Rosemary.Stop => RESUME];
CycleBDAdder[];
}; --BDATestProc
ct: Core.CellType ← Sisyph.ExtractSchematicByName["BalancedAdder.sch", Sisyph.Create[PW.OpenDesign["///Users/gunther.pa/chips/PrismCells"], Sisyph.defaultGlobalNames]];
Vdd: NAT = CoreOps.GetWireIndex[ct.public, "Vdd"];
Gnd: NAT = CoreOps.GetWireIndex[ct.public, "Gnd"];
In0: NAT = CoreOps.GetWireIndex[ct.public, "In0"];
In1: NAT = CoreOps.GetWireIndex[ct.public, "In1"];
CarryIn: NAT = CoreOps.GetWireIndex[ct.public, "CarryIn"];
SumOut: NAT = CoreOps.GetWireIndex[ct.public, "SumOut"];
CarryOut: NAT = CoreOps.GetWireIndex[ct.public, "CarryOut"];
[] ← 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[In0], initDrive: force];
[] ← Ports.InitTesterDrive[wire: ct.public[In1], initDrive: force];
[] ← Ports.InitTesterDrive[wire: ct.public[CarryIn], initDrive: force];
[] ← Ports.InitTesterDrive[wire: ct.public[SumOut], initDrive: expect];
[] ← Ports.InitTesterDrive[wire: ct.public[CarryOut], initDrive: expect];
RosemaryUser.MakeStandardViewer[name: "BDAdder Tester", cellType: ct, testButtons: LIST[["BDATest", BDATestProc]], displayWires: RosemaryUser.DisplayPortLeafWires[wire: ct.public], flatten: TRUE];
END.