-
Notifications
You must be signed in to change notification settings - Fork 647
[core] Deprecate BlackBox in favor of ExtModule #5103
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
Conversation
e783564 to
969a052
Compare
646af55 to
ee05439
Compare
ee05439 to
c24d0f1
Compare
jackkoenig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you did a good mix of keeping some BlackBoxes around (since we should still test the basic features during the deprecation) and updating others.
Yeah, that was the needle I was trying to thread here. I wanted to keep tests around that were specifically testing blackboxes, migrate missing tests to extmodules, and also have everything ready to just mass delete when we are gearing up for Chisel 8. |
Deprecate BlackBox and tell users to switch to ExtModule. BlackBox has a ton of baggage associated with it, due to it mandating, at runtime, a single `val io` call and no additional calls to `IO` while also magically removing the `io_` prefix in the generated FIRRTL. `ExtModule` is far cleaner and works as a user would expect. You can call `IO` as much as you want. No magic prefixing happens. This is slightly unfortunate as one could argue that `BlackBox` is a good name. However, you can also argue (more strongly I would add) that this is an "external module" and it would be better to call it as such. If this is controversial, we can consider a migration back from `ExtModule` to `BlackBox`. Migrate some tests that were only testing blackboxes to be duplicated in the external module tests. This will allow us to just delete this test later. This has three motivations: 1. `BlackBox` has always been janky for the reasons above and `ExtModule` is the saner generator API. 2. It's bad to have two similar, though subtly different ways of doing things. 3. The singular IO that `BlackBox` forces users to go through means that `BlackBox` cannot have domain information attached to it. This essentially means that `BlackBox` will be essentially unusable until domains gain support for being in subfields. It's easier to just deprecate `BlackBox` than to require that domains gain this complicated feature addition just now. Signed-off-by: Schuyler Eldridge <[email protected]>
c24d0f1 to
2718b82
Compare
|
😌 |
|
@oharboe wrote:
I was actually extremely worried about community push back on this one... However, it seems there's general acceptance. I'm similarly . |
Deprecate BlackBox and tell users to switch to ExtModule. BlackBox has a
ton of baggage associated with it, due to it mandating, at runtime, a
single
val iocall and no additional calls toIOwhile also magicallyremoving the
io_prefix in the generated FIRRTL.ExtModuleis farcleaner and works as a user would expect. You can call
IOas much asyou want. No magic prefixing happens.
This is slightly unfortunate as one could argue that
BlackBoxis a goodname. However, you can also argue (more strongly I would add) that this
is an "external module" and it would be better to call it as such. If
this is controversial, we can consider a migration back from
ExtModuleto
BlackBox.Migrate some tests that were only testing blackboxes to be duplicated in
the external module tests. This will allow us to just delete this test
later.
This has three motivations:
BlackBoxhas always been janky for the reasons above andExtModuleis the saner generator API.
It's bad to have two similar, though subtly different ways of doing
things.
The singular IO that
BlackBoxforces users to go through means thatBlackBoxcannot have domain information attached to it. Thisessentially means that
BlackBoxwill be essentially unusable untildomains gain support for being in subfields. It's easier to just
deprecate
BlackBoxthan to require that domains gain this complicatedfeature addition just now.
This is stacked on #5102.
Release Notes
Deprecate BlackBox in favor of ExtModule.