Hi ,
In the below Code , I have tried to assign the particular bit of a variable to another variable.
bit[37:0] addr; // Random 38 bit value from memory chosen.
bit[31:0] temp_a;
bit[5:0] temp_b;
bit[5:0] temp_addr;
// when I have tried to get random value from this range , temp_a = $urandom_range(0,addr[37:0]);
I got error, as randomization is limited to 32bit.
temp_a = $urandom_range(0 , addr[37:0]);
|
ncelab: *W,INTWID: Invalid width (38) on argument, (32) expected.
Secondly,I have tried to assign the 6 bit to another variable and try to chose random value but still i got error.
temp_a = $urandom_range(0,addr[31:0]);
temp_b = addr[37:32];
temp_c = $urandom_range(0,temp_b);
temp_addr = $urandom_range(0, temp_b);
|
ncelab: *W,INTWID: Invalid width (6) on argument, (32) expected.
So what can i do for this Warning.?
Thanks,
Sandeep Gaur