Highly early stage experimentation in representing arbitrary Yosys RTLIL designs in an MLIR dialect
The ultimate goal is to build a conversion between existing CIRCT core dialects and new dialects to build new workflows for formal verification and beyond
Linux or MacOS is assumed
Recommended approach:
- Install nix with flakes enabled
nix develop(this will compile LLVM)./steps.shninja -C build
Manual approach:
- Build Yosys from source
- Build LLVM from source with MLIR enabled
- Make sure yosys, yosys-config and llvm-config are all in PATH
./steps.shninja -C build
cd examples/cpuyosys -m ../../build/lib/librtlil-emit.so demo.ys
Look at cpu.mlir and the diff between before.il and after.il
This code base is dual-licensed for compatibility with both the Yosys and LLVM ecosystems under Apache 2 with LLVM exceptions as well as ISC. See LICENSE.llvm and LICENSE.isc. Copyright (C) 2025 - 2025 YosysHQ GmbH