Skip to main content

Verilog Simulator user guide

Verilog Simulator edits multiple Verilog sources (testbench, DUTs, `include headers) in the browser (no install), runs Icarus Verilog WASM, and views VCD waves in the embedded Surfer viewer. There is no heuristic / fake waveform: Surfer and the workspace update only when the simulator actually produces a VCD.

👉 Open the tool: Open Verilog Simulator


Quick workflow

  1. Pick a workspace in the top bar — Sample (default simulation demo) or Lint Sample Eg (intentional multiple issues for combined Slang + Yosys lint), or New workspace.
  2. Open files from the Explorer and edit in Monaco.
  3. Press Run (play) to simulate, or the Lint icon to run combined Slang WASM + YoWASP Yosys (first Yosys run may download a large WASM from the CDN).
  4. Read the Terminal log and use the right-hand tabs: Surfer · Waveform or Lint. The Lint tab shows the merged lint_report.md; click file.v:line links to jump the editor to that line.
  5. After a successful run, a .vcd file named in $dumpfile (default wave.vcd) appears in the Explorer; open it as plain text in the editor.

What you can do

  • Sample workspacetb.v, define.vh, dut_cnt.v, dut_rsync.v. Change `define CNT_WIDTH or CLK_HALF_NS to see real waves and $display output change together.
  • Multiple workspaces — keep labs or projects separate; Run and Lint use the active workspace only. Two built-in presets: Sample and Lint Sample Eg.
  • Import / exportUpload files, Import ZIP (adds a workspace), Export ZIP (download the active workspace).
  • VCD files — simulation output is written into the workspace as .vcd text after a successful Run (there is usually no wave.vcd in the tree until then).
  • Combined lint (Slang + Yosys)Slang WASM: Button Lint uses checkSystemVerilogAdvanced(source, optionsJson) with std, warningOptions, defaultNettypeNone, errorLimit, etc.; live editor squiggles still use checkSystemVerilog only. Older wasm falls back to default_nettype none source injection + the basic API. lint_report.md includes a sample optionsJson. YoWASP Yosys skips tb.v, reads the rest, then runs hierarchy -check; proc; check once per module in non-tb .v files (multiple DUTs → design -reset, repeat). The summary table counts Warning: / ERROR: lines (including file:line: forms).

Suited for small modules and testbenches in courses or portfolios. It does not replace vendor FPGA flows, timing sign-off, or UVM-class verification.


UI layout (VS Code–style)

Top workspace bar

ControlRole
Workspace dropdownChoose the active workspace used by Run
RenameChange the label of the current workspace
New workspaceNew set with tb.v only (includes default $dumpfile("wave.vcd") / $dumpvars)
Close workspaceRemove from the list (cannot close the last one)
New filePrompt for a .v / .vh / .vcd name
Delete fileDelete the currently active file (confirm). Cannot delete the last file
UploadMulti-file pick (allowed names only)
Import ZIPUnzip into a new workspace
Export ZIPDownload the active workspace

File names: ASCII letters, digits, ., _, - only; extensions .v, .vh, .vcd.

Left activity bar

IconRole
FilesShow/hide Explorer
MagnifierFind in editor (Monaco)
PlayRun simulation
Lint (checkmark)Combined lint (Slang + Yosys) → lint_report.md · right Lint tab
Four blocksBottom panel (Terminal, Output, Problems)

Explorer and editor tabs

  • Click a file in the tree to open a tab.
  • × on a tab closes the tab only; the file stays in the Explorer.
  • Drag the tab title to reorder; drop on the empty strip on the right to move a tab to the end.
  • .vcd opens as plaintext in Monaco.

Right panel (Surfer · Lint)

  • Surfer · Waveform — A VCD is sent to Surfer only when the simulator produced one. If Surfer is still loading, waves may look empty — try Run again.
  • Lint — After combined lint, read the Markdown report here; click file.v:line to jump the editor.

Bottom panel

  • TERMINAL — Run log (steps, success/failure, Surfer notice).
  • OUTPUT — Short summary for the last Run (e.g. WASM VCD, or no VCD).
  • PROBLEMS — Error text (e.g. from the simulation API).

Status bar

Shows Icarus WASM, Sim API, or No VCD according to the last Run.


Terminal flow after a successful Run

Rough order:

  1. Run start and active workspace name.
  2. If Icarus WASM finishes with a VCD: “VCD generated”, engine: icarus-wasm, etc.
  3. Simulation and VCD generation completed successfully.
  4. A line that the VCD was saved into the workspace under the $dumpfile name (default wave.vcd).
  5. postMessage to Surfer notice.

If WASM finishes but the VCD string is empty, the terminal explains that no dump was detected — check $dumpfile / $dumpvars in the testbench.

If a simulation API is configured, it may run after WASM. If no VCD is produced at all, Surfer is not updated and the terminal states that.


What goes to the simulator vs .vcd in the workspace

  • Run sends only .v and .vh into the simulator (MEMFS).
  • .vcd files you keep in the workspace are not fed as HDL input; they are for reference, editing, and ZIP.
  • After a successful run, the generated VCD is written under the name from $dumpfile in tb.v (falls back to wave.vcd if parsing fails). That file opens in the editor.

How simulation runs (technical summary)

  1. In-browser Icarus WASM — When the bundle is present, ivlpp.wasm (one Web Worker per .v) → ivlvvp runs on your device. Ordinary SGDH hosting does not simulate your HDL on our servers.
  2. Optional remote sim API — If the operator sets an API URL, that host may run iverilog + vvp.
  3. No VCD — If neither path yields a VCD, Surfer is not refreshed with synthetic data.

Details (ivlpp, lib/, -F flags) matter mainly for deployment; for everyday use, the Terminal log is enough.


Coding tips

  • Default top-level module name is tb.
  • For Surfer and workspace VCD, add $dumpfile and $dumpvars to the testbench. New workspace tb.v already includes a wave.vcd example.
  • Share constants across .v files with `include.
  • In the sample, tweak CNT_WIDTH / CLK_HALF_NS and Run to see waves and $display change together.

Privacy and load (short)

  • By default, simulation is meant to run in your browser.
  • Remote sim API is the exception when enabled.
  • See the site privacy policy for full policy text.

FAQ

Q. Waves are empty.
A. Surfer may still be loading — press Run again. If the terminal shows VCD errors or Output says no VCD was sent, fix $dumpfile / $dumpvars and confirm simulation succeeded.

Q. There was no wave.vcd until after Run.
A. Expected. The .vcd appears in the Explorer and editor after a successful simulation.

Q. Is this the same as silicon?
A. No — think learning / quick checks, not tape-out sign-off.

Q. Fully offline?
A. The page needs the browser, CDN assets, and (when used) WASM/Surfer resources; fully offline use is not guaranteed.