<<--File: IP.mesa>> <<--Last Edited by: CSChow, February 1, 1985 8:17:19 am PST>> <> <> <> <<>> <<--IP = Interactive (or Intelligent, if you're a believer) Placer>> <<>> <<--Most major/important records here have an 'any' field of REF ANY. >> <<-- This is for holding various various data with the records. >> <<-- Can be used by client or anybody. Client's responsibility to ensure no conflict.>> <<>> DIRECTORY CD USING [Orientation, Position, Rect], Rope USING [ROPE]; IP: CEDAR DEFINITIONS = BEGIN <<--Arithmetics>> IntVector: TYPE = CD.Position; -- RECORD [x, y: INT] NatVector: TYPE = IntVector; -- NatVector: TYPE = RECORD [x, y: NAT]; -- could have used NatVector: TYPE = IntVector, but this provides -- more constraint to aid debugging -- BTP November 20, 1987 4:59:06 pm PST -- Hybrids are too big for NAT's Orientation: TYPE = CD.Orientation; --Essentially [0..7] _ 0 <<--IPBasicsOps>> CornerTypes: TYPE = {sw, se, ne, nw}; EdgeTypes: TYPE = {south, east, north, west}; PolarityTypes: TYPE = {neg, pos}; OrientationTypes: TYPE = {hor, ver}; <<>> <<--IPTypeTab: This is the 'Type' record.>> CoTypeRep: TYPE = RECORD[ name: Rope.ROPE, instances: LIST OF REF ComponentRep, pins: LIST OF REF PinRep, shapeInfo: ShapeInfoRec, any: REF _ NIL ]; ShapeInfoRec: TYPE = RECORD[ shape: REF ShapeRep, shapeFn: REF, restriction: REF ]; ShapeRep: TYPE = RECORD[ dim: REF NatVector, --should not be NIL cornerSpaces: RECORD[sw, se, ne, nw: REF NatVector _ NIL] ]; <<>> PinRep: TYPE = RECORD[ name: Rope.ROPE, physicalPins: LIST OF REF PhysicalPinRep _ NIL, auxInfo: REF _ NIL -- Haven't decided what to use this for ]; <<>> PhysicalPinRep: TYPE = RECORD[ coord: IntVector, --relative to owner side: PinSideType _ unknown, --The closest edge active: BOOL _ FALSE -- active <=> used in computation of net length ]; <<>> <<--IPNetTab-->> NetRep: TYPE = RECORD[ name: Rope.ROPE, pinNets: LIST OF REF PinNetRep _ NIL, any: REF _ NIL ]; PinNetRep: TYPE = RECORD[ name: Rope.ROPE, net: REF NetRep, owner: REF ComponentRep, --Component physicalPins: LIST OF REF PhysicalPinRep _ NIL, any: REF _ NIL ]; <<--IPPortTab-->> PortRep: TYPE = RECORD[ name, eqClass: Rope.ROPE, net: REF NetRep, position: REF IntVector _ NIL, -- position = NIL iff port is not placed any: REF _ NIL ]; <<>> <<--IPCoTab: this is the 'instance' record-->> ComponentRep: TYPE = RECORD [ name: Rope.ROPE, origin: IntVector, active: BOOL, prinChannels: RECORD [south, east, north, west: REF ChannelRep], shape: ShapeRep, cornerChannels: RECORD[sw, se, ne, nw: REF CornerChannelsRep _ NIL], type: REF CoTypeRep, orient: CD.Orientation, pinNets: LIST OF REF PinNetRep, any: REF _ NIL -- For holding anything ]; CornerChannelsRep: TYPE = RECORD[hor, ver: REF ChannelRep]; PinSideType: TYPE = {south, east, north, west, swHor, seHor, neHor, nwHor, swVer, seVer, neVer, nwVer, interior, unknown}; <<>> <<--IPCTG: This is the channel record-->> ChannelRep: TYPE = RECORD[ type: ChType, name: Rope.ROPE, slack: RECORD[neg, pos: INT], --neg = (left/bottom)-most & pos = (right/top)most width: INT, --width is a property of the channel, slack is a result from geometrize coord: INT, boundary: REF ChBoundaryRep, chNode: NAT _ 0, statistics: ChStatRep, -- This is used in channel width estimation any: REF _ NIL --For holding anything ]; ChType: TYPE = OrientationTypes; IntersectionRep: TYPE = RECORD[ ch: REF ChannelRep, type: IntersectionType, any: REF _ NIL --For holding anything ]; IntersectionType: TYPE = [-1..1]; -- 1 => above/right, 0 = crossing, -1 => below/left ChStatRep: TYPE = RECORD[ <<-- Use in channel width estimation>> activePin, -- number of active pins on this channel nonActivePin: INT _ 0, -- number of non active pins netFactor: REAL _ 0.0 --contribution from intersection between net and channel ]; --interior pins are not counted <<>> <<--IPCB -->> ChBoundaryRep: TYPE = RECORD[ owner: REF ChannelRep, negSideHd, negSideTl, posSideHd, posSideTl: LIST OF REF IntersectionNodeRep _ NIL, negEnd, posEnd: REF IntersectionNodeRep _ NIL, negComp, posComp: REF ComponentRep _ NIL ]; IntersectionNodeRep: TYPE = RECORD[ owner: REF ChannelRep, intersection: REF IntersectionRep, dual: REF IntersectionNodeRep _ NIL, negComp, posComp: REF ComponentRep _ NIL ]; <<--Rectangle abstraction, a more efficient one compared to Misc.Rect>> Rect: TYPE = CD.Rect; --RECORD [x1, y1, x2, y2: INT; --So can use some of the packages in ChipNDale <<>> <<>> <<-- Errors & Signals>> <<-- Copied From ChipNDale: CD.mesa>> Error: ERROR [ec: ErrorCode _ programmingError, explanation: Rope.ROPE _ NIL]; ErrorCode: TYPE = {programmingError, callingError, noResource, doubleRegistration, missingRegistration, other}; END.