Skip to content
code0.HDL

Build circuits in code. Understand them through waveforms.

Learn hardware with BSV, Verilog, and Chisel. Choose a language, build circuits, run them, and test your designs.

behaviour preview

Choose a language to see the same counter written in it.

The three runs print the same sequence. That does not make their internal structure or language semantics the same.

behaviour preview

Shared behaviour: a 2-bit counter, reset to 0, adds 1 on every clock edge and wraps 0, 1, 2, 3, 0. The new value is observed after the edge that wrote it.

cycle012345
count012301

Three courses, one site

Start with any of them. Each course runs from its first module to applied work in one language, with the same loop: read a chapter, run its example, then solve a problem that checks the idea.

BSV

Design concurrent hardware with rules

Design concurrent behaviour with rules and interfaces.

What you build
  • Counters and state machines whose updates are atomic rules
  • Modules that expose methods through interfaces and compose into a design
  • FIFO pipelines whose readiness the compiler schedules for you
Before you start
Registers, clock edges, and what a combinational circuit is. No other HDL is required.
  1. A module and its interface
  2. Bool, Bit and pure functions
  3. Types, widths and explicit conversion
  4. Selection, case, and the don't-care value

Verilog

Learn RTL through signals and clocks

Design combinational and sequential circuits with signals and RTL.

What you build
  • Combinational blocks from continuous assignments and vectors
  • Clocked registers and state machines with reset
  • Testbenches that drive inputs, print results, and dump a waveform
Before you start
Binary numbers and the idea of a clock. No other HDL is required.
  1. A module, its ports, and assign
  2. Vectors, bit selects and operators
  3. Literals, signed values and expression width
  4. Nets, variables and the combinational always

Chisel

From circuits to hardware generators

Design parameterised circuits with Scala-based generators.

What you build
  • Modules whose ports and logic are built from Chisel hardware types
  • Registers, bundles, and vectors wired into sequential designs
  • Generators that produce a family of circuits from one parameterised class
Before you start
Registers and clock edges. Scala is introduced where each chapter needs it. No other HDL is required.
  1. A Module, its IO, and the := connection
  2. Bool, UInt, and the operators
  3. Widths, SInt, and arithmetic
  4. Mux, when, Wire, and a default for every path