csim_design - 2024.1 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2024-07-03
Version
2024.1 English

Description

Compiles and runs pre-synthesis C/C++ simulation using the provided C/C++ test bench.

Tip: To specify the files for the test bench run the following command:
add_files -tb

The simulation results are written to the csim folder inside the active solution.

Syntax

csim_design [OPTIONS]

Options

-O
Enables optimized compilation of the C/C++ test bench. This increases compilation time, but results in better runtime performance.
-argv <string>
Specifies the argument list for the behavioral test bench. The <string> is passed onto the main() C/C++ function of the test bench.
-clean
Enables a clean build. Without this option, csim_design compiles incrementally.
-ldflags <string>
Specifies the options passed to the linker for simulation. This option is typically used to pass include path information or library information for the C/C++ test bench.
-profile
Enable the creation of the Pre-Synthesis Control Flow.
-sanitize_address
The option controls whether the address sanitizer is enabled during C simulation. The address sanitizer errors on addressing issues such as out of bounds array accesses.
-sanitize_undefined
The option controls whether the undefined behavior sanitizer is enabled during C simulation. This sanitizer errors when a C/C++ construct with undefined behavior is executed during C simulation.
-setup
When this option is specified, the simulation binary will be created in the csim directory of the active solution, but simulation will not be executed. Simulation can be launched later from the compiled executable.

Examples

Compiles and runs C/C++ simulation:

csim_design

Compiles source design and test bench to generate the simulation binary. Does not execute the simulation binary:

csim_design -O -setup
Tip: To run the simulation, execute run.sh in a command terminal, from the csim/build directory of the active solution.