The Cadence® Library Exchange Format (LEF) reader provides several routines to initialize the reader and set global variables that are used by the reader.
The following routines set options for reading a LEF file.
Follow these steps to use the application programming interface (API) routines.
|
Call the lefrInit() routine. You must call this routine first. |
|
Call the lefrRead() routine to start reading the LEF file. |
For examples of API routine usage, see Appendix A, "LEF Reader and Writer Examples."
The following LEF reader setup and control routines are available in the API.
Initializes internal variables in the LEF reader. You must use this routine before using lefrRead. You can use routines to set callback functions before or after this routine.
Boolean. If is non-zero, performs the parser initialization in session-based mode; otherwise, the function will initialize the parsing in the compatibility mode, working exactly as lefrInit() call.
Releases all parsing session data and closes the parsing session. if the call to lefrClear() is skipped, the data cleaning and the session closing is done by the next lefrInitSession() call.
Retrieves the user-provided data. The LEF reader returns an opaque lefiUserData pointer, which you set using lefrSetUserData. You can set or change the user data at any time with the lefrSetUserData and lefrGetUserData calls. Every callback returns the user data as the third argument.
Prints all callback routines that are not set but have constructs in the LEF file.
Specifies a pointer to an already open file. This allows the parser to work with either a disk file or a piped stream. This argument is required. Any callbacks that have been set will be called from within this routine.
Specifies a UNIX filename using either a complete or a relative path specification.
Specifies the data type. For information about the lefiUserData type, see "lefiUserData".
Registers new LEF layers LEF58_TYPE - TYPE pairs. As LEF syntax requires that any layer LEF58_TYPE can be used only for certain layer types, you have to set a number of allowed layer LEF58_TYPE - TYPE pairs, calling the function several times (if necessary). For example, to register a new LEF58_TYPE XXX for the CUT and ROUTING type layers, you have to call the API twice:
Specifies the LEF layer lef58Type.
Specifies the LEF layer type.
Resets all of the internal variables of the LEF reader to their initial values.
Changes the character used to indicate comments in the LEF file.
Specifies the comment character. The default character is a pound sign (#).
Allows the parser to upshift all names if the LEF file is case insensitive.
Sets the user-provided data. The LEF reader does not look at this data, but passes an opaque lefiUserData pointer back to the application with each callback. You can set or change the user data at any time using the lefrSetUserData and lefrGetUserData routines. Every callback returns the user data as the third argument.
Specifies the user-provided data.
Sets a default version number for a LEF file that does not conrtain a VERSION statement.
Specifies the version number to assign to the LEF file.