# What's New in LEF 5.8 C/C++ Programming Interface -- 1
Describes new, changed, and removed features for the LEF API in version 5.8.
Author: Technical Publications

###
What's New in LEF 5.8 C/C++ Programming Interface

# 1

# New Features

This chapter describes the new features that were added in this release of the LEF application programming interface.

| General LEF Reader Changes

| LEF Reader Setup and Control Routines

| LEF Reader Callback Routines

| LEF Reader Classes

## General LEF Reader Changes

The following changes were made in the latest version of the parser:

Elimination of static data: In the latest version, the parser architecture has changed from C style-based to C++ style-based. In the previous version of the parser, most of the parser data were stored in static variables and the data lifecycle was based on initializers and cleaners. The new architecture places data in data singletons and uses C++ constructors and destructors. The switch to the C++ architecture has improved the parser re-enterability, made the data flow more robust, and helped clean multiple memory leaks in the parser code.

Introduction of parsing sesions: In the previous version, data were stored in static variables and, therefore, were retained across all parsing cycles. This meant that if a property was defined once, it continued to be defined in the next LEF file reads. In some applications, this feature was actively used. In others, it disturbed expected application behavior. To address this issue, the latest version of the parser introduces two modes of files processing - compatibility mode and session-based mode.

|  | Compatibility mode (session-less mode) - This mode is compatible with the old parser behavior. You can call the parser initialization once with lefrInit(), adjust parsing settings and initialize the parser callbacks any time. The properties in PROPERTYDEFINITIONS sections will be active in all subsequent file reads.

Session-based mode - This mode introduces the concept of a parsing session - the parser configuration settings will be active during the session time and will be cleaned on its end.The parsing session also controls PROPERTYDEFINITIONS data. Property definitions remain active throughout the parsing session time and are cleaned at the end of the session. The session-based mode does not require calling callbacks and configuration unset functions - all callbacks and properties will be set to defaults by lefrClear() or the next session lefrInitSession() call.

> By default, the LEF parser works in the compatibility mode. To activate the session-based mode, you must use lefrInitSession() instead of lefrInit().

> Note: Currently, the compatibility mode is used for all old applications for which code has not been adjusted. The lef2oa and def2oa translators have adjusted to use the session-based parsing mode.

> For more information, see "LEF Reader Working Modes" in the LEF 5.8 C/C++ Programming Interface (Open Licensing Program).

| Long DEF Files Support: In this version, the LEF line counter switched to 64-bit integer type, making it possible to process files with more than two billion lines.

## LEF Reader Setup and Control Routines

The following reader setup and class routines were added in this release:

| lefrInitSession

| lefrClear

| lefrRegisterLef58Type

For more information, see "LEF Reader Setup and Control Routines" in the LEF 5.8 C/C++ Programming Interface (Open Licensing Program).

## LEF Reader Callback Routines

The following reader callback routines were added in this release:

| lefrFixedMaskCbk

| lefrMacroFixedMaskCbk

| lefrSetMacroForeignCbk

| lefrSetMacroSiteCbk

| lefrUnsetMacroForeignCbk

| lefrUnsetMacroSiteCbk

For more information on reader callback routines, see "LEF Reader Callback Routines" in the LEF 5.8 C/C++ Programming Interface (Open Licensing Program).

## LEF Reader Classes

The following LEF Reader classes were added in this release:

| lefiMacroSite

| lefiMacroForeign

For more information on reader classes, see "LEF Reader Classes" in the LEF 5.8 C/C++ Programming Interface (Open Licensing Program).

Return to top of page

For support, see Cadence Online Support service.
Copyright © 2016, Cadence Design Systems, Inc.
All rights reserved.