Skip to content

v0.3.0: Signal-width-aware bus compiler

Choose a tag to compare

@rafa-rrayes rafa-rrayes released this 06 Mar 01:46
· 34 commits to master since this release

Signal-Width-Aware Bus Compiler

Replaces bit-packed codegen with bus-width C code generation. Gates processing corresponding bits of the same bus are grouped and evaluated as native word-width operations (uint8_t..uint64_t), dramatically reducing generated code size.

Key changes

  • Partition refinement groups gates by structural equivalence instead of primitive type
  • Topological evaluation with SCC feedback handling for sequential circuits
  • Direct codegen from analysis result to C (no intermediate IR layer)
  • Circuit driver uses BusCompiler for the flatten=True path

Results

Circuit tick() lines (old) tick() lines (new)
BitwiseAnd32 ~100 2
Register16 ~500 15
RAM256 N/A compiles in 12s

All 191 unit tests, 31 ALU tests, and 40k AddSub32 tests pass.