Commit Graph

9 Commits

Author SHA1 Message Date
Hideto Ueno 1fb38a58ea
[circt-synth] [Synthesis] Add synthesis pipeline and refactor the lib structure (#8681)
This commit introduces a standardized synthesis pipeline and restructures the codebase:

* Creates a new SynthesisPipeline class to define the default synthesis pipeline. This pipeline serves both circt-synth and is exposed through the C API for Python bindings.
* Added a dedicated Synthesis directory under `lib/` to house synthesis-related code. This architectural change is aimed to promote synthesis capabilities to a first-class component within CIRCT rather than limiting it to the circt-synth tool.
2025-07-10 16:16:11 -07:00
Hideto Ueno c8a189fe09
[circt-synth] Add `-emit-bytecode` option (#8661)
This PR adds `emit-bytecode` option to circt-synth following firtool or circt-dis tool driver.
2025-07-07 19:25:19 -07:00
Hideto Ueno 0f28017243
[AIG] Add LongestPath Analysis boilerplates, data structure and rational doc (#8505)
This commit adds boilerplates, data structure and rational doc for LongestPath analysis in AIG.
See rational doc for the details.
2025-05-22 17:24:26 -07:00
Hideto Ueno a5ad496268
[Transforms][circt-synth] Add HierarchicalRunner pass (#8254)
Add a new pass that allows running passes under hierarchy. This is useful when
we want to run synthesis passes only on real designs.

This implementation is based on MLIR's upstream CompositePass and Inliner utilities.
The pass takes a pipeline string and runs it on modules in the design hierarchy.
It supports configurable options including the pipeline to run under hierarchy,
the name of the top-level module, and whether to include bound instances in
the hierarchy traversal.

The implementation updates circt-synth tool with the required library
dependencies and necessary dialect and pass headers.
2025-02-28 14:43:54 -08:00
Hideto Ueno c67ae28383
[circt-synth] Load dialects that firtool emits (#8257)
This commit makes circt-synth load dialects that firtool could emit and also adds allow-unregistered-dialect option.
2025-02-20 15:26:03 -08:00
Hideto Ueno a9a7a75ac3
[HW][circt-synth] Implement AggregateToComb pass and add to circt-synth pipeline (#8068)
This PR adds a new pass `HWAggregateToComb` that lowers array operations to comb operations. The pass converts:

- `hw.array_get` to a mux tree using comb operations
- `hw.array_create` and `hw.array_concat` to `comb.concat`
- `hw.aggregate_constant` to `comb.concat` of individual constants

The PR also moves two utility functions from CombToAIG to the Comb dialect:
- `extractBits`: Extracts individual bits from a value
- `constructMuxTree`: Builds a multiplexer tree from selectors and leaf nodes

The pass is required to run before CombToAIG to ensure array operations are
properly lowered to AIG. Strictly speaking other than array_get operations can be preserved
but array values prevent optimizations at AIG level.  So for the simplicity, I think it's reasonable
to lower array operations within circt-synth pipeline.
2025-01-19 14:42:26 -08:00
Hideto Ueno c301a0f15c
[AIGToComb] [circt-synth] Add a AIG to Comb conversion pass (#7742)
This adds a conversion pass from AIG dialect to Comb dialect. AndInverterOp can be easily converted into comb.and + comb.xor + hw.constant.

This enables us to utilize core dialects tools for synthesis results without any addition. Primarly use case is running LEC on IR before and after synthesis.
2024-10-29 14:15:41 +09:00
Hideto Ueno 102447e6f8
[circt-synth] Populate pipelines until AIG lowering (#7741)
This commit populates circt-synth pipeline from CombToAIG to LowerWordToBits with optimizations.
2024-10-28 02:02:06 +09:00
Hideto Ueno 7195bf3450 [circt-synth] Add circt-synth driver
This adds a tool to perform synthesis on core dialect IR.
2024-10-26 16:18:17 +09:00