Svelte-based interactive tutorial shell for SystemVerilog, SVA, and UVM.
Pinned versions are centralized in scripts/toolchain.lock.sh:
- Node major:
22 - Emscripten (emsdk):
4.0.21 - CIRCT repo:
https://github.com/thomasnormal/circt.git - CIRCT ref:
8e8ca87dcda1c8abd47103ae7789c8ed261d5de3 - LLVM submodule ref:
972cd847efb20661ea7ee8982dd19730aa040c75
Host tools:
gitnode/npm(Node 22.x)cmake(>= 3.24)ninja(>= 1.10)python3(>= 3.10)rsyncunzip
Check prerequisites:
npm run check:req(frontend/tooling only)npm run check:req:wasm(includes emsdk/emcc verification)
- Activate emsdk
4.0.21(or ensureemcc -vreports4.0.21). - Run the one-shot bootstrap:
npm run bootstrap:repro
Equivalent step-by-step:
npm ciscripts/setup-surfer.shnpm run setup:pyodidenpm run setup:circtnpm run build:circtnpm run local-publish:circtnpm run build
The CIRCT wasm build script enforces conservative resource limits by default:
- Ninja parallelism:
CIRCT_WASM_JOBS=4 - Configure timeout:
CIRCT_WASM_CONFIGURE_TIMEOUT_MIN=30 - Build timeout:
CIRCT_WASM_BUILD_TIMEOUT_MIN=120 - Force clean build dir first:
CIRCT_WASM_CLEAN_BUILD=1 - Build targets override:
CIRCT_WASM_TARGETS="circt-verilog circt-sim circt-bmc" - Optional virtual memory cap:
CIRCT_WASM_MEMORY_LIMIT_KB=<kb>
To also build circt-sim-vpi (required for cocotb lessons):
CIRCT_WASM_TARGETS="circt-verilog circt-sim circt-bmc circt-sim-vpi" npm run build:circt
npm run devnpm run previewnpm run test:e2enpm run setup:pyodidenpm run setup:circtnpm run build:circtnpm run local-publish:circtnpm run bootstrap:repro
In .env (copy .env.example):
VITE_CIRCT_VERILOG_JS_URLVITE_CIRCT_VERILOG_WASM_URLVITE_CIRCT_SIM_JS_URLVITE_CIRCT_SIM_WASM_URLVITE_CIRCT_BMC_JS_URLVITE_CIRCT_BMC_WASM_URLVITE_CIRCT_SIM_VPI_JS_URL(cocotb lessons)VITE_CIRCT_SIM_VPI_WASM_URL(cocotb lessons)VITE_PYODIDE_URL(cocotb lessons, default:/pyodide/pyodide.js)VITE_CIRCT_VERILOG_ARGSVITE_CIRCT_SIM_ARGSVITE_CIRCT_BMC_ARGS
- Runtime assets are lazy-loaded by default (toolchain wasm, Surfer, Pyodide, z3).
- The header includes a "Download offline bundle" button that prefetches and caches runtime assets for offline use.
- For local/offline cocotb, install Pyodide assets once:
npm run setup:pyodide
- Keep runtime URLs same-origin (default
/circt/*,/z3/*,/surfer/*,/pyodide/*) for robust offline behavior.
- Runtime uses a real 2-stage wasm toolchain by default:
circt-veriloglowers SV/SVA/UVM source to MLIRcirct-simexecutes lowered MLIR and emits VCD for the waveform pane
- Tool invocations run in isolated Web Workers to avoid global Emscripten symbol collisions and re-entry issues.
- UI includes a
self-checkaction in the Runtime panel to validate artifact compatibility. - Waves tab appears automatically only when a valid VCD is generated.
.github/workflows/ci.ymlbuilds with pinned toolchain requirements:- install Node 22
- install emsdk 4.0.21
- run
scripts/setup-surfer.sh - run
scripts/setup-pyodide.sh - run
scripts/setup-circt.sh(pinned CIRCT ref) - run
scripts/build-circt-wasm.sh - run
npm run local-publish:circt - run
npm run build
npm run test:e2e -- e2e/waveform.spec.js- Includes:
- non-mock pipeline check (
circt-verilog+circt-sim, waveform generated) - Surfer waveform render check when browser WebGL support is available in the test environment
- non-mock pipeline check (