9 #include "mlir/CAPI/IR.h"
10 #include "mlir/CAPI/Pass.h"
11 #include "mlir/CAPI/Support.h"
12 #include "mlir/CAPI/Utils.h"
13 #include "llvm/Support/CommandLine.h"
14 #include "llvm/Support/raw_ostream.h"
16 using namespace circt;
35 MlirStringRef filename) {
40 CirctFirtoolFirtoolOptions options,
bool disable) {
41 unwrap(options)->setDisableUnknownAnnotations(disable);
45 CirctFirtoolFirtoolOptions options,
bool value) {
46 unwrap(options)->setDisableAnnotationsClassless(value);
50 CirctFirtoolFirtoolOptions options,
bool value) {
51 unwrap(options)->setLowerAnnotationsNoRefTypePorts(value);
55 CirctFirtoolFirtoolOptions options,
bool value) {
56 unwrap(options)->setAllowAddingPortsOnPublic(value);
60 CirctFirtoolFirtoolOptions options,
66 converted = firrtl::PreserveAggregate::PreserveMode::None;
79 unwrap(options)->setPreserveAggregate(converted);
91 converted = firrtl::PreserveValues::PreserveMode::None;
101 unwrap(options)->setPreserveValues(converted);
106 unwrap(options)->setEnableDebugInfo(value);
115 converted = firtool::FirtoolOptions::BuildMode::BuildModeDefault;
118 converted = firtool::FirtoolOptions::BuildMode::BuildModeDebug;
121 converted = firtool::FirtoolOptions::BuildMode::BuildModeRelease;
125 unwrap(options)->setBuildMode(converted);
130 unwrap(options)->setDisableLayerSink(value);
134 CirctFirtoolFirtoolOptions options,
bool value) {
135 unwrap(options)->setDisableOptimization(value);
139 CirctFirtoolFirtoolOptions options,
bool value) {
140 unwrap(options)->setExportChiselInterface(value);
144 CirctFirtoolFirtoolOptions options, MlirStringRef value) {
145 unwrap(options)->setChiselInterfaceOutDirectory(
unwrap(value));
150 unwrap(options)->setVbToBV(value);
155 unwrap(options)->setNoDedup(value);
174 unwrap(options)->setCompanionMode(converted);
178 CirctFirtoolFirtoolOptions options,
bool value) {
179 unwrap(options)->setDisableAggressiveMergeConnections(value);
184 unwrap(options)->setLowerMemories(value);
188 MlirStringRef value) {
194 unwrap(options)->setReplSeqMem(value);
198 MlirStringRef value) {
204 unwrap(options)->setExtractTestCode(value);
208 CirctFirtoolFirtoolOptions options,
bool value) {
209 unwrap(options)->setIgnoreReadEnableMem(value);
231 unwrap(options)->setDisableRandom(converted);
235 CirctFirtoolFirtoolOptions options, MlirStringRef value) {
236 unwrap(options)->setOutputAnnotationFilename(
unwrap(value));
240 CirctFirtoolFirtoolOptions options,
bool value) {
241 unwrap(options)->setEnableAnnotationWarning(value);
246 unwrap(options)->setAddMuxPragmas(value);
251 unwrap(options)->setVerificationFlavor(value);
255 CirctFirtoolFirtoolOptions options,
bool value) {
256 unwrap(options)->setEmitSeparateAlwaysBlocks(value);
260 CirctFirtoolFirtoolOptions options,
bool value) {
261 unwrap(options)->setEtcDisableInstanceExtraction(value);
265 CirctFirtoolFirtoolOptions options,
bool value) {
266 unwrap(options)->setEtcDisableRegisterExtraction(value);
270 CirctFirtoolFirtoolOptions options,
bool value) {
271 unwrap(options)->setEtcDisableModuleInlining(value);
275 CirctFirtoolFirtoolOptions options,
bool value) {
276 unwrap(options)->setAddVivadoRAMAddressConflictSynthesisBugWorkaround(value);
280 MlirStringRef value) {
285 MlirStringRef value) {
290 MlirStringRef value) {
295 MlirStringRef value) {
300 MlirStringRef value) {
305 CirctFirtoolFirtoolOptions options,
bool value) {
306 unwrap(options)->setExportModuleHierarchy(value);
311 unwrap(options)->setStripFirDebugInfo(value);
316 unwrap(options)->setStripDebugInfo(value);
320 CirctFirtoolFirtoolOptions options,
bool value) {
322 unwrap(options)->setDisableCSEinClasses(value);
326 CirctFirtoolFirtoolOptions options,
bool value) {
327 unwrap(options)->setSelectDefaultInstanceChoice(value);
336 CirctFirtoolFirtoolOptions options) {
343 CirctFirtoolFirtoolOptions options,
344 MlirStringRef inputFilename) {
351 CirctFirtoolFirtoolOptions options) {
357 CirctFirtoolFirtoolOptions options) {
363 CirctFirtoolFirtoolOptions options,
364 MlirStringCallback callback,
void *userData) {
366 std::make_unique<mlir::detail::CallbackOstream>(callback, userData);
373 CirctFirtoolFirtoolOptions options,
374 MlirStringRef directory) {
381 CirctFirtoolFirtoolOptions options) {
387 CirctFirtoolFirtoolOptions options,
388 MlirStringCallback callback,
void *userData) {
390 std::make_unique<mlir::detail::CallbackOstream>(callback, userData);
392 *std::move(stream)));
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
@ All
Preserve all aggregate values.
@ OneDimVec
Preserve only 1d vectors of ground type (e.g. UInt<2>[3]).
@ Vec
Preserve only vectors (e.g. UInt<2>[3][3]).
@ Strip
Strip all names. No name on declaration is preserved.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.