CoreTransistorImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Barth, October 2, 1985 9:36:00 am PDT
Spreitzer, August 12, 1985 5:20:46 pm PDT
Bertrand Serlet July 25, 1985 10:32:24 am PDT
DIRECTORY
Core, CoreOps, CoreTransistor, IO;
CoreTransistorImpl: CEDAR PROGRAM
IMPORTS CoreOps, IO
EXPORTS CoreTransistor =
BEGIN OPEN Core, CoreTransistor;
transistorCellClass: PUBLIC CellClass ← NEW[CellClassRec ← [name: "Transistor", recast: NIL, write: Write, read: Read]];
Start: PROC = {
CoreOps.RegisterCellClass[transistorCellClass];
};
Write: WriteProc = {
};
Read: ReadProc = {
};
Create: PUBLIC PROC [args: TransistorRec] RETURNS [cellType: CellType] = {
tranNames: ARRAY TransistorType OF ROPE ← ["nE", "pE", "nD"];
tranPublic: Wire ← CoreOps.CreateRecordWire[components: LIST[
CoreOps.CreateAtomWire[name: "gate"],
CoreOps.CreateAtomWire[name: "ch1"],
CoreOps.CreateAtomWire[name: "ch2"],
CoreOps.CreateAtomWire[name: IF args.type=pE THEN "Vdd" ELSE "Gnd"]]];
cellType ← NEW[CellTypeRec ← [
name: IO.PutFR["Tran%gl%gw%g", IO.rope[tranNames[args.type]], IO.int[args.length], IO.int[args.width]],
class: transistorCellClass,
publicWire: tranPublic,
data: NEW[TransistorRec ← args]]];
};
Start[];
END.