TransistorImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by: Barth, July 7, 1985 11:14:37 am PDT
DIRECTORY
Core, IO, Transistor;
TransistorImpl: CEDAR PROGRAM
IMPORTS Core, IO
EXPORTS Transistor =
BEGIN OPEN Core, Transistor;
CreateTransistor: PUBLIC PROC [design: Design, type: TransistorType ← nE, width: NAT ← 4, length: NAT ← 2] RETURNS [t: CellType] = {
typeNames: ARRAY TransistorType OF ROPE ← ["nE", "pE"];
name: ROPEIO.PutFR["Transistor%g%g/%g", IO.rope[typeNames[type]], IO.int[width], IO.int[length]];
IF (t ← LookupCellType[design, name])=NIL THEN {
t ← CreateCellType[design: design, cellTypeName: name];
CreatePort[on: t, name: "gate"];
CreatePort[on: t, name: "ch1", direction: bidirectional];
CreatePort[on: t, name: "ch2", direction: bidirectional];
};
};
END.