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
LogicValue is a useful type since it supports arbitrary width in an efficient representation. For testing purposes, it might be desirable to generate a random value on a bus of arbitrary width. The built-in Dart randomization only randomizes up to 2^32, which means users have to invent their own little code snippets to generate random numbers bigger than 32 bits.
Desired solution
A way to generate large random numbers, especially for LogicValue.
One nice option might be to add an extension on Random.
It might be nice to support both valid values or a mix of valid and invalid values.
It might be nice to support random BigInts as well.
Alternatives considered
No response
Additional details
No response
The text was updated successfully, but these errors were encountered:
Motivation
LogicValue
is a useful type since it supports arbitrary width in an efficient representation. For testing purposes, it might be desirable to generate a random value on a bus of arbitrary width. The built-in Dart randomization only randomizes up to 2^32, which means users have to invent their own little code snippets to generate random numbers bigger than 32 bits.Desired solution
A way to generate large random numbers, especially for
LogicValue
.One nice option might be to add an
extension
onRandom
.It might be nice to support both valid values or a mix of valid and invalid values.
It might be nice to support random
BigInt
s as well.Alternatives considered
No response
Additional details
No response
The text was updated successfully, but these errors were encountered: