system verilog randomize the function (a)

In system verilog often we would like to do random, but sometimes need to do prior to randomization or random action after some processing. It comes with two convenient functions we do these actions, namely pre_randomize and post_randomize.
1. execution order
at random when these two functions are performed automatically, need not be displayed, it executes the following order:
pre_randomize -> Randomize -> post_randomize
2. Note
these two functions carrying function, can not use the virtual form the override.
3. illustration
in the example provided m_test_data random pre_randomize limit, post_randomize for further processing into an even number of random values, the order of execution as also mentioned above.
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Published 22 original articles · won praise 3 · Views 750

Guess you like

Origin blog.csdn.net/weixin_39662684/article/details/105227933