DIRECTORY Rope USING [ROPE], IntHashTable USING [Table]; ExpertLibRead: CEDAR DEFINITIONS ~ BEGIN LibTable: TYPE = IntHashTable.Table; PinPos: TYPE = RECORD[ x: INT, y: INT ]; PartPinInfo: TYPE = RECORD[ pinPos: PinPos, diameter: NAT, site: NAT, padStack: NAT, swap: NAT, type: NAT, name: Rope.ROPE ]; LibEntry: TYPE = REF LibEntryRep; LibEntryRep: TYPE = RECORD[ partName: Rope.ROPE, partNumber: Rope.ROPE, partPinInfo: SEQUENCE size: NAT OF PartPinInfo ]; ReadLibFile: PROC [file: Rope.ROPE] RETURNS [libTable: LibTable]; PartName: PROC [libTable: LibTable, entryNumber: CARD] RETURNS [partName: Rope.ROPE]; PartNumber: PROC [libTable: LibTable, entryNumber: CARD] RETURNS [partNumber: Rope.ROPE]; PinNumber: PROC [libTable: LibTable, entryNumber: CARD] RETURNS [pinNumber: NAT]; RelativePinPosition: PROC [libTable: LibTable, entryNumber: CARD, pin: NAT] RETURNS [pinPos: PinPos]; FirstPinOfThisType: PROC [libTable: LibTable, entryNumber: CARD, type: NAT, swap: NAT] RETURNS [pinNumber: NAT]; IsPinOfThisType: PROC [libTable: LibTable, entryNumber: CARD, pinNumber: CARD, type: NAT, swap: NAT] RETURNS [yes: BOOLEAN]; END. ExpertLibRead.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. Christophe Cuenod, April 2, 1989 0:54:55 am PST This interface gives a primitive to read an Expert .lib file and retrieve from this file for part entry the relative position of each pin. Reading the .lib file Creates libTable from the input file Retrieving various informations Retrieving the name of an entry Retrieving the "part number" of an entry Retrieving the number of pins of an entry gives the number of pins of an entry Retrieving a pin position gives the relative position of any pin for an unrotated entry Retrieving the first pin with a given type and swap code. returns 0 if not found Testing the type and swap code of a given pin. TRUE if the pin has the correct type and swap code Κ‘˜code•Mark outsideHeaderšœ™Kšœ<™