Hello all,
Sorry for silly question.
I want to give constraints to my address fields in TEST FILE.
and the address fields are defined in PACKET CLASS.
I done “class packet_cwdt extends packet;”
and in that class, i have defined a new field, which is address and giving constraints to that field.
Now, i have to randomize my whole transaction, with respect to this constrained address fields.
How can i do it ?
can any one please suggest something ?
i have assigned like this.
“e1.gen.p2rand.add=pkt_cwdt.add;”
e1-> env class object
gen-> generator class object
p2rand-> obj of packet class, which is to be randomize.
add-> field of packet class.
pkt_cwdt-> object of constrained packet class.
add-> field of constrained packet class.