csim_design

Description

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

To specify the files for the test bench, use add_file -tb. The simulation working directory is csim inside the active solution.

Syntax

csim_design [OPTIONS]

Options

-O
Enables optimize compilation of the C test bench. This increases compilation time, but results in better runtime performance.
-argv <string>
The <string> is passed onto the main() C function of the test bench.

Specifies the argument list for the behavioral 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 test bench.
-mflags <string>

Specifies options required for simulation.

-profile
Enable the creation of the Pre-Synthesis Control Flow.
-setup
Creates all simulation files created in the sim/<HDL> directory of the active solution. The simulation is not executed, but can be run later from a command shell.

Examples

Compiles and runs 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: