The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 10:42am
Pages: 1
Send Topic Print
random number generation (Read 2056 times)
rajdeep
Senior Member
****
Offline



Posts: 220
UK
random number generation
May 07th, 2010, 3:52am
 
Hi All,

I was trying to use a $rdist_uniform to generate random numbers. The code portion is:

Code:
@(cross(V(clk) - fullscale/2.0,-1))
	  begin
		    th = $rdist_uniform(seed, lo, hi);
	  end
	  V(out) <+ th;
 



Seed has been defined as 1. I thought it would generate a random voltage at every negative edge of clk. But it does not do that!! Im running it using Cadence Spectre.
Any help?

Thanks!
Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: random number generation
Reply #1 - May 7th, 2010, 4:28am
 
Hi all,

Sorry! I got the problem now! Huh
It was the seed variable. I made it hard coded!! I didnt realize this variable gets updated
internally!!

Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   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.