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

dbSetViaColorInfo

dbSetViaColorInfo(
d_dbViaId
l_layer1ControlInfo 
l_layer2ControlInfo 
l_cutLayerControlInfo 
)
=> t / nil

Description

Updates the color control and color state for the three via layers (via layer1, via layer2, and cut layer) of the given via.

A warning message is displayed with a return value of nil for conditions such as the following:

Arguments

d_dbViaId

Database ID of the via.

l_layer1ColorInfo

list( t_colorControl g_locked ) | nil

Specifies the color information for via layer1 as a list of the following:

  • t_colorControl
    Color control to assign to the via layer.
    Valid values: noColor, noShift, shift1, and so on, up to shiftx, where x is an integer equal to the number of masks for the via layer - 1. For example, the valid values for a 3-mask via layer are: noColor, noShift, shift1, and shift2.
  • g_locked
    Specifies one of two Boolean values: t or nil, where t sets the via layer state to locked, and nil sets the state to unlocked.

Use nil for no change to the via layer.

l_layer2ColorInfo

list( t_colorControl g_locked ) | nil

Specifies the color information for via layer2, in the same format as l_layer1ColorInfo.

l_cutLayerColorInfo

list( t_colorControl g_locked ) | nil

Specifies the color information for the via cut layer, in the same format as l_layer1ColorInfo.

Value Returned

t

Color information for the via was successfully changed.

nil

Color information for the via was not changed or an error occurred.

Example

; Set environment.
w = dbOpenCellViewByType("lib" "design" "layout" "maskLayout" "w")
cv = w->cellView
tf = techGetTechFile(cv)
techCreateLayer(tf 1 "M1")
techCreateLayer(tf 2 "M2")
techCreateLayer(tf 3 "V0")
; Make the metal layers colorable.
techSetLayerNumColorMasks(tf "M1" 2) 
techSetLayerNumColorMasks(tf "M2" 2)
vd = techCreateStdViaDef(tf "std" "M1" "M2"
list("V0" 1 1 1) list(1 1 '(1 1))
'(1 1) '(1 1) '(1 1) '(1 1) '(1 1))
v1 = dbCreateVia(cv vd 5:0 "R0")
v2 = dbCreateVia(cv vd 10:0 "R0")
; Set color information for v1 and v2.
dbSetViaColorInfo(v1 list("noColor" nil) list("shift1" t) nil)
dbSetViaColorInfo(v2 list("noShift" t) nil nil)
; Check results.
dbGetViaLayerControl(v1 "layer1")             ;  => "noColor"
dbIsViaColorStateLayerLocked(v1 "layer1")     ;  => nil
dbGetViaLayerControl(v1 "layer2")             ;  => "shift1"
dbIsViaColorStateLayerLocked(v1 "layer2")     ;  => t
dbGetViaLayerControl(v1 "cutLayer")           ;  => "noShift"
dbIsViaColorStateLayerLocked(v1 "cutLayer")   ;  => nil
dbGetViaLayerControl(v2 "layer1")             ;  => "noShift"
dbIsViaColorStateLayerLocked(v2 "layer1")     ;  => t
dbGetViaLayerControl(v2 "layer2")             ;  => "noColor"
dbIsViaColorStateLayerLocked(v2 "layer2")     ;  => nil
dbGetViaLayerControl(v2 "cutLayer")           ;  => "noShift"
dbIsViaColorStateLayerLocked(v2 "cutLayer")   ;  => nil

Return to top
 ⠀
X