Features Components Architecture Code Showcase Docs Blog GitHub
Open Source Hardware Design

Design Hardware
in Ruby.

用 Ruby 设计硬件

A powerful Ruby DSL for digital circuit design with fast Rust-powered simulation, synthesizable Verilog export, and gate-level synthesis.

56 6502 Instructions
RV32I RISC-V Support
WASM Browser Simulator

Everything you need to
design digital hardware.

数字硬件设计所需的一切

From high-level Ruby to synthesizable gates, CIRCT provides a complete hardware design pipeline.

Four powerful
component abstractions.

四种强大的组件抽象

CIRCT IR at the
center of everything.

CIRCT IR 是一切的核心

RHDL lowers to CIRCT IR. Verilog and VHDL import to it. Multiple execution backends fan out from this central representation.

RHDL

Ruby HDL lowering

Verilog / VHDL

Import existing HDL

CIRCT IR

Central representation

Verilator

Normalized Verilog

Arcilator

Arc simulation

Rust Compiler

Native execution

Write hardware like
you write software.

像写软件一样写硬件

Familiar Ruby syntax with powerful hardware abstractions. No arcane HDL knowledge required.

simple_alu.rb
class SimpleALU < RHDL::Sim::Component
  input  :a, width: 8
  input  :b, width: 8
  input  :op, width: 2
  output :result, width: 8

  behavior do
    result <= case_select(op, {
      0 => a + b,
      1 => a - b,
      2 => a & b,
      3 => a | b
    }, default: 0)
  end
end
simple_alu.v Generated Verilog
module SimpleALU (
  input  [7:0] a,
  input  [7:0] b,
  input  [1:0] op,
  output reg [7:0] result
);

always @(*) begin
  case (op)
    2'b00: result = a + b;
    2'b01: result = a - b;
    2'b10: result = a & b;
    2'b11: result = a | b;
    default: result = 8'b0;
  endcase
end

endmodule

Real hardware,
designed in Ruby.

真实硬件,用 Ruby 设计

Complete CPU and system implementations that prove CIRCT's capabilities at scale.

Ready to design
hardware in Ruby?

准备好用 Ruby 设计硬件了吗?

Start building digital circuits today with CIRCT's powerful Ruby DSL.