DIRECTORY CoreCreate, CoreOps; TestCoreIO: CEDAR PROGRAM IMPORTS CoreCreate = BEGIN OPEN CoreCreate; NAnd: PUBLIC PROC [i: NAT] RETURNS [ct: CellType] = { instances: LIST OF CellInstance _ NIL; pType: CellType _ Transistor[type: pE, width: 3]; nType: CellType _ Transistor[type: nE, width: 1]; FOR input: NAT IN [0..i) DO instances _ CONS[Instance[pType, ["gate", Index["Input", input]], ["ch1", "Vdd"], ["ch2", "nOutput"], ["well", "Vdd"]], instances]; instances _ CONS[Instance[nType, ["gate", Index["Input", input]], ["ch1", IF input=0 THEN "nOutput" ELSE Index["stack", input-1]], ["ch2", IF input=i-1 THEN "Gnd" ELSE Index["stack", input]]], instances]; ENDLOOP; ct _ Cell[ name: "NAnd", public: Wires["Vdd", "Gnd", Seq["Input", i], "nOutput"], onlyInternal: Wires[Seq["stack", i-1]], instances: instances]; }; END. ˆTestCoreIO.mesa Copyright Σ 1986, 1987 by Xerox Corporation. All rights reserved. Bertrand Serlet April 5, 1987 7:08:28 pm PDT Κs– "cedar" style˜codešœ™KšœB™BK™,K™—KšΟk œ˜K˜K•StartOfExpansion[]š Οn œœœœœœ ˜E˜š žœœœœœ˜5Kšœ œœœ˜&Kšœ1˜1Kšœ1˜1šœœœ˜šœ œ˜!KšœV˜VKšœ ˜ —šœ œ˜ Kšœ ˜ Kšœœ œ œ˜@Kšœœ œœ˜=Kšœ ˜ —Kšœ˜—šœ ˜ Kšœ ˜ Kšœ8˜8Kšœ'˜'Kšœ˜—Kšœ˜K˜——Kšœ˜K˜—…—<7