Reply To: RandomPkg: How to set weight for range
Why OSVVM™? › Forums › OSVVM › RandomPkg: How to set weight for range › Reply To: RandomPkg: How to set weight for range
June 28, 2017 at 23:11
#1398
Eilert Backhus
Member
Hi Jim,
I hoped that there’s some solution using the range notation like you showed:
With named association, you can also do the following:
A <= RndA.DistSlv((0=>5, 1 to 14 =>1, 15=>5), A'length) ;
I just didn’t expect it to be so straight simple, since the defined type is self defined.
You mentioned integer_vectors somewhere else. Are these defined internally in a similar way as DistValSlv is? Does this kind of assignment work with integer_vectors too?
Kind regards
Eilert