Hi Martin - thanks; that surprised me. I've tried the code on EDA Playground, and VCS agrees with ModelSim, while Icarus, Riviera (which I think normally follows ModelSim), GPL-CVer, and Veriwell agree with XL. The problem is that the section you've quoted makes sense for $random(n), but it doesn't cover the case where no seed is provided. The LRM appears to have nothing to say about this. '$random' clearly can't map on to 'rtl_dist_uniform(seed, LONG_MIN, LONG_MAX)' as no seed is supplied, and 'rtl_dist_uniform'...
Icarus is not random-stable
Thanks very much - my Icarus regressions all now pass.
Hi Martin - that's great - thanks. It's not quite complete, unfortunately, but I'm not sure how far it's worth going with this. The attached is a slightly modified version of the test, which adds two further $writes. $write #3 has a function call ('foo(0)') as the actual parameter, where the function returns a real, and $write expects '%d'. The real it returns is 2.5, so this should be rounded to 3. $write #4 is the same, except that the the actual parameter is now '$signed(foo(0))'. This is probably...
Reals are incorrectly rounded to ints
Thank you - confirmed fixed.
v10 regression: task inout parameter copy-out fails, Ok in 0.9.7
Sorry about that - only just managed to get back on to this after 7 months! I did a git pull and re-ran the regressions just before your mail, and can confirm that all the failures that I had in July are now gone. So, presumably #1016 and #1017 fixed everything. Great work - thanks very much.
Note that this worked in earlier versions of iverilog.
Program fails until a $write debug statement is added
iverilog creates infinite loop
vvp incorrectly exits on termination of a begin/end