Reply To: Patch: Support for random integer_vector

Why OSVVM™? Forums OSVVM Patch: Support for random integer_vector Reply To: Patch: Support for random integer_vector

#736
Jim Lewis
Member

Andy,

Thanks for the feedback.

My first goal is to be consistent with RandInt, RandUnsigned, and RandSigned.  So that gives us a basic order of (Min, Max, Size), (Min, Max, Exclude, Size), (Set, Size), and (Set, Exclude, Size) where Set and exclude are type integer_vector..  So Unique needs to be in there somewhere.  You could argue to put it at the end.  However, I am not sure I would default it to 0 as I like handling the two cases separately – having the Unique parameter requires adding an exclude vector – which you do not want to do unless you have to.  So I decided to put Size at the end as this seems an easier rule to remember (for all the functions that use size, size is at the end).  Well this is almost true, as with RandTimeV, I did put Unit last and defaulted it to 1 ns.

I sent you an advanced copy of the packages so you can review them and see if you agree or not.  They are done and passing regressions. 

Even if they had defaulted parameters, I still have to test all the variations and the error conditions – and this seems to take as much or more time than writing the functions themselves. 

Jim