-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support for randcase #42
Comments
Hi @ishitapvips,
This approach would look something like:
In other words, we specify a map with the key being the branch and the value being the branch weight. select returns the selected branch, and we use a regular if/else statement. Another approach would be to use lambda expressions. Lambda expressions are pretty limited in Python, so you would likely need to put the actual implementation of the case branches in separate functions. That might look like this:
So, a couple approaches to doing this in Python with PyVSC. Any thoughts on which approach would work best for your application? Thanks and Best Regards, |
Hi Matthew, As per your convenience, any of the approaches will work for us. But lambda function would be straight forward so can you implement that one? Thanks & Regards, |
Hi Ishita, Lines 22 to 36 in 487620a
Best Regards, |
Hi Matthew, Randselect is working fine for me right now. Thanks & Regards, |
Hi,
System Verilog has a rand case property, that specifies the probability of any case statement to be selected. We tried some workaround but haven't found the solution. So, can we have support for the same in pyvsc or some other way to do it?
Thanks & Regards,
Ishita
The text was updated successfully, but these errors were encountered: