Skip to content

@celox-sim/celox / index / RunTestOptions

Interface: RunTestOptions ​

Defined in: packages/celox/src/testbench.ts:240

Properties ​

allowInferredLatches? ​

optional allowInferredLatches?: boolean

Defined in: packages/celox/src/types.ts:488

Allow inferred latches in always_comb when no explicit inferred_latch diagnostic level is set. Project diagnostics take precedence. Default: false.

Inherited from ​

SimulatorOptions.allowInferredLatches


clockType? ​

optional clockType?: "posedge" | "negedge"

Defined in: packages/celox/src/types.ts:570

Clock polarity. Default: "posedge".

Inherited from ​

SimulatorOptions.clockType


compileThreads? ​

optional compileThreads?: number

Defined in: packages/celox/src/types.ts:598

Compile threads: the SystemVerilog frontend and native code generation compile independent modules and units on up to this many threads. The compiled program is the same for every count. These are not the simulation threads. Default: the available parallelism of the host.

Inherited from ​

SimulatorOptions.compileThreads


components? ​

optional components?: Record<string, InjectedTbComponent>

Defined in: packages/celox/src/testbench.ts:241


craneliftOptLevel? ​

optional craneliftOptLevel?: "none" | "speed" | "speedAndSize"

Defined in: packages/celox/src/types.ts:548

Cranelift backend optimization level. Default: "speed".

Inherited from ​

SimulatorOptions.craneliftOptLevel


deadStorePolicy? ​

optional deadStorePolicy?: "off" | "preserveTopPorts" | "preserveAllPorts"

Defined in: packages/celox/src/types.ts:581

Dead store elimination policy. Default: "off". When optLevel is "O2", defaults to "preserveTopPorts" unless explicitly set.

Inherited from ​

SimulatorOptions.deadStorePolicy


enableAliasAnalysis? ​

optional enableAliasAnalysis?: boolean

Defined in: packages/celox/src/types.ts:559

Enable alias analysis in the Cranelift egraph optimization pass. Default: true. Only effective when craneliftOptLevel is not "none".

Inherited from ​

SimulatorOptions.enableAliasAnalysis


enableVerifier? ​

optional enableVerifier?: boolean

Defined in: packages/celox/src/types.ts:564

Enable the Cranelift IR verifier. Default: true. Disabling saves compile time at the cost of less validation.

Inherited from ​

SimulatorOptions.enableVerifier


extraSource? ​

optional extraSource?: string

Defined in: packages/celox/src/types.ts:574

Additional Veryl source to append to the main source code.

Inherited from ​

SimulatorOptions.extraSource


falseLoops? ​

optional falseLoops?: LoopBreak[]

Defined in: packages/celox/src/types.ts:566

False-loop declarations to ignore during compilation.

Inherited from ​

SimulatorOptions.falseLoops


fourState? ​

optional fourState?: boolean

Defined in: packages/celox/src/types.ts:481

Enable 4-state (X) simulation. Default: false.

Inherited from ​

SimulatorOptions.fourState


fst? ​

optional fst?: string

Defined in: packages/celox/src/types.ts:501

Path to write FST waveform output (compressed binary, read natively by GTKWave and Surfer). Mutually exclusive with vcd.

Inherited from ​

SimulatorOptions.fst


hotspotJit? ​

optional hotspotJit?: boolean

Defined in: packages/celox/src/types.ts:617

With tier, compile hot execution groups incrementally (hotspot JIT) and keep cold work interpreted, on native x86-64 and AArch64 hosts. Default: true. false selects whole-image tiered compilation, whose adoption tierCompiled() reports. Configurations hotspot JIT does not support (other hosts, threads > 1) use whole-image tiering.

Inherited from ​

SimulatorOptions.hotspotJit


optimize? ​

optional optimize?: boolean

Defined in: packages/celox/src/types.ts:541

Shorthand to enable/disable all SIRT optimization passes. true = all on (O1), false = all off (O0). Overridden by optLevel or optimizeOptions if set.

Deprecated ​

Use optLevel instead.

Inherited from ​

SimulatorOptions.optimize


optimizeOptions? ​

optional optimizeOptions?: OptimizeOptions

Defined in: packages/celox/src/types.ts:546

Per-pass SIRT optimizer flags. Takes precedence over optimize.

Deprecated ​

Use optLevel + passOverrides instead.

Inherited from ​

SimulatorOptions.optimizeOptions


optLevel? ​

optional optLevel?: "O0" | "O1" | "O2"

Defined in: packages/celox/src/types.ts:508

Optimization level preset. Default: "O1".

  • "O0": No SIR optimizations (except TailCallSplit). Fast compilation.
  • "O1": All SIR optimizations enabled. Default.
  • "O2": O1 + dead store elimination (PreserveTopPorts).

Inherited from ​

SimulatorOptions.optLevel


parameters? ​

optional parameters?: ParamOverride[]

Defined in: packages/celox/src/types.ts:576

Top-level module parameter overrides.

Inherited from ​

SimulatorOptions.parameters


passOverrides? ​

optional passOverrides?: string[]

Defined in: packages/celox/src/types.ts:534

Per-pass overrides applied on top of optLevel. Each entry: "+sir:<pass_name>" to enable, "-sir:<pass_name>" to disable.

Valid SIR passes: store_load_forwarding, hoist_common_branch_loads, bit_extract_peephole, optimize_blocks, split_wide_commits, commit_sinking, inline_commit_forwarding, eliminate_dead_working_stores, reschedule, coalesce_stores, gvn, concat_folding, xor_chain_folding, vectorize_concat, split_coalesced_stores, partial_forward, identity_store_bypass, if_conversion (small pure if/else diamonds of clocked processes become muxes), tail_call_split, derived_edge_units (generated units for the edges of gated and divided clocks; "-sir:derived_edge_units" walks their plans instead, which builds faster and ticks slower), partitioned_settle (settle only the partitions of the combinational logic whose inputs changed; off unless enabled with "+sir:partitioned_settle"), net_inlining (SystemVerilog designs built with a dead store policy: combinational nets the policy does not keep observable become part of the logic that reads them), scheduler_callees (a native image's compiled scheduler calls its larger bodies as functions of their own, which compile in parallel; on at every level, "-sir:scheduler_callees" inlines them), next_state_dag (schedule eligible two-state SystemVerilog registers from the combinational dataflow graph, enabled at O2)

Example ​

ts
["-sir:reschedule", "+sir:gvn"]

Inherited from ​

SimulatorOptions.passOverrides


plusargs? ​

optional plusargs?: string[]

Defined in: packages/celox/src/types.ts:483

Ordered SystemVerilog plusargs; the leading + is optional.

Inherited from ​

SimulatorOptions.plusargs


regallocAlgorithm? ​

optional regallocAlgorithm?: "backtracking" | "singlePass"

Defined in: packages/celox/src/types.ts:554

Register allocator algorithm for the Cranelift backend. Default: "backtracking".

  • "backtracking": Slower compilation but generates better code with fewer spills.
  • "singlePass": Much faster compilation but generates code with more register spills.

Inherited from ​

SimulatorOptions.regallocAlgorithm


resetType? ​

optional resetType?: "async_high" | "async_low" | "sync_high" | "sync_low"

Defined in: packages/celox/src/types.ts:572

Reset type. Default: "async_low".

Inherited from ​

SimulatorOptions.resetType


strict? ​

optional strict?: boolean

Defined in: packages/celox/src/types.ts:494

Promote recoverable diagnostics (inferred latches and other compatibility fallbacks) from warnings to errors. Explicit per-code project diagnostics take precedence. Default: false.

Inherited from ​

SimulatorOptions.strict


threads? ​

optional threads?: number

Defined in: packages/celox/src/types.ts:591

Simulation threads, including the calling thread. Default: 1.

With more than one thread, phases with enough independent work get lane-partitioned alternatives that run concurrently; each is kept only when it measures faster than its sequential version. Results are identical to sequential simulation. Use at most the number of physical cores.

Inherited from ​

SimulatorOptions.threads


tier? ​

optional tier?: boolean

Defined in: packages/celox/src/types.ts:609

Run tiered: execution starts on the interpreter immediately while the host's compiled tier is prepared on a background thread, and the simulation adopts it at the next safe point after compilation. Default: false (compile up front before the first tick).

Honored by Simulator.create, fromSource, and fromProject; rejected by fromFrontendArtifact, the time-based Simulation factories, and addons without tiered support (e.g. WASM).

Inherited from ​

SimulatorOptions.tier


trueLoops? ​

optional trueLoops?: TrueLoopSpec[]

Defined in: packages/celox/src/types.ts:568

True-loop declarations with convergence limits.

Inherited from ​

SimulatorOptions.trueLoops


vcd? ​

optional vcd?: string

Defined in: packages/celox/src/types.ts:496

Path to write VCD waveform output. Mutually exclusive with fst.

Inherited from ​

SimulatorOptions.vcd