Description
C Simulation (csim.* / config_csim)
Controls C simulation execution. Settings live in the
[hls]
config file; the Tcl equivalent is
config_csim
(persistent configuration) or passing arguments
directly to
csim_design
(per-run).
Syntax
| Option | Config File | Tcl | Default | Type | Description |
|---|---|---|---|---|---|
| O | csim.O=true | -O | — | bool | Enable compiler optimizations during C simulation (faster simulation). |
| argv | csim.argv=<string> | -argv <string> | — | string | Command-line arguments passed to the test bench main(). |
| clean | csim.clean=true | -clean | — | bool | Enable compiler optimizations during C simulation (faster simulation). |
| ldflags | csim.ldflags=<flags> | -ldflags <flags> | — | string | Linker flags for C simulation. |
| mflags | csim.mflags=<flags> | -mflags <flags> | — | string | Additional flags passed to the make command during C simulation. |
| profile_tripcount | csim.profile_tripcount=true | -profile_tripcount | — | bool | Profile loop trip counts during C simulation to guide loop_tripcount directives. |
| sanitize_address | csim.sanitize_address=true | (via config_cosim -sanitize_address) | — | — | Enable address sanitizer. Note: Maps to csim.* config namespace despite being a config_cosim Tcl option. |
| sanitize_undefined | csim.sanitize_undefined=true | (via config_cosim -sanitize_undefined) | — | — | Enable undefined behavior sanitizer. Note: Maps to csim.* config namespace despite being a config_cosim Tcl option. |
| setup | csim.setup=true | -setup | — | bool | Only set up the csim build environment; do not run simulation. |
Usage
ini
[hls]
csim.O=true
csim.argv=input.dat output.dat
csim.profile_tripcount=true
tcl
csim_design -argv "input.dat output.dat" -profile_tripcount