-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bind2] Add support for compile guard around bind #1315
Conversation
Codecov ReportPatch coverage:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1315 +/- ##
==========================================
+ Coverage 85.95% 86.00% +0.04%
==========================================
Files 169 170 +1
Lines 17727 17810 +83
==========================================
+ Hits 15237 15317 +80
- Misses 2490 2493 +3
☔ View full report in Codecov by Sentry. |
Attaches active compile guard info's to bound instance metadata.
* Emit sv.IfDefOp around sv.BindOp * Attach hw.OutputFileAttr for entire sub-tree of op's surrounding sv.BindOp (all enclosing sv.IfDefOp, and including sv.BindOp). * Add generic MlirOpPass infrastructure
bbbf8ff
to
93061b6
Compare
Adds support for emitting `ifdef` around `bind` calls. The syntax for this is: ```python with m.compile_guard(...): m.bind2(...) ``` which emits MLIR like: ```MLIR sv.ifdef ... { sv.bind ... } ``` ```Verilog `ifdef ... bind ... `endif ```
Adds support for emitting
ifdef
aroundbind
calls. The syntax for this is:which emits MLIR like:
One important thing to note is that in the case of split verilog, the output file attribute annotation has to be applied up the compile guard stack, i.e. the
sv.ifdef
surrounding thesv.bind
also needs thehw.OutputFileAttr
attached.