The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 19th, 2024, 4:45am
Pages: 1
Send Topic Print
Verilog-A Statistical Variations (Read 14612 times)
analog_power
New Member
*
Offline



Posts: 5

Verilog-A Statistical Variations
Dec 12th, 2011, 1:22am
 
Hi,

I designed a model for hall element and everything works fine.
Now, I am on that state, where I want to put statistical parameters in it. I want that the parameters change with every simulation according to normal distribution. I want to use Monte Carlo simulation.

If I add "$rdist_normal($random,0,1)" to a resistor value, the value changes several times in a DC-sweep analysis, because the variable change at every look at this line.

When add this line in the initial block, then the simulator gets stacked.

How can I do that right?
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Verilog-A Statistical Variations
Reply #1 - Dec 12th, 2011, 5:55am
 
Hi analog_power,
are you sure that your simulator allows $rdist_normal in a digital context (initial block)?

- B O E
PS: Which simulator do you use? What does "gets stacked" mean exactly?
Back to top
 
 
View Profile   IP Logged
analog_power
New Member
*
Offline



Posts: 5

Re: Verilog-A Statistical Variations
Reply #2 - Dec 12th, 2011, 6:42am
 
I am not sure about that. Obviously it isn't allowed.
I am using spectre.
I am sorry, I tried to say that the simulation got stucked. I mean that there is no change in the progress bar.
Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Verilog-A Statistical Variations
Reply #3 - Dec 12th, 2011, 6:54am
 
Are you talking about the digital initial block or the analog @(initial_step)? I don't see a reason why the latter shouldn't work and would consider it a bug if it doesn't.
Back to top
 
 
View Profile WWW   IP Logged
Forum Administrator
YaBB Administrator
*****
Offline



Posts: 145

Re: Verilog-A Statistical Variations
Reply #4 - Dec 12th, 2011, 10:20am
 
Try changing the transient method option to gear2only.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
analog_power
New Member
*
Offline



Posts: 5

Re: Verilog-A Statistical Variations
Reply #5 - Dec 13th, 2011, 12:46am
 
I am talking about the @(initial_step block).
But is that the right way for making the model work with Monte-Carlo?

Ken,
what do you mean with gear2only ?
Back to top
 
 
View Profile   IP Logged
analog_power
New Member
*
Offline



Posts: 5

Re: Verilog-A Statistical Variations
Reply #6 - Dec 14th, 2011, 5:44am
 
Now I know, what you mean with gear2only and it didn't change anything.
Back to top
 
 
View Profile   IP Logged
analog_power
New Member
*
Offline



Posts: 5

Re: Verilog-A Statistical Variations
Reply #7 - Dec 14th, 2011, 7:30am
 
I still couldn't solve my problem.
Just an update:
I want to implement statistical Variations in my model. Independent of simulation mode. There should be different results even when I run manually simulations, without Monte Carlo or similar.

Has anybody an idea?
Back to top
 
 
View Profile   IP Logged
Forum Administrator
YaBB Administrator
*****
Offline



Posts: 145

Re: Verilog-A Statistical Variations
Reply #8 - Dec 14th, 2011, 12:10pm
 
Saying the simulator is stuck does not really provide enough information. And given that the simple things did not work, it is time to try a little harder to figure out what is happening. The first question is: is the simulator really stuck, or is it just running very slowly. You might be able to figure this out by looking at the waveforms over time and see if they continue to grow. You might also have the waveform tool show you the time points and then explore what changed when the time steps dramatically shrunk. That might lead you to the cause of the problem. Alternatively, you can put the following line in a Verilog-A model:
    $strobe("%0.15e", $abstime);
That will print the time to 15 digits, which should allow you to see whether time is progressing.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: Verilog-A Statistical Variations
Reply #9 - Jan 18th, 2012, 12:49am
 
Just some musings, but if you use $rdist_normal($random,0,1) it appears to be a bit overly random. Especially the DC might have an issue. Wouldn't it be better to use

Code:
parameter integer seed = 123456;
integer iseed;
analog initial iseed = seed;
analog begin
  value = $rdist_normal(iseed, 0, 1);
  ...
end 


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



Posts: 615

Re: Verilog-A Statistical Variations
Reply #10 - Feb 14th, 2012, 1:07am
 
Marq Kole wrote on Jan 18th, 2012, 12:49am:
Just some musings, but if you use $rdist_normal($random,0,1) it appears to be a bit overly random. Especially the DC might have an issue. Wouldn't it be better to use

Code:
parameter integer seed = 123456;
integer iseed;
analog initial iseed = seed;
analog begin
  value = $rdist_normal(iseed, 0, 1);
  ...
end 



Marq,
unfortunately, the simulator performs the analog initial block for every MC run (at least mine does), so you get identical results for all runs.
- B O E
Back to top
 
 
View Profile   IP Logged
jerome_ams
Community Member
***
Offline



Posts: 36

Re: Verilog-A Statistical Variations
Reply #11 - Jul 12th, 2012, 2:23am
 
would VHDL be an option in your case? Some activities have been driven in Europe to develop an open source Statisitcal Package for both VHDL(AMS) and SystemC(AMS)
Cheers
J
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Verilog-A Statistical Variations
Reply #12 - Jul 18th, 2012, 9:59am
 
I think Jerome_ams's post here:
http://www.designers-guide.org/Forum/YaBB.pl?num=1341703776

may be more appropriate to what analog_power wants to do.

Let the simulator set the random parameter values by using statistics blocks, and assign those values on the instance line of the Verilog-A model -- just like you would do for MC of a Spice built-in primitive.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Hadi
New Member
*
Offline



Posts: 1

Re: Verilog-A Statistical Variations
Reply #13 - Aug 7th, 2012, 4:07pm
 
Hi everyone,

I simulated Hall element in COMSOL, but now, i want to design Hall element in Verilog-A.
I would appreciate if you could help me to design Hall element in Verilog-A...

Best,
Hadi
Back to top
 
 
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.