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);
129 CirctFirtoolFirtoolOptions options,
bool value) {
130 unwrap(options)->setDisableOptimization(value);
134 CirctFirtoolFirtoolOptions options,
bool value) {
135 unwrap(options)->setExportChiselInterface(value);
139 CirctFirtoolFirtoolOptions options, MlirStringRef value) {
140 unwrap(options)->setChiselInterfaceOutDirectory(
unwrap(value));
145 unwrap(options)->setVbToBV(value);
150 unwrap(options)->setNoDedup(value);
169 unwrap(options)->setCompanionMode(converted);
173 CirctFirtoolFirtoolOptions options,
bool value) {
174 unwrap(options)->setDisableAggressiveMergeConnections(value);
179 unwrap(options)->setEmitOMIR(value);
183 MlirStringRef value) {
189 unwrap(options)->setLowerMemories(value);
193 MlirStringRef value) {
199 unwrap(options)->setReplSeqMem(value);
203 MlirStringRef value) {
209 unwrap(options)->setExtractTestCode(value);
213 CirctFirtoolFirtoolOptions options,
bool value) {
214 unwrap(options)->setIgnoreReadEnableMem(value);
236 unwrap(options)->setDisableRandom(converted);
240 CirctFirtoolFirtoolOptions options, MlirStringRef value) {
241 unwrap(options)->setOutputAnnotationFilename(
unwrap(value));
245 CirctFirtoolFirtoolOptions options,
bool value) {
246 unwrap(options)->setEnableAnnotationWarning(value);
251 unwrap(options)->setAddMuxPragmas(value);
256 unwrap(options)->setVerificationFlavor(value);
260 CirctFirtoolFirtoolOptions options,
bool value) {
261 unwrap(options)->setEmitSeparateAlwaysBlocks(value);
265 CirctFirtoolFirtoolOptions options,
bool value) {
266 unwrap(options)->setEtcDisableInstanceExtraction(value);
270 CirctFirtoolFirtoolOptions options,
bool value) {
271 unwrap(options)->setEtcDisableRegisterExtraction(value);
275 CirctFirtoolFirtoolOptions options,
bool value) {
276 unwrap(options)->setEtcDisableModuleInlining(value);
280 CirctFirtoolFirtoolOptions options,
bool value) {
281 unwrap(options)->setAddVivadoRAMAddressConflictSynthesisBugWorkaround(value);
285 MlirStringRef value) {
290 MlirStringRef value) {
295 MlirStringRef value) {
300 MlirStringRef value) {
305 MlirStringRef value) {
310 CirctFirtoolFirtoolOptions options,
bool value) {
311 unwrap(options)->setExportModuleHierarchy(value);
316 unwrap(options)->setStripFirDebugInfo(value);
321 unwrap(options)->setStripDebugInfo(value);
330 CirctFirtoolFirtoolOptions options) {
337 CirctFirtoolFirtoolOptions options,
338 MlirStringRef inputFilename) {
345 CirctFirtoolFirtoolOptions options) {
351 CirctFirtoolFirtoolOptions options) {
357 CirctFirtoolFirtoolOptions options,
358 MlirStringCallback callback,
void *userData) {
360 std::make_unique<mlir::detail::CallbackOstream>(callback, userData);
367 CirctFirtoolFirtoolOptions options,
368 MlirStringRef directory) {
375 CirctFirtoolFirtoolOptions options) {
381 CirctFirtoolFirtoolOptions options,
382 MlirStringCallback callback,
void *userData) {
384 std::make_unique<mlir::detail::CallbackOstream>(callback, userData);
386 *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.