CLI
The nexsim CLI compiles VHDL files, runs a simulation, and writes the results to a VCD file. Use it with agents, for scripting, batch runs, or when you prefer a terminal workflow.
Basic usage
Section titled “Basic usage”nexsim design.vhd testbench.vhd --top testbench_entity --run-time 1000This compiles both files, elaborates the top entity, simulates for 1000 ns, and writes output.vcd.
Opening a viewer
Section titled “Opening a viewer”Add --open to launch a waveform viewer after simulation:
# Open with GTKWavenexsim design.vhd tb.vhd --top tb --run-time 1000 --open gtkwave
# Open with Surfernexsim design.vhd tb.vhd --top tb --run-time 1000 --open surferIf the viewer isn’t installed, nexsim prints instructions for opening the file manually.
Custom output path
Section titled “Custom output path”nexsim design.vhd tb.vhd --top tb --run-time 1000 --output result.vcdDefault output is output.vcd in the current directory.
Multi-file designs
Section titled “Multi-file designs”Pass all source files as arguments. File order doesn’t matter — dependencies are resolved during elaboration.
nexsim pkg.vhd adder.vhd top.vhd top_tb.vhd --top top_tb --run-time 5000Output
Section titled “Output”A successful run prints:
Running VHDL simulation for 1000ns...Simulation completed successfully!VCD file generated: output.vcdSignal changes are summarized in the terminal (first 5 per signal).
Error messages
Section titled “Error messages”If something goes wrong, nexsim tells you what failed:
- Compilation failed — syntax error or type mismatch in your VHDL
- Elaboration failed — unknown entity, port mismatch, or unresolved component
See the full option reference at CLI Reference.