-
Notifications
You must be signed in to change notification settings - Fork 32
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
Optimize datapath bitwidths #288
Comments
Hi @mattfel1 I'm interested in working on this :) Hope it is possible. My impression on how to proceed is as follows:
I will try these very soon and see what I'm missing here. |
I think maybe a simpler solution is to implement a new transformer that creates new counters with bitwidth-reduced data type. One thing I'm not sure about is whether there is an API that counts the least number of bits required for a given input number. I've created my own helper function, but it would be better if there is something in the codebase that I can reuse. |
Hi. Thanks so much for the help! I think this optimization will have a big impact on a lot of apps. I'm looking forward to seeing how it goes. For some of the banking analysis and chisel templates, we call on functions in utils/math/package.scala, which has things like log2Up that is often used to set a bit width. Are these the kinds of things you are looking for? |
Thanks @mattfel1 ! I will create a PR and list all the things to do there. |
Hi @mattfel1 I've got a trivial question about the type system in Spatial. The parameters in I'm just wondering is it possible to do that, and if so, is there any code example in this repository? I've searched for quite a lot of examples that uses Thanks! |
I just realized I can use |
For Const, we often do things like |
We can do much better on timing and resource utilization if we make the datapath for a controller like this 3 bits instead of the full 32.
The text was updated successfully, but these errors were encountered: