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

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

# 1

# New Features

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

| General Reader Changes

| Reader Setup and Control Routines

| Writer Routines - Blockages

| Reader Class Routines

| DEF Reader Callback Routines

## General 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 DEF 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 defrInit(), 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 defrClear() or the next session defrInitSession() call.

> By default, the DEF parser works in the compatibility mode. To activate the session-based mode, you must use defrInitSession() instead of defrInit().

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

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

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

## Reader Setup and Control Routines

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

| defrInitSession

| defrClear

| defrGetAllowComponentNets

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

## Writer Routines - Blockages

The following writer routies for blockages were added in this release:

| defwBlockagesLayer

| defwBlockagesLayerFills

| defwBlockagesLayerPushdown

| defwBlockagesLayerExceptpgnet

| defwBlockagesLayerComponent

| defwBlockagesLayerDesignRuleWidth

| defwBlockagesPlacement

| defwBlockagesPlacementComponent

| defwBlockagesPlacementPushdown

| defwBlockagesPlacementSoft

| defwBlockagesPlacementPartial

| defwBlockagesRect

| defwBlockagesPolygon

| defwBlockagesLayerMask

Most of these functions duplicate old style functions with similar names. The old-style functions will be obsoleted in the next parser release.

For more information, see "DEF Writer Routines" in the DEF C/C++ Programming Interface (Open Licensing Program).

## Reader Class Routines

The following reader class routines were added in this release:

| defiComponentMaskShiftLayer

For more information, see "DEF Reader Classes" in the DEF C/C++ Programming Interface (Open Licensing Program).

## DEF Reader Callback Routines

The following reader callback routines were added in this release:

| defrComponentMaskShiftLayerCbkType

For more information, see "DEF Reader Callback Routines" in the DEF 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.