Repository navigation
v0.3.0: Signal-width-aware bus compiler
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
BusCompilerfor theflatten=Truepath
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.