|
46 | 46 | #include "circt/Conversion/SCFToCalyx.h"
|
47 | 47 | #include "circt/Dialect/Calyx/CalyxDialect.h"
|
48 | 48 | #include "circt/Dialect/Calyx/CalyxPasses.h"
|
| 49 | +#include "circt/Dialect/DC/DCPasses.h" |
49 | 50 | #include "circt/Dialect/ESI/ESIDialect.h"
|
50 | 51 | #include "circt/Dialect/ESI/ESIPasses.h"
|
51 | 52 | #include "circt/Dialect/SV/SVDialect.h"
|
@@ -218,6 +219,9 @@ static cl::opt<bool> withESI("with-esi",
|
218 | 219 | cl::desc("Create ESI compatible modules"),
|
219 | 220 | cl::init(false), cl::cat(mainCategory));
|
220 | 221 |
|
| 222 | +static cl::opt<bool> withDC("dc", cl::desc("Use the DC flow"), cl::init(false), |
| 223 | + cl::cat(mainCategory)); |
| 224 | + |
221 | 225 | static LoweringOptionsOption loweringOptions(mainCategory);
|
222 | 226 |
|
223 | 227 | // --------------------------------------------------------------------------
|
@@ -332,7 +336,14 @@ static LogicalResult doHLSFlowDynamic(
|
332 | 336 |
|
333 | 337 | addIRLevel(IRLevel::RTL, [&]() {
|
334 | 338 | pm.nest<handshake::FuncOp>().addPass(createSimpleCanonicalizerPass());
|
335 |
| - pm.addPass(circt::createHandshakeToHWPass()); |
| 339 | + if (withDC) { |
| 340 | + pm.addPass(circt::createHandshakeToDCPass()); |
| 341 | + pm.addPass(circt::dc::createDCMaterializeForksSinksPass()); |
| 342 | + pm.addPass(createSimpleCanonicalizerPass()); |
| 343 | + pm.addPass(circt::createDCToHWPass()); |
| 344 | + } else { |
| 345 | + pm.addPass(circt::createHandshakeToHWPass()); |
| 346 | + } |
336 | 347 | pm.addPass(createSimpleCanonicalizerPass());
|
337 | 348 | loadESILoweringPipeline(pm);
|
338 | 349 | });
|
|
0 commit comments