Product Documentation
Virtuoso Floorplanner User Guide
Product Version IC23.1, November 2023

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

d_objectId

Database ID of the cellview or virtual figGroup for which area is to be calculated.

@optional (param1 defVal1)

An optional list of name value pairs, where param1 is the parameter name and defVal1 is the default value, such as int, float, text, list, and boolean. The parameter name is considered for area estimation and its value is the corresponding value of the parameter.

You can also manually specify the list of parameters using the Area Estimation form.

Value Returned

areaVal

Returns the area value in the area estimation function.

nil

The function was not run successfully.

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
 ⠀
X