circt icon indicating copy to clipboard operation
circt copied to clipboard

[ImportVerilog][CAPI] Add interfaces to allow external use

Open SpriteOvO opened this issue 6 months ago • 2 comments

This PR adds C-API for ImportVerilog stuff to allow external use.

SpriteOvO avatar Jun 13 '25 20:06 SpriteOvO

@uenoku I do agree that the maintainability of such options structs is poor.

@sequencer If we change the options structs to something like a CLI arguments string, would that be acceptable to you guys?

SpriteOvO avatar Jun 14 '25 16:06 SpriteOvO

If we change the options structs to something like a CLI arguments string, would that be acceptable to you guys?

I think we only need to expose these options to C-API to allow external program to use import Verilog as library.

For C-API about MlirImportVerilogOptions, it can be safe and looks more like what https://github.com/llvm/circt/blob/firtool-1.122.0/include/circt-c/Firtool/Firtool.h does.

sequencer avatar Jun 15 '25 03:06 sequencer