module test;
bit [31:0] addr1;
bit [64:0] addr2;
initial begin
addr1 = $urandom();
addr2 = {$urandom(),$urandom()}; //???
$display("addr1=%0d,addr2=%0d",addr1,addr2);
end
endmodule
Here
Is addr2 work like concatenation or any other method?
Thanks,
In reply to PJ:
Not sure what your question is. $urandom is a function that returns a 32-bit value. When you concatinate two 32-bit values, you get a 64-bit value.
You are better off doing
void'(randomize(addr2));
and not worrying about how big the value is that you are randomizing.