-
Notifications
You must be signed in to change notification settings - Fork 615
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
Chisel Standard Library #818
Comments
I've got a small number of things that I can see about re-licensing (highlighted below). Some ideas:
|
I don't know if this fits in the same utilities but there should be a standard library of testing tools, there's a vast number of different techniques for implementing unit tests throughout the chisel suite. It's a bit pedestrian but I also think simple and clearly named (aka longly named) bit and width related functions would reduce errors (what exactly does log2Ceil do) instead things like howManyBitsDoesAUIntHaveToBeToContainThenNumber(x: BigInt) and |
We've encountered several scenarios where relatively veteran Chisel users introduce bugs using bare #819 is an attempt to help deal with this. |
I added some specific suggestions on the rocket-chip issue. I think there are some clear candidates, mostly utility functions for converting between simple types and doing bitwise manipulations, or better muxing. The hard part about more complicated protocols is that pretty much all of them are parameterized. In my experience, the hard part of implementing them in a generator is deciding how that parameterization is going to occur. Who decides on the parameter bindings, and when and how? Chisel doesn't help matters by attempting to force elaboration to occur in a single pass of hierarchically invoked constructors. For us, allowing protocol parameters to be pre-calculated involved escaping Chisel back into pure Scala-land. But once you've done that, what's the argument for such an implementation to be included in Chisel itself? I continue to advocate for Chisel to be the thinest possible layer between Scala and FIRRTL. |
sifive-blocks has implemented a lot of standard utils, is possible to merge it in to chisel? |
So the standard library we currently have (chisel3.utils) is kind of haphazard, incomplete, and in some cases, inelegant and confusing (I'm looking at you, Counter...)
This issue is just to start the conversation on what we want in a standard library. Ideally, these should be highly-reusable parts, and kind of following in Python's philosophy of "batteries included".
Some may already exist elsewhere (most notably, in rocket-chip's various utilities), the goal here would be to make it easy to use those bits without importing the monster that is rocket. A standard library would also carry the expectation of stability.
Standard library thoughts
I'll start off a list here. It's not complete or exhaustive, just a starting point for discussion. Please add more suggestions in the comments!
Async utils
Communications utils
Processing
Physical interfaces
Other
Issue Data
Type of issue: feature request
Impact: API addition (no impact on existing code)
Development Phase: request
Other information
The text was updated successfully, but these errors were encountered: