Set up Virtuoso simulation with Ocean SKILL. Use when configuring simulator, design target, model files, or design variables before running simulation.
Configure Ocean environment for circuit simulation via virtuoso-cli.
virtuoso sim setup --lib <LIB> --cell <CELL> --view <VIEW> --format json
View defaults to schematic. Check available views first if setup returns nil:
virtuoso skill exec 'let((cell) cell=ddGetObj("LIB" "CELL") foreach(mapcar v cell~>views v~>name))' --format json
virtuoso skill exec 'modelFile(list("/path/to/models.lib" "tt") list("/path/to/models.lib" "res_tt"))' --format json
Critical: Do NOT include entries with empty section names "" for .lib files — spectre will fail with SFE-675. Only .ckt files can have empty sections.
virtuoso skill exec 'desVar("L" 130e-9)' --format json
virtuoso skill exec 'desVar("VGS" 0.6)' --format json
Check required variables by looking at spectre.out errors — they list undefined parameters.
virtuoso skill exec 'resultsDir("/tmp/my_sim_results")' --format json
The correct order for a fresh simulation is:
# 1. Setup simulator and design
virtuoso sim setup --lib LIB --cell CELL
# 2. Set resultsDir BEFORE anything else
virtuoso skill exec 'resultsDir("/tmp/my_sim")' --format json
# 3. Set modelFile with CORRECT absolute paths (verify files exist!)
virtuoso skill exec 'modelFile(list("/path/to/model.lib" "tt") list("/path/to/model.lib" "res_tt"))' --format json
# 4. Set design variables
virtuoso skill exec 'desVar("L" 130e-9)' --format json
# 5. Run
virtuoso sim run --analysis dc --param saveOppoint=t --timeout 120
# 6. Measure
virtuoso sim measure --analysis dcOp --expr 'value(getData("/NM0:gm" ?result "dcOpInfo"))'
simulator('spectre) resets modelFile — always re-set modelFile after sim setuplet blocks — call simulator(), design(), analysis(), run() at top leveldesign() returns nil: two causes — (a) the cell may not have the view you specified (check v~>name), or (b) the library is not registered (Virtuoso started from wrong directory — restart from the project dir whose cds.lib includes the library)run() takes <0.3s and no spectre.out: modelFile not set or paths wrong — spectre silently failsrun() takes >1s with spectre.out: real execution happened — check spectre.out for errorsnotes cell)oa/)