The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 6:22am
Pages: 1
Send Topic Print
$random, $arandom and repeatability across simulators (Read 1624 times)
Ari
Junior Member
**
Offline



Posts: 17
Israel
$random, $arandom and repeatability across simulators
Dec 16th, 2009, 2:01pm
 
Hi,

I have two questions regarding $random and $arandom

1. Except for the fact that $arandom supports global/local randomization, and that its seed can be a parameter, are there any further differences between it and $random?
I don't see why both $random and $arandom are supported, as it seems one will always want to use $arandom.

2. Often I build a Verilog-A view which is simulated in several simulators (SPICE, fast SPICE, etc..)
It is not clear from the LRM if results of $random/$arandom should be repeatable across simulators.
i.e., when running in simulator (A), I am getting certain random output (and it is repeatable across different runs)
Once I switch to simulator (B), is there a built-it random function which is guaranteed to give the same results like in simulator (A) ?

Regards,

Ari
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: $random, $arandom and repeatability across simulators
Reply #1 - Dec 18th, 2009, 7:17am
 
1) I believe $random is part of 1364 Verilog and/or 1800 SystemVerilog, and Verilog-AMS needed a new function name to add the additional arguments

2) I doubt the results would be repeatable across simulators, not even two versions of the same simulator; I think the LRM only says that the same simulator, running the same netlist with the same seed, should give the same answer.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.