Constraint

In reply to rkg_:

The example you posted doesn’t compile. It’s difficult to give assistance when you don’t provide all of the information concerning what you are currently doing.

It seems like you are trying to randomize a class with a set of constraints. One of the inputs seems to be an output from a design block. Since the class doesn’t connect to signals, you need to provide this when calling randomize.

You can either set the value of prog_out prior to calling randomize(), or make prog_out a random variable and use the ‘with’ statement to constrain it when the randomize() call is made.