How to randomize bit array to have one bit high at a time

In reply to Pooja Pathak:

$onehot(expression) returns `true (bit 1’b1) if only one bit of the expression is high.
constraint transaction:: req_order {$onehot(req_valid)};
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


See Paper: 1) VF Horizons:PAPER: SVA Alternative for Complex Assertions | Verification Academy
2) http://systemverilog.us/vf/SolvingComplexUsersAssertions.pdf