RTL Design / Module 0: Welcome & How to Learn
Lesson 0.2

Tools setup with zero fear (use our simulator)

You already have everything you need. EcrioniX ships a free online Verilog / SystemVerilog simulator with compile, run, and waveform viewing — so this course never asks you to fight license servers on day one.

Your lab bench

ecrionix.org/tools/verilog-simulator/ — write RTL + testbench in the browser, hit Run, inspect waves.

🚀 Open Verilog Simulator →

1

What the simulator gives you

⌨️

Editor

Type modules and testbenches with syntax highlighting — same place you will paste course labs.

▶️

Compile & run

Uses a real Icarus Verilog-style flow under the hood. Syntax errors show up immediately.

📈

Waveforms

See clocks, resets, and data change over time — the skill that separates “code that compiles” from “design that works.”

🆓

No install

Works in a normal browser. Perfect for students and switchers.

2

Step-by-step simulator workflow

Follow this exact sequence every time you open the lab bench. After a few repetitions it becomes automatic.

  1. Open ecrionix.org/tools/verilog-simulator/ in a desktop browser (Chrome/Edge/Firefox).
  2. Clear or select the editor pane — paste or type your DUT (device under test) first, then the testbench below it in the same file, or split across tabs if the tool offers multiple files.
  3. Click Run (or Compile + Run). Watch the console/log panel at the bottom.
  4. If red errors — read the first error line; fix spelling, missing endmodule, or port mismatches. Re-run.
  5. If green — open the waveform viewer. Add clk, rst_n, then your signals of interest.
  6. Zoom to the event you care about (reset release, first transaction). Compare to your mental prediction.

Text mock-up of the simulator layout — your actual UI may label buttons slightly differently.

3

Your first lab (copy and run)

Paste both blocks into the simulator. Run, then open waves. out must track in after reset.

passthrough.v (DUT)
// Lesson 0.2 — simplest DUT: wire passthrough
module passthrough (
  input  wire in,
  output wire out
);
  assign out = in;
endmodule
tb_passthrough.v
`timescale 1ns/1ps

module tb_passthrough;
  reg  in;
  wire out;

  passthrough u_dut (.in(in), .out(out));

  initial begin
    in = 0;
    #10 in = 1;
    #10 in = 0;
    #10 in = 1;
    #20 $finish;
  end

  initial begin
    $dumpfile("waves.vcd");
    $dumpvars(0, tb_passthrough);
  end
endmodule

▶ Run this lab now →

Goal: prove you can edit → run → read a wave. That loop is 80% of learning RTL.

If it fails: read the compile log first (typos, missing endmodule, wrong port names). Do not stare at waves until compile is clean.

4

How to read waveforms (beginner checklist)

  • Find time zero — what are reset and outputs before the first clock edge?
  • Identify clock edges — vertical grid lines; most sequential logic changes on posedge (or negedge).
  • Compare expected vs actual — write down "at T=30 ns, out should be 1" before looking.
  • Use cursor/marker if available — measure setup/hold gaps later; for now, measure delay between input change and output change.

For sequential designs (Modules 4+), outputs often update one clock after the input change. Combo logic (like passthrough) changes in the same timestep.

5

$display vs waveform — when to use which

ToolBest forWeak for
$display / logPacket bytes, FSM state names, pass/fail banners, long sims with few checkpointsTiming relationships, glitches, multi-signal alignment
Waveforms (VCD)Clock/reset/debugging timing, buses, I2C SCL/SDA, "what happened at this edge?"Reading 10 000 lines of hex dumps
💡 Analogy

$display is a diary entry ("state became IDLE at 500 ns"). Waveforms are security camera footage — you see who moved when.

Course default: use both. Dump waves always; add $display for high-level milestones in testbenches (especially Module 10–11 I2C).

6

File organization tips

Even in a browser simulator, treat files like a mini project:

  • One module per file when the tool supports multiple files — fifo.v, fifo_tb.v.
  • Consistent tops — testbench module name tb_<dut>; instance u_dut.
  • Header comment — lesson name, author, date, brief purpose (reviewers love this habit).
  • Local notes folder — save screenshots of waves with filenames like lesson04_reset_bug.png.

Common mistake: editing the DUT but running an old cached version. After big changes, hard-refresh the page or re-paste the full file to be sure.

7

Common simulator mistakes

🪤

No timescale

Add `timescale 1ns/1ps at top of TB so delays and waves make sense.

🪤

Forgot $dumpvars

Sim runs but waves are empty. Always include dump calls in TB initial block.

🪤

Instant exit

$finish before signals toggle — zoom shows flat lines. Extend delays or delay finish.

🪤

X on reset

Uninitialized regs show as X in waves. Drive reset explicitly in first initial block.

8

How we will use it in later modules

  • Module 3–5: small combo/seq blocks with self-checking testbenches
  • Module 6–8: FSMs, FIFOs, pipelines — waves become your debugger
  • Module 10–11: directed tests for I2C start/stop/ACK sequences

When a lesson says “open the simulator,” it means this tool — not a separate paid suite.

9

Optional extras (nice, not required)

  • A notes app or paper notebook for design-review bullets
  • GitHub (later) to host your I2C capstone when you are proud of it
  • Any text editor you like for drafting — but always prove it in the simulator
10

Waveform hygiene (learn this early)

  • Always dump clock + reset near the top of the wave list
  • Group related signals (e.g. scl/sda together later)
  • Zoom to the failing time — do not scroll forever
  • Ask: “At this edge, what should change — and did it?”

🎯 What to remember

  • Your default lab is /tools/verilog-simulator/.
  • Master the loop: edit → run → read waves → fix.
  • Compile errors first, functional waves second.
  • Next: how real teams decide if RTL is “good enough.”
Advertisement