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: ROPE ← IO.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];
};
};