The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 3rd, 2024, 9:44pm
Pages: 1
Send Topic Print
$rdist_xxx not supported outside the analog block in AMS Designer (Read 6205 times)
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
$rdist_xxx not supported outside the analog block in AMS Designer
Oct 09th, 2011, 1:52am
 
Hi Guys,

I have verilog-AMS code as below. I want to have random variation for cap15.
Code:
   parameter real c15 = 5.12p from (0:inf);
  real cap15, ....
   initial begin
     cap15 = ($rdist_normal(1,0,1)*0.001*sqrt(2^10)+1)*c15;
   end
 


However it stops in elaboration and reports
Quote:
         Elaborating the design hierarchy:
ncelab: *N,SFEDPL: Deploying new SFE in analog engine.
       Discipline resolution Pass...
       Building instance overlay tables: ................
  cap15 = ($rdist_normal(1,0,1)*0.001*sqrt(2^10)+1)*c15;
                       |
ncelab: *E,EXNOSUP (./dac.vams,38|24): In AMS Designer, the shown system function is not supported outside the analog block.
.... Done
ncverilog: *E,ELBERR: Error during elaboration (status 1), exiting.


Unfortunately, AMS designer does not compatible with Verilog-AMS LRM version 2.3 fully. What can I do?

Thanks
Yawei

Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: $rdist_xxx not supported outside the analog block in AMS Designer
Reply #1 - Oct 10th, 2011, 2:28am
 
Hi Ywguo,

I'd try the initial_step event.

B O E
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: $rdist_xxx not supported outside the analog block in AMS Designer
Reply #2 - Oct 10th, 2011, 9:38am
 
Try $dist_normal(). I think that is the name used in the digital context.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: $rdist_xxx not supported outside the analog block in AMS Designer
Reply #3 - Oct 10th, 2011, 10:37am
 
Hi,
The documentation clearly states that $rdist_xxx is not supported in digital contexts.
Quote:
Try $dist_normal(). I think that is the name used in the digital context.
However, according to the documentation nowadays it generates integers.

B O E
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: $rdist_xxx not supported outside the analog block in AMS Designer
Reply #4 - Nov 4th, 2011, 5:24am
 
Can't you re-scale the integers from $dist_normal (divide by the largest) and get something close to what you want?
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.