program urandomtest; logic [7:0] a; int seed; initial $monitor("a=%h", a); initial begin `ifdef RUN1 repeat(20) #1 a = $random(); `elsif RUN2 repeat(20) #1 a = $random(145); `elsif RUN3 seed = 145; repeat(20) #1 a = $random(seed); `elsif RUN4 repeat(20) #1 a = $urandom(); `elsif RUN5 repeat(20) #1 a = $urandom(145); `elsif RUN6 seed = 145; repeat(20) #1 a = $urandom(seed); `elsif RUN7 repeat(20) #1 a = $urandom_range(145); `elsif RUN8 repeat(20) #1 a = $urandom_range(100,145); `elsif RUN9 seed = 145; repeat(20) #1 a = $urandom_range(seed); `endif end endprogram