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

dbSetOccShapeColor

dbSetOccShapeColor( 
l_occShape
t_color
)
=> t / nil

Description

Assigns the specified color to the given occurrence shape. You can set the color for occurrence shapes with types Path, PathSeg, Polygon, and Rect.

Arguments

l_occShape

list(l_hierPath d_shapeId)
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 to be colored. Supported shapes: Path, PathSeg, Polygon, Rect

t_color

Name of the color mask ("grayColor", "mask<mask number>Color", where <mask number> is 1, 2, and so on, up to the number of masks defined in the technology library for the layer). If the color is "grayColor" and there is a hierarchical color lock (HCL) on the occurrence shape, the HCL will be removed if the color state is unlocked.

Value Returned

t

Color is assigned to the specified occurrence shape.

nil

Returned in case of an error. An error occurs when an attempt is made to:

  • Set the color of the occurrence shape, and the color state of the occurrence shape or the shape is found to be locked. Unlock the color state of the occurrence shape before changing its color.
  • Set the color mask to 'multi' or 'black'.
  • Set the color of an occurrence shape that is on an unbounded layer or on a layer that does not support coloring.
  • Set the color for occurrence shapes with a type other than Path, PathSeg, Polygon, or Rect.

Example

Creates a one-level occurrence shape rect0, then sets its color to mask2Color.

cv = dbOpenCellViewByType("tech" "design" "layout" "maskLayout" "w")
top = dbOpenCellViewByType("tech" "top" "layout" "maskLayout" "w")
inst = dbCreateInst(top cv "InstInTop" '(0 0) "R0")
rect0 = dbCreateRect(cv '("metal2" "drawing") '((1 8.6) (5.3 6.6)))
path = list(list(inst) rect0)
dbSetOccShapeColor(path "mask2Color")

Creates a via, then sets the color of a randomly picked shape from the via master to mask1Color.

viaDef_M2_M1 = techFindViaDefByName(tf "M2_M1")
via1t_m2_m1 = dbCreateVia(cv viaDef_M2_M1 10:10 "R0")
path = list(list(via1t_m2_m1) nth(1 via1t_m2_m1~>viaHeader~>master~>shapes))
dbSetOccShapeColor(path "mask1Color")

Sets the color of the instance of rect1 inside the mosaic to mask2Color.

rect1 = dbCreateRect(cv '("metal2" "drawing") '((0 7.6) (4.3 5.6)))
mosaic = dbCreateSimpleMosaic(top cv "MosaicInTop" list(0 0) "R0" 2 2 2 2)
path = list(list(list(mosaic 1 1)) rect1)
dbSetOccShapeColor(path "mask2Color")
dbGetShapeEffectiveColor(path)

Sets the color of the rect shapes in the instances given by inst1 and inst2 to mask1Color.

dbSetOccShapeColor((list(list(inst1 inst2) rect) "mask1Color")

Return to top
 ⠀
X