The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> AMS Simulators >> $rdist_xxx not supported outside the analog block in AMS Designer
https://designers-guide.org/forum/YaBB.pl?num=1318150379

Message started by ywguo on Oct 9th, 2011, 1:52am

Title: $rdist_xxx not supported outside the analog block in AMS Designer
Post by ywguo on Oct 9th, 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


Title: Re: $rdist_xxx not supported outside the analog block in AMS Designer
Post by boe on Oct 10th, 2011, 2:28am

Hi Ywguo,

I'd try the initial_step event.

B O E

Title: Re: $rdist_xxx not supported outside the analog block in AMS Designer
Post by Ken Kundert on Oct 10th, 2011, 9:38am

Try $dist_normal(). I think that is the name used in the digital context.

-Ken

Title: Re: $rdist_xxx not supported outside the analog block in AMS Designer
Post by boe on 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

Title: Re: $rdist_xxx not supported outside the analog block in AMS Designer
Post by Geoffrey_Coram on 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?

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.