-- File: IPTypeTab.mesa
Last Edited by: CSChow, February 2, 1985 2:16:33 am PST
DIRECTORY
IO,
SymTab,
Rope,
IP,
IPParams,
IPChipRose;
IPTypeTab: CEDAR DEFINITIONS
IMPORTS IPParams = BEGIN
Ref: TYPE = REF Rep;
Rep: TYPE = RECORD[tab: SymTab.Ref];
CoType: TYPE = REF CoTypeRep;
CoTypeRep: TYPE = IP.CoTypeRep; -- name, instances, pins, shapeInfo
Pin: TYPE = REF PinRep;
PinRep: TYPE = IP.PinRep; -- name, physicalPins, auxInfo
PhysicalPin: TYPE = REF PhysicalPinRep;
PhysicalPinRep: TYPE = IP.PhysicalPinRep;
EachCoTypeAction: TYPE = PROC[coType: CoType] RETURNS [quit: BOOLFALSE];
Create: PROC[chipRose: IPChipRose.Ref] RETURNS [Ref];
FetchCoType: PROC[typeTab: Ref, name: Rope.ROPE, raiseError: BOOLTRUE] RETURNS [CoType];
--! Raise IP.Error[missingRegistration, name]
CoTypes: PROC[typeTab: Ref, action: EachCoTypeAction];
CheckSelf: PROC[typeTab: Ref];
DescribeSelf: PROC[typeTab: Ref, stream: IO.STREAM, debug: BOOL ← IPParams.DebugSystem];
-- IF debug THEN print extra info NOT used to ReconstructSelf
ReconstructSelf: PROC[stream: IO.STREAM] RETURNS [Ref];
--Operation on individual CoType
GetPin: PROC [coType: CoType, pinName: Rope.ROPE] RETURNS [Pin];
--! Raise IP.Error
GetShape: PROC[coType: CoType] RETURNS [REF IP.ShapeRep] = INLINE {
RETURN [coType.shapeInfo.shape]
}; --GetShape
AddInstance: PROC[coType: CoType, instance: REF IP.ComponentRep] = INLINE {
coType.instances ← CONS[instance, coType.instances]
};--AddInstance
RemInstance: PROC[coType: CoType, instance: REF IP.ComponentRep];
--! Raise IP.Error[callingError. "<message>"]
MakePhysicalPins: PROC[coType: CoType, pin: Pin, orient: IP.Orientation] RETURNS [LIST OF PhysicalPin];
--make a (deep ) copy of pin.physicalPins in the proper orientation
END.