trsim 1.0 for Windows x64

Verilog simulation you can put in a script

It compiles and runs your design, tells you whether the run passed, and writes a waveform file that GTKWave, ModelSim and Verdi all read.

Free release

Download

Version: 1.0 (Windows x64)

A command-line simulator for scripts and regressions, a windowed front end with a waveform viewer, the engine they share, and six worked examples.

Download trsim 1.0SHA-256 checksum

Release details

Released 20 August 2026 • 976,083 bytes • Windows x64 • MIT Licence

SHA-256
3e1b71be481cbfb4628eb774fea343b3ec27b9eebf647e9af62844bf41d14567

Manuals

Six manuals ship inside the download as markdown, and are readable here as well.

Open the manuals

Getting started

Five minutes in

Every example checks itself and prints its own verdict, so you never have to read a waveform to find out whether it worked.

Run one example:

cd examples\01_counter
..\..\trsim.exe -top counter_tb -time 5000 counter.v

It prints:

counter: 8-bit loadable up-counter
  ok    after reset = 0
  ok    after 5 counts = 5
  ok    held with en low = 5
  ok    after load 0xA0 = 160
  ok    wrapped past 0xFF = 0
  ok    async reset is immediate = 0
PASS  counter

That run also wrote counter.vcd. Open it in GTKWave, or start trsimgui.exe and open it there. To check all six examples against their recorded output:

cd examples
run_all.ps1

Command line

Running your own design

trsim -top my_tb -time 100000 rtl\*.v tb\my_tb.v

-top <module>

Top-level module. Defaults to the first one found.

-time <n>

How long to simulate.

-timeunit <u>

ns, us, ms, ps or fs. A `timescale in the source wins.

+incdir+<dir>

Where to look for `include files.

-vcd <out.vcd>

Write a waveform file, if the testbench does not call $dumpfile itself.

-native <out.c>

Compile the design to C instead of interpreting it.

The exit code is what a build script should read: 0 ok, 1 compile error, 2 the simulation reported a failure, 3 bad command line. Run trsim -h for the full list of options.

Performance

Two back ends

By default trsim interprets the design. It can also compile it to C, which is dramatically faster on a large one — the compiled backend runs a 1361-signal, 598-process system-on-chip at roughly the speed of a commercial simulator and reproduces its output exactly.

trsim -top my_tb -time 100000 -native build\my_tb.c rtl\*.v tb\my_tb.v

Then build my_tb.c with any C compiler and run the result.

The compiled path does not cover the whole language yet. Where it meets something it cannot compile it says so and stops, rather than generating something that would quietly be wrong.

Debugging

Waveforms

Put $dumpfile("out.vcd"); $dumpvars(0, tb); in the testbench, or pass -vcd out.vcd on the command line. The output is plain IEEE 1364 Annex A VCD, which GTKWave, ModelSim and Verdi all read.

trsimgui.exe includes its own viewer: hierarchy filtering, hex, binary, decimal, octal and ASCII radix, two cursors with a delta readout, edge stepping with rising and falling modifiers, rubber-band zoom, zoom about the pointer, and saved sessions.

Known limitations

Published so you meet them here rather than discovering them:

  • A task containing a timing control (@(posedge clk), #delay) does not suspend its caller; keep such waits in the calling block.
  • localparam derived from a parameter that an instance overrides folds to the default value.
  • reg signed [7:0] is not accepted; $signed() and integer are.
  • A string parameter reads as 0 in a numeric context, though %s prints it.
  • Array elements inside an instantiated module appear in the VCD but their changes are not recorded; scalars and vectors are.
  • The compiled backend covers a large subset, not all, of what the interpreter runs.

A bug report is most useful with the smallest .v file that shows the problem, and what another simulator does with the same file.

Disclaimer

trsim is supplied "AS IS" and "AS AVAILABLE", without express or implied warranties. Although reasonable efforts have been made to develop and test it, it has not been exhaustively tested under all operating conditions, hardware configurations, software environments, or application scenarios.

Users are solely responsible for evaluating, testing, validating, and determining suitability before use. The software is not intended for safety-critical, life-critical, medical, aviation, nuclear, military, emergency-response, or other mission-critical systems unless independently verified and accepted by the user for such purposes.

To the maximum extent permitted by applicable law, chapAI.ai and its authors shall not be liable for direct, indirect, incidental, consequential, or special damages arising from use of, or inability to use, the software.