CoreTransistorImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by: Barth, July 10, 1985 4:09:23 pm PDT
DIRECTORY
ChipCreate, IO, CoreTransistor;
TransistorImpl: CEDAR PROGRAM
IMPORTS ChipCreate, IO
EXPORTS CoreTransistor =
BEGIN OPEN ChipCreate, CoreTransistor;
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 ← CreateRecordCellType[design: design, cellTypeName: name, attributes: LIST[[$Behave, NIL]]];
CreatePort[on: t, name: "gate", attributes: LIST[[$BhvSwitch, NIL], [$StcIn, NIL]]];
CreatePort[on: t, name: "ch1", direction: bidirectional, attributes: LIST[[$BhvSwitch, NIL], [$StcBidir, NIL]]];
CreatePort[on: t, name: "ch2", direction: bidirectional, attributes: LIST[[$BhvSwitch, NIL], [$StcBidir, NIL]]];
};
};
END.