DIRECTORY CD, Core, CoreCreate, CoreOps, Rope, CoreClasses, ProcessProps, Commander, IO; MakeESim: CEDAR PROGRAM IMPORTS ProcessProps, IO, CoreClasses, CoreOps, Rope = BEGIN RemapRec: TYPE = RECORD [public, global: Rope.ROPE]; RemapEntry: TYPE = REF RemapRec; RemapList: TYPE = LIST OF RemapEntry; RemapTable: TYPE = LIST OF RemapList; eSimStrean: IO.STREAM _ NARROW [ProcessProps.GetProp[$CommanderHandle], Commander.Handle].out; count: NAT; GlobalWireName: PROC [wire: Core.Wire, remap: RemapTable] RETURNS [wirename: Rope.ROPE] = { }; MakeRemapTable: PROC [actual, public: Core.WireSeq, remap: RemapTable] RETURNS [newRemap: RemapTable] = { }; PrintTransistor: PROC [ct: Core.CellType, remap: RemapTable] = { tran: CoreClasses.Transistor _ NARROW[ct.data]; IO.PutF[eSimStrean, "\nTransister: %g, length: %g, width: %g", [rope[CoreClasses.transistorTypeNames[tran.type]]], [integer[tran.length]], [integer[tran.width]] ]; count _ count + 1; }; PrintCellType: PROC [ct: Core.CellType, remap: RemapTable] = { className: Rope.ROPE _ ct.class.name; IO.PutF[eSimStrean, "\nCell: %g: %g", [rope[CoreOps.GetCellTypeName[ct]]], [rope[className]] ]; WHILE ct.class.recast # NIL DO IO.PutF[eSimStrean, "\nDown layer of %g: %g", [rope[CoreOps.GetCellTypeName[ct]]], [rope[className]] ]; ct _ ct.class.recast[ct]; className _ ct.class.name ENDLOOP; SELECT TRUE FROM Rope.Equal["Record",className] => PrintCellRecord[NARROW[ct.data], remap]; Rope.Equal["Transistor",className] => PrintTransistor[ct, remap]; ENDCASE => {IO.PutF[eSimStrean," ... Unknown Cell "]; ERROR;}; }; PrintCellRecord: PROC [crec: CoreClasses.RecordCellType, remap: RemapTable] = { IO.PutF[eSimStrean,"\nCellRecord"]; FOR i: NAT _ 0, i + 1 WHILE i < crec.size DO PrintCellInstance[crec.instances[i], remap]; ENDLOOP; }; PrintCellInstance: PROC [cinst: CoreClasses.CellInstance, remap: RemapTable] = { PrintCellType[cinst.type, remap]; }; ExtractESim: PROC [ct: Core.CellType, filename: Rope.ROPE] = { }; END. ŠMakeESim.mesa Copyright (C) 1987 by Xerox Corporation. All rights reserved. Created April 1, 1987 11:11:19 am PST by Bob Krivacic See if wire name is in the 1st remap table. If so then return the remapped name, else return the given name. Map the public wires to the actual names. Check if the actual names are themselves re-mapped at a lower level in the remap table, and place the most global name with the public in the remap table. Format of the table is: {[(public name, globalname), ... (...)], [(public name, globalname), ... (...)], ... [...] } IF count > 100 THEN ERROR; remap _ MakeRemapTable[]; For i in ct.instances do .... Κ™˜J™‚J™JšΟk œœIœ˜XJ˜šΟnœœ˜Jšœœ˜6Jš˜J˜Jšœ œœœ˜4Jšœ œœ ˜ Jšœ œœœ ˜%Jšœ œœœ ˜%J˜J˜Jšœ  œœ@˜_J˜Jšœœ˜ J˜J˜šžœœ&œœ˜[J™mJ˜J˜—J˜šžœœ3œ˜iJ™ΌJ˜J˜—J˜šžœœ+˜@J˜Jšœœ ˜/J˜Jšœ£˜₯J˜J˜Jšœ œœ™J˜—J˜J˜šž œœ+˜>J˜Jšœœ˜%J˜J™J™Jšœ]˜_J˜šœœœ˜Jšœe˜gIcodešœ˜Kšœ˜Kšœ˜—J™šœœ˜Jšœ3œ˜KJšœA˜Ašœ ˜Jšœœ(œ˜3——J˜J˜—J˜šžœœ:˜OJ˜Jšœ!˜#J˜šœœ œ˜,Jšœ,˜,Jšœ˜—J˜J˜—J˜šžœœ9˜PJ˜!J˜—J˜J˜J˜šž œœ$œ˜>J˜J™J˜J˜—J˜Jšœ˜——…—β