SimRead.Mesa
Last Edited by: Spreitzer, May 28, 1984 10:17:03 pm PDT
DIRECTORY IO, Rope;
SimRead: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
FromStream: PROC [from: IO.STREAM, client: Client, format: Format];
Client:
TYPE =
REF ClientRep; ClientRep:
TYPE =
RECORD [
GotTransistor: PROC [pd: ParseData, cd: ClientData],
GotNode: PROC [pd: ParseData, cd: ClientData],
GotInput: PROC [name: ROPE, cd: ClientData] ← NIL,
GotOther: PROC [char: CHAR, from: IO.STREAM, cd: ClientData] RETURNS [continue: BOOL] ← NIL,
Init: PROC [pd: ParseData, c: Client] ← NIL,
warningLog: IO.STREAM ← NIL,
data: ClientData ← NIL];
ClientData: TYPE = REF ANY;
ParseData:
TYPE =
REF ParseDataRep; ParseDataRep:
TYPE =
RECORD [
For Nodes:
name: ROPE ← NIL,
areas, perimiters: ARRAY Layer OF REAL ← ALL[0],
For Transistors:
transistorType: TransistorType ← nE,
gate, source, drain: ROPE ← NIL,
length, width, area: REAL ← 0,
shape: CHARACTER ← '?,
For Both:
x, y: REAL ← 0,
capacitanceEstimate: REAL ← 0.0,
capEstimateClass: CapEstimateClass ← ignore,
other: REF ANY ← NIL --for use by Format
];
ceiling:
INT =
LAST[
INT];
When an INT has this value, it may have overflowed on input.
TransistorType: TYPE = {nE, nD, pE, pD};
Layer: TYPE = {Metal, Metal2, Poly, NDiff, PDiff};
CapEstimateClass: TYPE = {incremental, absolute, ignore};
GetFormat:
PROC [name:
ROPE]
RETURNS [format: Format
--NIL if not found--];
You can probably count on finding formats: Chipmonk, Stanford, and Berkeley.
Format:
TYPE =
REF FormatRep; FormatRep:
TYPE =
RECORD [
whatToDo: ARRAY CHAR OF Handler,
Init: PROC [pd: ParseData, f: Format] ← NIL,
data: FormatData ← NIL];
Handler: TYPE = LIST OF FieldProc;
FieldProc: TYPE = PROC [first: CHAR, from: IO.STREAM, f: Format, pd: ParseData, c: Client] RETURNS [continue: BOOL ← TRUE];
FormatData: TYPE = REF ANY;
SetFormat: PROC [name: ROPE, format: Format];
NodeName, NodeX, NodeY, MetalArea, PolyArea, DiffArea, MetalPerim, PolyPerim, DiffPerim, EatTrash, ReadCap, Gate, SourceDrain, Length, Width, Shape, TransistorX, TransistorY, TransistorArea, FollowIndirection, EatComment, UseClientsOther: FieldProc;
END.