circt
circt copied to clipboard
[PyCDE] Add new API to import existing HW modules into a System.
This can be used to load HW modules from an MLIR file on disk, and insert them into a fresh System.
Opening as a draft to get the ball rolling. I am going to update the System API a bit, but the change in module.py shouldn't really be changing.
@teqdruid I think this is ready for review. PTAL whenever you get a chance.
Ok, I pushed up a change to show how you can instantiate modules you've imported. Does this usage model make sense? I simplified the System API to reflect the fact that if you want to instantiate the modules, you will already have a list of them around to pass to the System.
I think we'll probably have to refine the usage model over time. You're good to merge this!