
- •Contents
- •Introduction
- •About These Application Notes
- •What Is a Cell?
- •Cell Interconnect Delays
- •What Is Delay Back Annotation?
- •What Is Delay Calculation?
- •Prerequisites and Related Reading
- •Creating a Back Annotator
- •The Programming Language Interface (PLI) Mechanism
- •PLI Access Routines
- •Access Routine Families
- •Required UTILITY Routines
- •Access to Timing Information
- •Effect of Source Protection
- •Where to Look for More Information
- •Back Annotating Delays
- •Examples Used in This Chapter
- •Retrieving a Handle to the Object Associated with the Delay
- •Retrieving a Handle to a Net
- •Retrieving a Handle to a Module Path Delay
- •Retrieving a Handle to a Timing Check
- •Annotating the Delay
- •Determining How and Where to Place Delays
- •Annotating to Cells with Path Delays
- •Annotating to Cells with Lumped or Distributed Delays
- •Libraries with Mixed Cell Timing Descriptions
- •Annotating to Timing Checks
- •Calculating Delays
- •Examples Used in This Chapter
- •Scanning Cell Instances Within the Design
- •Determining the Scope of the Delay Calculation
- •Scan Methodology
- •Scanning Objects Within the Cell Instance
- •Relationship to Modeling Methodology
- •Scanning Path Delays
- •Scanning Cell Output Ports
- •Libraries with Mixed Cell Timing Descriptions
- •Types of Data Needed
- •Coding Data into Cell Descriptions (Attributes)
- •Retrieving Cell I/O Load Factors
- •Load Due to Interconnect Wire
- •Calculating and Annotating the Delays
- •Calculating the Delays
- •Annotating the Delays
- •Example Listings
- •Delay Back Annotators
- •Cell Output Nets to Lumped or Distributed Delay Cells
- •Interconnect Nets to Lumped or Distributed Delay Cells
- •Cell Output Nets to Path Delay Cells
- •Interconnect Nets to Path Delay Cells
- •Delay Calculators
- •Creating and Extracting Data From a Hash Table
- •Random Cell Scan and Cell Output Nets
- •Random Cell Scan and Cell Interconnect Nets
- •Delay Calculation Driven by Cell Output Nets
- •Delay Calculation Driven by a Cell Interconnect Nets
- •Index

Back Annotation and Delay Calculation
Calculating Delays
Scanning Cell Instances Within the Design
Determining the Scope of the Delay Calculation
The first task that you must accomplish within your delay calculation facility is to determine the area of the design where delay calculation should take place. Typically, this involves
finding the module instance at the top of the hierarchical tree that contains all of the cell instances for this calculation. Note that this may encompass the entire design or, in the general case where each hierarchical tree represents a different library or technology type, a subsection of the design.
The most common methods of providing this ‘starting point’ information to the delay calculation process are as follows:
■explicitly in an argument passed to the delay calculation system task call within the Verilog-XL HDL description
■implicitly by the location of the delay calculation system task call within the Verilog-XL HDL description
Explicit method
To determine the starting point for delay calculation from information explicitly provided in the system task call, pass the name of the top-level module instance for the calculation in the call and use acc_handle_tfarg to retrieve a handle to this module instance. This routine returns a handle to the object identified by a system task or function call argument based on the ordered location of the argument in the call’s argument list. Figure 4-7 on page 49 shows a C-language routine fragment that uses this method.
October 2000 |
48 |
Product Version 3.2 |

Back Annotation and Delay Calculation
Calculating Delays
Figure 4-7 Determining delay calculation starting point from information passed in the system task cal
l
static handle dl_process_scope_arg() {
handle scope = acc_handle_tfarg(1); int arg_type;
Get handle to first argument
if (acc_fetch_type(scope) != accModule) {
. . .
}
. . .
return (scope);
}
Check if module instance handle
Return handle to module instance
If you use this method, you must set the last field in the veriusertfs entry for the delay calculation system task to a non-zero value. Otherwise, the simulatror reports compilation errors when you pass a module instance name as an argument to the system task call. Refer to the PLI 1.0 User Guide and Reference for complete information on the veriusertfs data structure and its role in defining new system tasks and functions.
Implicit method
To determine the starting point for delay calculation from the location of the system task call, use acc_handle_parent to retrieve a handle to the module instance containing the call. Use the value returned by the PLI interface routine tf_getinstance as a handle to the system task call in order to facilitate this process. Figure 4-8 on page 50 shows a C-language routine fragment that uses this method if no explicit starting point information is passed to the delay calculation system task.
October 2000 |
49 |
Product Version 3.2 |

Back Annotation and Delay Calculation
Calculating Delays
Figure 4-8 Determining delay calculation starting point from the location of the system task call
static handle dl_process_scope_arg()
{
handle scope = acc_handle_tfarg(1); int arg_type;
if (acc_fetch_type(scope) != accModule)
{
/************************************************************/ /** if task argument is null, set scope to invoking module **/ /************************************************************/
arg_type = tf_typep(1); Get argument type if (arg_type == tf_nullparam)
scope = acc_handle_parent(tf_getinstance());
. . . |
|
Retrieve handle to |
} |
|
system task parent |
|
|
|
. . . |
|
|
return (scope); |
|
Return handle to system |
|
task parent |
|
|
||
|
|
}
In general, the explicit method is preferable to the implicit method, because the explicit method results in a mechanism that supports different delay calculations on different pieces of the same design without the need to bury the system task calls within the description.
Scan Methodology
Dependencies
The algorithm that you use to scan the cell instances within a design depends on the data that is needed to perform the delay calculation for a particular instance. In most technologies, the required data can be extracted from the cell itself, retrieved from some external source or
October 2000 |
50 |
Product Version 3.2 |

Back Annotation and Delay Calculation
Calculating Delays
obtained from the cell instance’s immediate environment within the design. For libraries corresponding to these technologies, you can scan the cell instances randomly, because the required delay calculation data does not imply any order dependency within the calculation process.
For other technologies, however, the calculation of delays for a particular cell instance depends not only on the data mentioned above but also on the delays calculated for other cell instances within the design. In these cases, you must use a more complex algorithm to scan the cell instances in a particular order.
The following section describes the common case in which a random scanning technique can be used. Note that, even in cases where the target technology does not imply any order dependency within the calculation process, it may be desirable to use a different scanning technique. “Load Due to Interconnect Wire” on page 63 describes a method that uses the net names contained in a capacitance back annotation file to scan the design.
Randomly scanning cell instances
To scan cell instances randomly, use acc_next_cell with the handle to the module instance at the top of the desired hierarchy in a C-language while loop construct. Since acc_next_cell scans the entire hierarchy below this module instance, you can process all of the cell instances within this single construct. Figure 4-9 on page 52 shows a C-language routine fragment corresponding to the example design shown in Figure 4-1 on page 44 and Figure 4-4 on page 46 that uses this method to scan all cell instances below the indicated module instance.
October 2000 |
51 |
Product Version 3.2 |