chipsalliance / chipsalliance/chisel
BlackBox 3.4 -> 3.5 migration is burden
- Dominant language
- Scala
- Stars
- 4.8k
- Forks
- 658
- Avg merge
- 18h 59m
- Merged PRs (30d)
- 14
Description
As we can see, from this PR in XiangShan :
https://github.com/OpenXiangShan/XiangShan/pull/974
Users decided to use compatibility mode `BlackBox` rather than `chisel3.BlackBox` or `chisel3.experimential.ExtModule`, they explains this reason:
1. They don't wanna add `suggestname` to each `BlackBox`, that suffers.
2. When they switch to `ExtModule`, they cannot use `BlackBoxUtils` anymore(`HasBlackBoxResource`, `HasBlackBoxInline`, `HasBlackBoxPath`), since they directly extend from `BlackBox`, rather than `BaseBlackBox`(we cannot directly patch these trait to extend from `BaseBlackBox`, since this introduce a binary breaking change.)
So for users using `Blackbox`, they should use `suggestName` to make name correct. And they are confusing with `ExtModule` and `BlackBox`(seems both of them are `BlackBox`?)
My proposal is:
1. Depreciating `HasBlackBoxResource`, `HasBlackBoxInline`, `HasBlackBoxPath`, migrate `addResource`, `setInline` and `addPath` directly to `BaseBlackBox` to provide those API to users.
2. Deprecate BlackBox, avoid user to use `io` in `BlackBox`.
3. provide a readme to help users migrate to ExtModule.
**Type of issue**: feature request
**Impact**: API modification
**Development Phase**: request
**Other information**
OpenXiangShan/XiangShan#974
**What is the current behavior?**
name plugin confuse users migration, `ExtModule` doesn't provide necessary features.
**What is the expected behavior?**
remove name plugin for `BlackBox` or provide `ExtModule` necessary functions.
**Please tell us about your environment:**
**What is the use case for changing the behavior?**
Help users migrate to Chisel 3.5
Contributor guide
Research direction
Start with the linked XiangShan PR and the BlackBox, BaseBlackBox, ExtModule, and BlackBoxUtils APIs named in the issue. Determine the compatibility and migration implications before proposing changes; done means the BlackBox-to-ExtModule migration path and the required resource APIs are clearly supported or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100