Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

mgEvalInBackgroundModgen

mgEvalInBackgroundModgen(
d_schCV
o_schCon
s_callback
[ g_updateSrcConstraint ]
) 
=> l_userCallbackReturnVal / nil

Description

Creates a Modgen scratch cellview for the specified schematic Modgen constraint, evaluates the specified user callback in the Modgen context, and then closes and deletes the scratch cellview.

Arguments

d_schCV

The schematic cellview.

o_schCon

The schematic Modgen constraint for which a Modgen scratch cellview needs to be created.

s_callback

The user callback to be executed in a background Modgen.

g_updateSrcConstraint

Specifies whether the schematic Modgen constraint should be updated with any changes that could have taken place in the layout Modgen constraint during execution of the user callback.

Default value is t.

Value Returned

l_userCallbackReturnVal

Return values from callback(mgId layCon).

nil

The command was unsuccessful.

Example

Creates a Modgen scratch cellview for the specified schematic Modgen constraint, evaluates it, closes it, and deletes it.

procedure(getRows(mgId conId)
 caddr(car(exists(x ciConListParams(conId) car(x) == "numRows")))
)
procedure(getCols(mgId conId)
 caddr(car(exists(x ciConListParams(conId) car(x) == "numCols")))
)
procedure(setRowsGetColsUpdate(mgId conId)
 ciConUpdateParams(conId list(list("numRows" 4))); this sets "numCols" to 4
 caddr(car(exists(x ciConListParams(conId) car(x) == "numCols")))
)
procedure(setRowsGetColsNoUpdate(mgId conId)
  ; disable Modgen constraint observer while setting "numRows" to 4
  mgExecNoConObs(conId
 ciConUpdateParams(conId list(list("numRows" 4)))
 caddr(car(exists(x ciConListParams(conId) car(x) == "numCols"))) ; "numCols" will not change because the observer was not running when "numRows" was set to 4
)
schCV = geGetEditCellView()
scache = ciCacheGet(schCV)
ciConCreate(scache 'modgen ?members list(list("PM1" 'inst) list("PM2" 'inst)))
schCon = car(scache->constraints)
mgEvalInBackgroundModgen(schCV schCon 'getRows nil)
> 1
mgEvalInBackgroundModgen(schCV schCon 'getCols nil)
> 8
mgEvalInBackgroundModgen(schCV schCon 'setRowsGetColsUpdate)
> 4
mgEvalInBackgroundModgen(schCV schCon 'setRowsGetColsNoUpdate)
> 4

Return to top
 ⠀
X