How to confirm the reason of a bug of '$rand.pload'

In reply to xcxfly:

Hi xcxfly,
I see only two errors. This is the missing argument when calling the constructor of the parent/super class and you have to construct the dynamic array in the constructor.
Using the built-in function with/without brackets () should not be an issue. But this might depend on the simulator. Questa is accepting both. Your constraints are also correct. basheer55 is recommending only a one line constraint. It looks smarter.

But having the constraint inside the transaction is not a good coding style. Then you do not really need a dynamic array. rand byte [46:1500] is more or less the same.

Another question: why you are using the uvm_field macros?