Skip to content

Repository files navigation

owaveform

A browser-native Verilog simulator and waveform viewer. Paste or load RTL, simulate it instantly with zero install, inspect waveforms with real logic-analyzer ergonomics.

The honest pitch: the fastest path from RTL idea to waveform on a screen — for education, interview prep, quick experiments, and embedding in docs and blog posts. Not a synthesis tool, not SystemVerilog-complete, not a Verilator replacement.

owaveform simulating an unmodified third-party single-cycle CPU — hierarchy tree, control signals, and $display console output

Above: owaveform simulating an unmodified third-party single-cycle CPU (jaywonchung/Verilog-Harvard-CPU), pasted straight into the editor — output matches Icarus Verilog exactly.

Highlights

  • Event-driven 4-state kernel (~400k cycles/s) with X propagation — uninitialized regs read x, render red in the viewer, and answer "why is my output x?" honestly — plus parameters, hierarchy, memories, functions, initial/#n testbenches, tristate inout buses, signed arithmetic, and `define/ `include preprocessing — every deviation from IEEE 1364 documented in SEMANTICS.md
  • Icarus Verilog as the oracle: a 200-seed differential fuzz corpus and per-feature diff tests run in CI; 500 random cases fuzz nightly
  • Viewer built for scale: windowed LOD rendering (1M transitions / 500 signals under a 16ms frame budget), hierarchy tree with search, five radices, named markers with a Δ table, keyboard navigation, PAN/ZOOM drag modes
  • VCD in and out: streaming quirk-tolerant reader (drag a Verilator/Icarus dump onto the wave pane) and writer
  • Shareable: session sidecar JSON, #src= URLs with the design compressed into the fragment, offline-capable PWA, dependency-free single-file build

Quickstart

pnpm install          # also generates the parser from verilog.pegjs
pnpm dev              # app dev server
pnpm test             # all test suites
pnpm build:single     # dependency-free dist/waveform.html
pnpm bench            # perf budgets
pnpm diffuzz -n 100   # differential fuzz vs Icarus (brew/apt install iverilog)

Packages

Package What it is
@owaveform/grammar peggy grammar, preprocessor, and AST types for the subset
@owaveform/kernel event-driven simulation kernel (no DOM)
@owaveform/vcd streaming VCD reader/writer
@owaveform/wave-view three.js waveform viewer component, framework-free
@owaveform/app the web app, a thin shell over the packages

The supported language subset and every deliberate deviation from IEEE 1364 are documented in SEMANTICS.md. Architecture decisions live in DECISIONS.md; the roadmap in plan.md; how to contribute in CONTRIBUTING.md.

waveform.html at the repo root is the original single-file prototype, kept frozen as a reference. The equivalent artifact is now produced by pnpm build:single.

License

MIT. The single-file build inlines three.js (MIT, © three.js authors). Icarus Verilog is used only as a development-time test oracle and is not distributed with owaveform.

About

Open source Verilog simulator and waveform viewer

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages