CIRCT 22.0.0git
Loading...
Searching...
No Matches
SynthesisPipeline.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the default synthesis pipeline.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_SYNTH_TRANSFORMS_SYNTHESISPIPELINE_H
14#define CIRCT_DIALECT_SYNTH_TRANSFORMS_SYNTHESISPIPELINE_H
15
16#include "mlir/Pass/PassManager.h"
17#include "mlir/Pass/PassOptions.h"
18#include <string>
19#include <vector>
20
21//===----------------------------------------------------------------------===//
22// Pipeline Options
23//===----------------------------------------------------------------------===//
24namespace circt {
25namespace synth {
26
28 // Lower to And-Inverter Graph
30 // Lower to Majority-Inverter Graph
31 MIG
32};
33
34/// Options for the aig lowering pipeline.
36 : public mlir::PassPipelineOptions<CombLoweringPipelineOptions> {
37 PassOptions::Option<bool> disableDatapath{
38 *this, "disable-datapath",
39 llvm::cl::desc("Disable datapath optimization passes"),
40 llvm::cl::init(false)};
41 PassOptions::Option<bool> timingAware{
42 *this, "timing-aware",
43 llvm::cl::desc("Lower operators in a timing-aware fashion"),
44 llvm::cl::init(false)};
45 PassOptions::Option<TargetIR> targetIR{
46 *this, "lowering-target", llvm::cl::desc("Target IR to lower to"),
47 llvm::cl::init(TargetIR::AIG)};
48};
49
50/// Options for the synth optimization pipeline.
52 : public mlir::PassPipelineOptions<SynthOptimizationPipelineOptions> {
53 PassOptions::ListOption<std::string> abcCommands{
54 *this, "abc-commands", llvm::cl::desc("ABC passes to run")};
55
56 PassOptions::Option<std::string> abcPath{
57 *this, "abc-path", llvm::cl::desc("Path to ABC"), llvm::cl::init("abc")};
58
59 PassOptions::Option<bool> ignoreAbcFailures{
60 *this, "ignore-abc-failures",
61 llvm::cl::desc("Continue on ABC failure instead of aborting"),
62 llvm::cl::init(false)};
63
64 PassOptions::Option<bool> disableWordToBits{
65 *this, "disable-word-to-bits",
66 llvm::cl::desc("Disable LowerWordToBits pass"), llvm::cl::init(false)};
67};
68
69//===----------------------------------------------------------------------===//
70// Pipeline Functions
71//===----------------------------------------------------------------------===//
72
73/// Populate the synthesis pipelines.
74void buildCombLoweringPipeline(mlir::OpPassManager &pm,
75 const CombLoweringPipelineOptions &options);
77 mlir::OpPassManager &pm, const SynthOptimizationPipelineOptions &options);
78
79/// Register the synthesis pipelines.
81
82} // namespace synth
83} // namespace circt
84
85#endif // CIRCT_DIALECT_SYNTH_TRANSFORMS_SYNTHESISPIPELINE_H
void buildSynthOptimizationPipeline(mlir::OpPassManager &pm, const SynthOptimizationPipelineOptions &options)
void buildCombLoweringPipeline(mlir::OpPassManager &pm, const CombLoweringPipelineOptions &options)
Populate the synthesis pipelines.
void registerSynthesisPipeline()
Register the synthesis pipelines.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition synth.py:1
Options for the aig lowering pipeline.
PassOptions::Option< TargetIR > targetIR
PassOptions::Option< bool > disableDatapath
Options for the synth optimization pipeline.
PassOptions::ListOption< std::string > abcCommands
PassOptions::Option< std::string > abcPath