Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbColorShapeQuery2

dbColorShapeQuery2( 
d_cellViewId
l_layerPurposePair
l_bBox
[ x_startLevel ]
[ x_stopLevel ]
[ n_filterSize ]
[ l_transform ]
)
=> l_occShapesWithColorAndState / nil

Description

Returns a list of shapes and occurrence shapes within a given region, and the coloring information for each shape. The coloring information includes the color, whether the color is locked, and whether the coloring is due to the color attribute or hierarchical color locking on the shape.

Arguments

d_cellViewId

ID of the cellview.

l_layerPurposePair

List of layer-purpose pairs.

l_bBox

List of coordinates representing a bounding box.

x_startLevel

The start hierarchy level for the query.

x_stopLevel

The stop hierarchy level for the query.

n_filterSize

The filter size for shapes.

l_transform

The transform applied on the query.

Value Returned

l_occShapesWithColorAndState

((l_occShape t_color b_state b_isHCL)...)
A list of elements.

  • l_occShape is list(l_hierPath d_shapeId) The hierarchical path to a shape. where,
    • l_hierPath is list((d_refId | l_mosaicElem)…) where,
      • d_refId The database ID of the non-mosaic instance or via.
      • l_mosaicElem is list(d_mosaicId x_row x_col) Represents a mosaic element in the hierarchy path. where, d_mosaicId The database ID of the mosaic instance. x_row Row in which d_shapeId occurs inside this mosaic instance. x_col Column in which d_shapeId occurs inside this mosaic instance.
  • d_shapeId The database ID of the shape.

  • t_color Name of the color mask ("grayColor", "mask1Color", "mask2Color", "mask3Color", "mask4Color", "mask5Color", "mask6Color", "mask7Color", or "mask8Color").
  • b_state A Boolean value that determines whether the color of the shape is locked.
  • b_isHCL A Boolean value that specifies whether the shape color is due to color attribute (nil) or hierarchical color locking (t).

nil

Returned in case of failure.

Example

Returns the list of Metal1:drawing shapes in the selected Pcell along with the information for each shape about its color, locked state, and whether the color is due to color attribute or hierarchical color locking (HCL). In the figure below, three shapes are reported. The first shape is not colored, the second is locked on mask1Color but not due to HCL, and the third is locked on mask2Color due to HCL.

dbColorShapeQuery2(cv list("Metal1" "drawing") css()~>bBox)
((((db:0x2edfd01a) db:0x56190228) "grayColor" nil nil)
(((db:0x2edfd01a) db:0x5619022f) "mask1Color" t nil)
(((db:0x2edfd01a) db:0x56190236) "mask2Color" t t)
)

Converts the hierarchical path output from dbColorShapeQuery2 using the asNested function to the format accepted by dbGetInstTransform.

(defun asNested (l)
(if (cdr l) then
(list (car l) (asNested (cdr l)))
else
l
) ; if
)  ; defun
occShapes = dbColorShapeQuery2( geGetEditCellView() 
list( "M1" )
geGetEditCellView()~>bBox )
foreach(occShape occShapes
hierPathTransform = dbGetInstTransform( asNested( caar( occShape ) ) )
printf(" -- %L -- transform : %L \n" car(occShape) hierPathTransform )
); foreach

The following is sample output for this example:

 -- ((db:0x18c5e31a db:0x18c5de1a) db:0x18c5df9c) -- transform : ((1.9 2.0) "R0" 1.0) 
-- ((db:0x18c5d39a) db:0x18c5df9c) -- transform : ((1.9 2.04) "R0" 1.0)

Prints information for the M1 occurrence shapes in the current edit cellview and the concatenated transform for each shape. The asNested function converts the dbColorShapeQuery2 output to the input format required by dbGetInstTransform.


Return to top
 ⠀
X