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. ΪCoreTransistorImpl.mesa Copyright c 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 ΚΗ– "cedar" style˜codešœ™Kšœ Οmœ1™