You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated: I want to randomize the contents of a list, applying constraints to each element of the list.
The length of the list is not known ahead of time, so I need to pass that as an argument.
Let's say, as an example, that all list elements are in range(10), and that an element's value should not equal adjacent elements in the list. My attempt at doing this would look as follows
Running the above returns 0 1 2 3 4. However, at further investigation, I've found that the value passed to con_list in the list argument is the domain for the given entry of CCList.list. As such, the constraints don't actually seem to affect the relationship between the values in the list, which I what I want.
What is the proper way to do this with cocotb-coverage?
The text was updated successfully, but these errors were encountered:
KasperHesse
changed the title
What is the proper way to perform (2D) list randomization?
What is the proper way to perform list randomization?
Nov 7, 2023
As stated: I want to randomize the contents of a list, applying constraints to each element of the list.
The length of the list is not known ahead of time, so I need to pass that as an argument.
Let's say, as an example, that all list elements are in
range(10)
, and that an element's value should not equal adjacent elements in the list. My attempt at doing this would look as followsRunning the above returns
0 1 2 3 4
. However, at further investigation, I've found that the value passed tocon_list
in thelist
argument is the domain for the given entry ofCCList.list
. As such, the constraints don't actually seem to affect the relationship between the values in the list, which I what I want.What is the proper way to do this with cocotb-coverage?
The text was updated successfully, but these errors were encountered: