Area Estimation Function Definition
You can define your own area estimation function for calculating the area of a cellview or a virtual hierarchy. You can directly type the area estimation functions in the CIW or define them in the .cdsinit file.
Syntax
areaEstimatorName(
d_objectId
@optional (param1 defVal1) (param2 defVal2)
)
=> areaVal/ nil
Description
Defines an area estimator function to calculate the size of a rectangular area boundary for a cellview or virtual hierarchy.
The return value of the function is either a float or integer. The value returned by the function is the area of the boundary of the cellview or virtual hierarchy to be drawn. This value is divided by the utilization factor. The height and width of the boundary is then determined by using the aspect ratio defined. If the value returned by the function is negative, its absolute value is taken.
Arguments
Value Returned
|
|
|
Examples
In the example below, you can define your own function myFunc. The function traverses all the instances defined in the cvId cellview, and calculates sum of areas of bBox of each instance and returns the area value. When you run the Generate All From Source command for area calculation, write the name of the function in the myFunc field as it is not required to specify the cellview Id. The cellview Id is automatically picked up from the open cellview.
procedure(myFunc(cvId)
let( (area inst)
area = 0.0
foreach( inst cvId~>instances
x1 = caar(inst~>bBox)
x2 = caadr(inst~>bBox)
y1 = cadar(inst~>bBox)
y2 = cadadr(inst~>bBox)
area = area + abs(x1-x2)*abs(y1-y2)
)
area
)
)
In the example below, the area estimation function has no parameters.
procedure(myFunction(clusterId)
prog((area)
// Function body to calculate area involving instances of ClusterId
foreach(ins clusterId~>instances
area = area + ins~>master~>prBoundary~>area
)
return(area)
)
)
In the example below, the function has one parameter with some default value.
procedure(myFunction(clusterId @optional (contactArea 1.0)
prog((area)
// Function body to calculate area involving instances of ClusterId
foreach(ins clusterId~>instances
area = area + ins~>master~>prBoundary~>area * contactArea
)
return(area)
)
)
In the example below, you can define an area estimator function to adjust the PR boundary of a soft block in a layout.
procedure(areaEstUsingLayoutPRBoundary(
cv
@optional (multFactor 10.0) (pinArea 0.14) (numPins 10))
let( ((area 0.0) ele master)
foreach( ele cv~>instances
master = ele~>master
if(master~>prBoundary then
area = area + master~>prBoundary~>area
else
area = area + abs((caadr(master~>bBox) - caar(master~>bBox))
* (cadadr(master~>bBox) - cadar(master~>bBox)))
)
)
area = area * abs(multFactor) + numPins * pinArea
)
)
In the example below, you can define the function to adjust the area boundary of all bounding boxes of instances and shapes in a design.
procedure(areaEstUsingLayoutBBox(cv)
let( ((area 0.0) ele master)
foreach( ele cv~>instances
master = ele~>master
area = area + abs((caadr(master~>bBox) - caar(master~>bBox))
* (cadadr(master~>bBox) - cadar(master~>bBox)))
)
area
)
)
You can also write an area estimator function as follows.
procedure(myFunc(maskLayoutId @optional (contactArea 1.0)
prog((area)
// Function body to calculate area involving layout instances
foreach(ins maskLayoutId~>instances
area = area + ins~>master~>prBoundary~>area * contactArea
)
return(area)
)
)
Related Topics
Area Estimation Function Registration
Registering an Area Estimation Function to Adjust a Virtual Hierarchy Area Boundary
Registering an Area Estimation Function to Adjust a Soft Block PR Boundary
Adding an Area Estimator Function for Layout Generation
Return to top