-
Notifications
You must be signed in to change notification settings - Fork 28
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
Should the File Preamble be enhanced to include the ABI version? #132
Comments
This is an insufficiently specified area. 😅 Yes, the ABI version needs to also be specified. The ABI also needs to be specified on external modules as that represents something which can be implemented by another circuit:
For FIRRTL spec version 4.0+ (which will introduce public modules: #130), there is a question of if the ABI should be specified per-public module or per-circuit. This is the only reason why I would hold back on putting this in the FIRRTL version preamble if we wanted to go with the per-module approach:
The per module approach aligns with existing language on "module conventions" (See: https://github.com/chipsalliance/firrtl-spec/blob/main/spec.md#module-conventions). However, this was written before the ABI v1/v2 part and is largely duplicative of what the ABI lays out more exactly. WDYT? |
Ah, extmodule having to possibly specify a different ABI makes a lot of sense, I guess if we wanted to avoid repetitions, we could specify it at the circuit level and override it at the module level:
But having to specify it for every public module seems fine too. |
Not sure where to ask this, but is ABIv2 expected to match the behavior of |
Yes. Though, |
It's reasonable to specify ABI for any module with a circuit-level default. I had imagined it being a compile time option, but it makes sense to be per-module. |
https://github.com/chipsalliance/firrtl-spec/blob/main/abi.md defines both ABIv1 and ABIv2, however there does not seem to be a way to specify which version is expected for a given .fir file. It seems to me that this information should be part of the File Preamble, e.g.:
Otherwise there is no way to know how to actually interop with a .fir file without external information.
The text was updated successfully, but these errors were encountered: