SwitchInv.mesa
Copyright © 1985 by Xerox Corporation. All rights reversed.
Barth, August 1, 1985 2:31:39 pm PDT
Spreitzer, November 18, 1985 10:45:23 pm PST
DIRECTORY BasicTime, BitTwiddling, Core, CoreClasses, CoreOps, CoreProperties, GetMe, IO, Rope, RoseBehavior, RoseBind;
SwitchInv:
CEDAR
PROGRAM
IMPORTS CoreClasses, CoreOps, CoreProperties, RoseBind
=
BEGIN OPEN Core, CoreClasses, CoreOps, CoreProperties, RoseBind;
DefineInverter:
PROC
RETURNS [ct: CellType] = {
in: Wire = CreateAtomWire["in"];
out: Wire = CreateAtomWire["out"];
vdd: Wire = CreateAtomWire["vdd"];
gnd: Wire = CreateAtomWire["gnd"];
pw: Wire = CreateRecordWire[
LIST[in, out, vdd, gnd],
"inverterPublic",
Props[[switchWire, $T], [testerSwitchWire, $T]]
];
nE: CellType = TransistorCreate[[nE]];
pE: CellType = TransistorCreate[[pE]];
ct ←
NEW [CellTypeRec ← [
properties: Props[[nameProp, "SwitchInv"]],
public: pw,
class: recordCellClass,
data:
NEW [RecordCellTypeRec ← [
internal: WiresToWireSequence[LIST[in, out, vdd, gnd]],
instances:
LIST[
NEW [CellInstanceRec ← [
actual: WiresToWireSequence[LIST[in, out, vdd]],
type: pE,
properties: Props[[nameProp, "pu"]]
]],
NEW [CellInstanceRec ← [
actual: WiresToWireSequence[LIST[in, out, gnd]],
type: nE,
properties: Props[[nameProp, "pd"]]
]]
]
]]
]];
};
END.