EDIFDataStructure:
CEDAR
DEFINITIONS = {
LORA: TYPE = LIST OF REF ANY;
ATOMList: TYPE = LIST OF ATOM;
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
Dictionary: TYPE = HashTable.Table;
CoreCellType: TYPE = Core2.CellType;
Assertions: TYPE = Asserting.Assertions;
ParseTreeList: TYPE = EDIFfing.ParseTreeList;
ParseTree: TYPE = EDIFfing.ParseTree;
EDIFWhole: TYPE = REF EDIFWholePrivate;
EDIFWholePrivate:
TYPE =
RECORD [
name: NameStuff,
status: Status,
designs: Dictionary--of Design--,
libraries: Dictionary--of Library--,
externalLibraries: Dictionary--of <don't care>--,
comments: Comments,
ues: UserExtensions];
EDIFWholeConversion: TYPE = REF EDIFWholeConversionPrivate;
EDIFWholeConversionPrivate:
TYPE =
RECORD [
ew: EDIFWhole,
cTail: Comments,
ueTail: UserExtensions];
NameStuff:
TYPE =
RECORD [
edif:
ROPE ←
NIL,
The EDIF Identifier used
rename:
ROPE ←
NIL
The unrestricted string
];
Comment: TYPE = RopeList ← NIL;
Comments: TYPE = LIST OF Comment ← NIL;
CommentConversion: TYPE = REF CommentConversionPrivate;
CommentConversionPrivate:
TYPE =
RECORD [
c: Comment,
tail: RopeList ← NIL];
UserExtensions: TYPE = LIST OF UserExtension ← NIL;
UserExtension:
TYPE =
RECORD [
name: NameStuff,
forms: ParseTreeList ← NIL
];
UserExtensionConversion: TYPE = REF UserExtensionConversionPrivate;
UserExtensionConversionPrivate:
TYPE =
RECORD [
ue: UserExtension,
fTail: ParseTreeList ← NIL];
Status: TYPE = REF StatusPrivate;
StatusPrivate:
TYPE =
RECORD [
version: Version ← unspecifiedVersion,
level: Level ← unspecifiedLevel,
writtens: WrittenList ← NIL,
comments: Comments,
ues: UserExtensions];
StatusConversion: TYPE = REF StatusConversionPrivate;
StatusConversionPrivate:
TYPE =
RECORD [
s: Status,
wTail: WrittenList ← NIL,
cTail: Comments,
ueTail: UserExtensions];
unspecifiedVersion: Version = [];
Version:
TYPE =
RECORD [major, medium, minor: INT ← unspecifiedINT]
← [];
Level: TYPE = INTEGER [-1 .. 2];
unspecifiedLevel: Level = -1;
WrittenList: TYPE = LIST OF Written;
Written: TYPE = REF WrittenPrivate;
WrittenPrivate:
TYPE =
RECORD [
time: BasicTime.GMT ← BasicTime.nullGMT,
accountings: AccountingList ← NIL,
comments: Comments,
ues: UserExtensions];
WrittenConversion: TYPE = REF WrittenConversionPrivate;
WrittenConversionPrivate:
TYPE =
RECORD [
w: Written,
aTail: AccountingList ← NIL,
cTail: Comments,
ueTail: UserExtensions];
TimeStampConversion: TYPE = REF BasicTime.Unpacked;
AccountingList: TYPE = LIST OF Accounting;
Accounting: TYPE = REF AccountingPrivate;
AccountingPrivate:
TYPE =
RECORD [
name: ATOM,
data: ROPE ← NIL
];
Design: TYPE = REF DesignPrivate;
DesignPrivate:
TYPE =
RECORD [
name: NameStuff,
rootCellTypeGen: ProtoCellType,
status: Status ← NIL,
comments: Comments,
ues: UserExtensions];
DesignConversion: TYPE = REF DesignConversionPrivate;
DesignConversionPrivate:
TYPE =
RECORD [
d: Design,
cTail: Comments,
ueTail: UserExtensions];
ProtoCellType: TYPE = REF ANY --actually UNION [CellType, CellTypeGen]--;
CellTypeGen: TYPE = REF CellTypeGenPrivate;
CellTypeGenPrivate:
TYPE =
RECORD [
name: NameStuff,
library: Library,
Apply: PROC [args: LORA, data: REF ANY] RETURNS [cct: CellType],
data: REF ANY
];
CellTypeFromEDIF: TYPE = REF CellTypeFromEDIFPrivate;
CellTypeFromEDIFPrivate:
TYPE =
RECORD [
status: Status ← NIL,
viewMap: ViewMap ← NIL,
views: Dictionary--of ViewGen--,
comments: Comments,
ues: UserExtensions];
CellTypeGenConversion: TYPE = REF CellTypeGenConversionPrivate;
CellTypeGenConversionPrivate:
TYPE =
RECORD [
ctg: CellTypeGen,
ctfe: CellTypeFromEDIF,
cTail: Comments,
ueTail: UserExtensions];
CellType: TYPE = REF CellTypePrivate;
CellTypePrivate:
TYPE =
RECORD [
views: Dictionary--of View--
];
ViewGen: TYPE = REF ViewGenPrivate;
ViewGenPrivate:
TYPE =
RECORD [
name: NameStuff,
type: ViewType,
status: Status ← NIL,
interface, contents: ParseTree ← NIL,
comments: Comments,
ues: UserExtensions];
ViewGenConversion: TYPE = REF ViewGenConversionPrivate;
ViewGenConversionPrivate:
TYPE =
RECORD [
vg: ViewGen,
cTail: Comments,
ueTail: UserExtensions];
View: TYPE = REF ViewPrivate;
ViewPrivate:
TYPE =
RECORD [
quaCore: CoreCellType
];
ViewType: TYPE = {MaskLayout, Netlist, Schematic, Symbolic, Behavior, Document, Stranger};
ViewMap: TYPE = REF ViewMapPrivate;
ViewMapPrivate:
TYPE =
RECORD [
portMap: HashTable.Table--MappablePort b PortMapping--,
instanceMap: HashTable.Table--MappableInstance b InstanceMapping--,
comments: Comments,
ues: UserExtensions];
PortMapping: TYPE = REF PortMappingPrivate;
PortMappingPrivate:
TYPE =
RECORD [
equiv: MappablePortList,
comments: Comments,
ues: UserExtensions];
MappablePortList: TYPE = LIST OF MappablePort;
MappablePort: TYPE = REF MappablePortPrivate;
MappablePortPrivate:
TYPE =
RECORD [
viewName, portName: ATOM
];
InstanceMapping: TYPE = REF InstanceMappingPrivate;
InstanceMappingPrivate:
TYPE =
RECORD [
equiv: MappableInstanceList,
comments: Comments,
ues: UserExtensions];
MappableInstanceList: TYPE = LIST OF MappableInstance;
MappableInstance: TYPE = REF MappableInstancePrivate;
MappableInstancePrivate:
TYPE =
RECORD [
viewName: ATOM,
instantiationPath: ATOMList
];
Library: TYPE = REF LibraryPrivate;
LibraryPrivate:
TYPE =
RECORD [
name: NameStuff ← [],
status: Status ← NIL,
technology: Technology ← NIL,
cells: Dictionary--of ProtoCellType--,
comments: Comments,
ues: UserExtensions];
LibraryConversion: TYPE = REF LibraryConversionPrivate;
LibraryConversionPrivate:
TYPE =
RECORD [
l: Library,
cTail: Comments,
ueTail: UserExtensions
];
Technology: TYPE = REF TechnologyPrivate;
TechnologyPrivate:
TYPE =
RECORD [
figureGroupDefaults: Dictionary--of FigureGroupDefault--,
units: Units,
simulationAlgebras: Dictionary--of SimulationAlgebra--,
comments: Comments,
ues: UserExtensions];
Units:
TYPE =
RECORD [
systemToScales: Dictionary--of DScales--,
dimensionToScales: Dictionary--of SScales-- ← NIL
];
DScales: TYPE = REF DScalesPrivate;
DScalesPrivate:
TYPE =
RECORD [
system: ROPE,
scales: Dictionary--of Scale--,
comments: Comments,
ues: UserExtensions];
SScales: TYPE = REF SScalesPrivate;
SScalesPrivate:
TYPE =
RECORD [
dimension: ROPE,
scales: Dictionary--of Scale--
];
Scale: TYPE = REF ScalePrivate;
ScalePrivate:
TYPE =
RECORD [
system, dimension: ROPE,
factor: REAL
];
1 in the EDIF file corresponds to factor*name in system.
FigureGroupDefault: TYPE = REF FigureGroupDefaultPrivate;
FigureGroupDefaultPrivate:
TYPE =
RECORD [
name: NameStuff,
pathType: PathType ← unspecifiedPathType,
width: INT ← unspecifiedINT,
color: Imager.ConstantColor ← unspecifiedColor,
fillPattern: ImagerPixelMap.PixelMap ← unspecifiedPixelMap,
borderPattern: ImagerPixelMap.PixelMap ← unspecifiedPixelMap,
comments: Comments,
ues: UserExtensions];
unspecifiedPathType: PathType = [];
PathType:
TYPE =
RECORD [
end: EndType ← unspecified,
corner: CornerType ← unspecified
];
EndType: TYPE = {extend, truncate, round, unspecified};
CornerType: TYPE = {extend, truncate, round, unspecified};
unspecifiedINT: INT = FIRST[INT];
unspecifiedColor: Imager.ConstantColor = NIL;
unspecifiedPixelMap: ImagerPixelMap.PixelMap = [
sOrigin: 0, fOrigin: 0, sMin: 0, fMin: 0, sSize: 0, fSize: 0, refRep: NIL
];
SimulationAlgebra: TYPE = REF SimulationAlgebraPrivate;
SimulationAlgebraPrivate:
TYPE =
RECORD [
name: NameStuff,
values: ATOMSequence,
combinations: ATOMSequence,
values[i] join values[j] = combinations[c[i, j, values.Length[]]] when i <= j.
c[0, j, n] = j.
c[i, j, n] = c[i-1, n-1, n] + 1 + j - i
isolated: ATOM,
simulationMaps: HashTable.Table--from: SimulationAlgebra b SimulationAlgebraMap--
];
ATOMSequence: TYPE = REF ATOMSequencePrivate;
ATOMSequencePrivate: TYPE = RECORD [atoms: SEQUENCE length: NAT OF ATOM];
SimulationAlgebraMap: TYPE = REF SimulationAlgebraMapPrivate;
SimulationAlgebraMapPrivate:
TYPE =
RECORD [
from, to: SimulationAlgebra,
forward: HashTable.Table--from:ATOM b to:ATOM--,
comments: Comments,
ues: UserExtensions];
}.