In reply to anvesh dangeti:
$urandom and $random are both functions returning 32-bit integral values that can be used in any integral expression. They cannot use be used in a constraint expression because they are not “pure” functions; they both modify a seed value which is not part of the return value.
$random should not be used with any SystemVerilog code.