Core.mx
Copyright Ó 1989 by Xerox Corporation. All rights reserved.
Barth, May 10, 1989 4:21:45 pm PDT
(cedar-directory "Core")
(cedar-imports "Convert" "CoreClasses" "CoreOps")
(define-ref-type "Core" "Properties")
Utilities
(define-proc (int-to-string int)
"convert int to string"
result ← StringFromRope[Convert.RopeFromCard[TheINT[int]]];
)
Wire
(define-ref-type "Core" "Wire")
(define-proc (create-wires size (name) (props))
"create a wire"
result ← CoreOps.CreateWires[TheINT[size], IF name#undefined THEN TheROPE[name] ELSE NIL, IF props#undefined THEN TheProperties[props] ELSE NIL];
)
(define-proc (wire-props wire)
"wire.properties"
result ← TheWire[wire].properties;
)
(define-proc (wire-size wire)
"wire.size"
result ← MakeFixnum[TheWire[wire].size];
)
(define-proc (wire-child wire child)
"wire.elements[child]"
result ← TheWire[wire].elements[TheINT[child]];
)
(define-proc (wire-name-short wire)
"short wire name"
result ← StringFromRope[CoreOps.GetShortWireName[TheWire[wire]]];
)
Cell Class
(define-ref-type "Core" "CellClass")
(define-proc (cell-class-name cell-class)
"cellClass.name"
result ← StringFromRope[TheCellClass[cellClass].name];
)
(define-proc (cell-class-properties cell-class)
"cellClass.properties"
result ← TheCellClass[cellClass].properties;
)
(define-proc (record-cell-class)
"record cell class"
result ← CoreClasses.recordCellClass;
)
(define-proc (transistor-cell-class)
"transistor cell class"
result ← CoreClasses.transistorCellClass;
)
Cell Type
(define-ref-type "Core" "CellType")
(define-proc (cell-type-class cell-type)
"cellType.class"
result ← TheCellType[cellType].class;
)
(define-proc (cell-type-public cell-type)
"cellType.public"
result ← TheCellType[cellType].public;
)
(define-proc (cell-type-data cell-type)
"cellType.data"
result ← TheCellType[cellType].data;
)
(define-proc (cell-type-properties cell-type)
"cellType.properties"
result ← TheCellType[cellType].properties;
)
(define-proc (cell-type-to-basic cell-type)
"maximal recast of cell-type"
result ← CoreOps.ToBasic[TheCellType[cellType]];
)
(define-proc (cell-type-name cell-type)
"name of cell type"
result ← StringFromRope[CoreOps.GetCellTypeName[TheCellType[cellType]]];
)
currentCellType: Core.CellType ← NIL;
(define-proc (current-cell-type)
"return current cell type"
result ← currentCellType;
)
Record Cell Type
(define-ref-type "CoreClasses" "RecordCellType")
(define-proc (record-cell-type-internal record-cell-type)
"recordCellType.internal"
result ← TheRecordCellType[recordCellType].internal;
)
(define-proc (record-cell-type-size record-cell-type)
"recordCellType.size"
result ← MakeFixnum[TheRecordCellType[recordCellType].size];
)
(define-proc (record-cell-type-instance record-cell-type instance)
"recordCellType.instances[instance]"
result ← TheRecordCellType[recordCellType].instances[TheINT[instance]];
)
(define-ref-type "CoreClasses" "CellInstance")
(define-proc (cell-instance-actual cell-instance)
"cellInstance.actual"
result ← TheCellInstance[cellInstance].actual;
)
(define-proc (cell-instance-type cell-instance)
"cellInstance.type"
result ← TheCellInstance[cellInstance].type;
)
(define-proc (cell-instance-properties cell-instance)
"cellInstance.properties"
result ← TheCellInstance[cellInstance].properties;
)