My ARITH 2026 tutorial and demo hopefully convinced a few folks to try building hardware with CIRCT!
Just back from ARITH 2026 in Fulda, Germany, where they introduced a new Tutorial Day!
Together, Louis and I, gave the attendees first a brief introduction to MLIR and CIRCT, then got them working hands-on building, optimizing and verifying ASIC hardware designs.
If you want to have a go at home, all the tutorial materials can be found in our public repo.
To play through the tutorial, you’ll need to use either a docker build or the VScode dev-containers extension.
The goal was to give researchers and industrial engineers a short teaser of the various CIRCT capabilities, people seemed to find it interesting at least, and potentially even useful.
In this blog post I’ll give a short description of CIRCT and describe the features we presented (that way you can decide if you should care or not…).
CIRCT (Circuit IR Compilers and Tools) is an open-source compiler infrastructure project for digital hardware design. It provides reusable compiler dialects, optimizations, and passes built on MLIR. CIRCT enables hardware designers and compiler developers to express, transform, and generate circuit representations for FPGAs, ASICs, and other digital systems.
CIRCT aims to make hardware compiler development more agile, enabling researchers and engineers to experiment with new optimizations and hardware dialects.
The tutorial introduces a range of different tools and optimization passes that can be used to synthesize and verify combinational circuit designs expressed in System Verilog.
First you’ll compile a Verilog design with circt-verilog, producing a snippet of CIRCT IR, that will look a lot like LLVM/MLIR if you’ve ever worked in these software compiler frameworks.
hw.module @fma(in %a: i4, in %b: i4, in %c: i4, out d: i9){
%c0_i5 = hw.constant 0 : i5
%0 = comb.concat %c0_i5, %a : i5, i4
%1 = comb.concat %c0_i5, %b : i5, i4
%2 = comb.mul %0, %1 : i9
%3 = comb.concat %c0_i5, %c : i5, i4
%4 = comb.add %2, %3 : i9
hw.output %4 : i9
}
Given some IR, we then move onto optimization which we automate with passes, that literally pass over the IR and make small incremental changes (usually until some fixed point is reached).
CIRCT has loads of passes built in, and you apply them using circt-opt.
For those wanting to extend CIRCT, a great starting point is trying to extend an existing pass with a new optimization.
Since most ASIC designers, are inherently sceptical (and rightly so), we then describe how one can verify the correctness of the transformation you just applied using circt-lec.
The circt-lec tool takes two IR modules and checks that they are logically equivalent by formulating an SMT problem, which can be externally validated with your favourite SMT solver (Z3, Bitwuzla etc).
Lastly, for those wanting to integrate into an existing EDA flow, we learn how to generate Verilog using firtool.
In the second part of the tutorial, we focused more on my work developing a datapath synthesis engine for CIRCT.
In this part, we introduced circt-synth that leverages redundant number representations to produce realy efficient datapath netlists that can outperform the much more mature Yosys synthesis tool.
To give a final flavour of what can be done when combining MLIR and CIRCT, Louis demoed his high-level synthesis flow from Python code to a full chip layout.
Whilst preparaing for the tutorial, I discovered markdown slides in Obsidian, which is why the README is a little terse!
In addition to the tutorials, ARITH is the main venue for research into computer arithmetic. Below is a list of my favourite papers from the conference (all papers are freely available from the ARITH program):
circt-synth much faster!Not available online but Erin Carson’s keynote was also great and raised lots of interesting questions!
Huge thanks must go to Anastasia Volkova and Theo Drane who put a lot of effort into organizing both the tutorial day and a demo session during the conference. Martin Kumm and the Fulda team also organized a fantastic conference overall, good culture, good food and good beer the whole way through! Louis Ledoux was a great collaborator on the demo and provided a lot of insights into how far you can take HW design with CIRCT.