-
Notifications
You must be signed in to change notification settings - Fork 13
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
Randomization of SystemC types > 64 bit not supported #4
Comments
The main issue here is that |
That sounds very promising! This, the RAII, and the vector randomization issues are the only thing holding me back from proposing the use of CRAVE into all our future SysC testbench infrastructure, so I'm loving the quick responses to the issues I opened here 👍. |
I have added basic support for this in the branch |
Awesome! I've been a bit swamped by other things, but as soon as I find this for this again I'll take a look at it (and put together a PR for issue #5). |
Creating an e.g.
crave::randv<sc_dt::sc_bv<128>>
object works fine. However, whennext()
is called on this object, only bits 0-63 will be set, the remaining ones will all be zero. This is hardcoded in SystemC.hpp'snext
function, where anstd::int64
generator is used.I'm not sure how difficult it would be to fix this. Extending the random number generation to generate enough random bits seems doable. Modifying generated constraints to be correct seems like a more difficult task.
Alternatively, construction of such objects could be prevented with some SFINAE, e.g.:
The text was updated successfully, but these errors were encountered: