The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Is this possible using Ocean?
https://designers-guide.org/forum/YaBB.pl?num=1090442212

Message started by Vinit on Jul 21st, 2004, 1:36pm

Title: Is this possible using Ocean?
Post by Vinit on Jul 21st, 2004, 1:36pm

Hi.
 I want to simulate the following.
  I have like 90 voltage sources in my circuit. I want to generate 90 random numbers and assign them to these voltage sources and study the behaviour of my circuit.  I want to repeat this process say 100 times.

Actually, I want to study the behaviour of my circuit due to the mismatch (I am introducing mismatch through voltage sources) in my reference voltage(Generated by a resistor network).

Can I do this using ocean. If yes, any suggestions on how to proceed.

Thanks in advance.

Vinit.

 
 

Title: Re: Is this possible using Ocean?
Post by Andrew Beckett on Jul 27th, 2004, 2:53pm

Well, the most sensible option would be to use monte-carlo, and have a parameter with mismatch variation which controls the voltage source. That way you're getting the simulator to do all the random number generation.

If you want to work the long way around, have 90 voltage sources each with a unique design variable name specifying the voltage (or whatever), and then in OCEAN use the desVar() function to assign each of these variables to a random number using the SKILL functions to produce random numbers. All of this could be done in some simple loops. Read the OCEAN documentation for more hints...

Andrew.

Title: Re: Is this possible using Ocean?
Post by Vinit on Jul 28th, 2004, 7:24am

Thanks Andrew.
   Sure, I can use Monte Carlo for this, but my problem is I want to print the zero crossings that I get after I introduce mismatch and I don' t  know how can I do this. Then, I also want to subtract the ideal and actual zero crossing for each run to calculate something else.

  I am using Spectre simulator(GUI) and have never worked with SKILL and I don't know how to do this.

  Right now I am not even able to print ideal zero crossings to a file, but hopefully I should be able to do it using Ocean as you had helped me before.

   Thanks in advance.

Vinit.

Title: Re: Is this possible using Ocean?
Post by Mighty Mouse on Jul 28th, 2004, 9:09am

The most accurate way to find zero crossings and write them to a file would be to use Verilog-A. Since it is running in the simulator, it can cause Spectre to place time points to accurately resolve zero crossings. You can see and example of how to do this in Listing 25 of The Designer's Guide to Verilog-AMS, which can be found at http://www.designers-guide.com/Books/dg-vams/index.html. For a complete explanation, consider buying the book.

- MM -

Title: Re: Is this possible using Ocean?
Post by Andrew Beckett on Jul 29th, 2004, 10:21pm

Mighty Mouse's suggestion is good - to get best accuracy you'd need to use a Verilog-A model to resolve the crossing point well.

If you can live with an interpolated result, then using the cross() function in the ADE calculator would be sufficient - manipulate the results of this how you want, and then use this as one of the monte-carlo expressions.

It sounds as if your problem was not really the one you stated originally, because you'll presumably have the same problem figuring out the crossing point with 90 separate runs as you would with a monte-carlo run?

Andrew.

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