C Simulation - C Simulation - 2026.1 English - UG1399

Vitis High-Level Synthesis User Guide (UG1399)

Document_ID
UG1399
Release_Date
2026-09-11
Version
2026.1 English

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

Table 1. Configuration Table
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