<> <> <> <<>> 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: 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]; }; }; END.