The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 1:28pm
Pages: 1
Send Topic Print
accuracy problem with using ocean variables (Read 6716 times)
alirezad
Junior Member
**
Offline



Posts: 11

accuracy problem with using ocean variables
Feb 05th, 2010, 9:41am
 
Hi,

I am looking at the PSD of an ideal sinusoid.  The frequency of the sinusoid is a function of several other variables.  The problem is depending on how I pass around these variables I get different results.

Here is an example:
Suppose T = 90 ns and cycles = 835.  If I do:

desVar("T" T)
desVar("fs" "1/T")
desVar("cycles" cycles)
desVar("N" 32)
desVar("fin" "fs*cycles/N"),

I get a nice FFT plot with +250 dB dynamic range.  However if I do:

fs = 1/T
fin = fs*cycles/N     ; here fin is an ocean variable
desVar("fin" fin),     ; and now I pass its value to a design variable

then the FFT plot only has about 70 dB dynamic range.
To make sure that there is no truncation error in calculating fin in the second case I do:
printf("%1.20e" fin),
and the result is accurate up to 16 digits after the floating point which should be enough.

I appreciate any comments.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: accuracy problem with using ocean variables
Reply #1 - Feb 5th, 2010, 9:56am
 
The followings are general notes.

- Always describe vendor's name which you use as tool or simulator.
- There are many simulators which have analyses called as PSS, PAC and Pnoise.
- Describe in detail with using correct terminologies.
- Warnigns are different from Errors.
- ADS is not name of simulator.
- There is no tool which name is Cadence.
- Don't use Direct Plot of Cadence ADE blindly without knowing definition.
- All gains in Direct Plot of Cadence ADE are "right", "true" and "practical" voltage gain.
- Don't mix up Simulation with Post Processing. They are completely different phase.
- MATLAB are different from Simulink.
- Learn measurements using actual instruments. Not "EDA Tool Play

I assume that you are generating netlist for Cadence Spectre by Cadence OCEAN.

Compare generated netlist.
If so, you can notice difference.

This is not issue of OCEAN at all.
Your issue is no more than simple difference of generated netlist.

You can also generate netlist other than Cadence Spectre by Cadence OCEAN.
Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
alirezad
Junior Member
**
Offline



Posts: 11

Re: accuracy problem with using ocean variables
Reply #2 - Feb 5th, 2010, 10:25am
 
Thanks for your comments.

Yes.  I am using Cadence OCEAN to run a simulation with Cadence Spectre.  In both simulations that I mentioned I am referring to the same netlist and same design, and I am using the exact same analysis with same accuracy settings.  The ONLY difference is how I assign the parameters in my design.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: accuracy problem with using ocean variables
Reply #3 - Feb 5th, 2010, 10:29am
 
alirezad wrote on Feb 5th, 2010, 10:25am:
In both simulations that I mentioned I am referring to the same netlist and same design.
No. You can't understand netlist for simulator at all.
Netlists are different.

Do you understand how simulation is launched by OCEAN ?

For former case, statements of parameters in netlist are like following.
   parameters T=90n
   parameters fs=1/T
   parameters cycles=835
   parameters N=32
   parameters fin=fs*cycles/N

For latter case, statements of parameters in netlist are like following.
   parameters fin=2.8993056e8


Try to replace desVar( "fin" fin ) with desVar( "fin" sprintf(nil "%1.20e" fin) ) in latter case.
Back to top
 
« Last Edit: Feb 6th, 2010, 1:04am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
alirezad
Junior Member
**
Offline



Posts: 11

Re: accuracy problem with using ocean variables
Reply #4 - Feb 5th, 2010, 12:12pm
 
Thanks a lot for your help;  I understand now.

It is confusing because there is a "netlist" file which is the design netlist and there is an "input.scs" file which is the simulator netlist.

So as I understand there is a truncation problem if I pass OCEAN variables via desVar and only 7 digits will be passed.  Using sprintf as you suggested solves the problem but is there any setting that tells OCEAN to pass more than the default 7 digits?

I looked at oceanref and it seems that this truncation problem is not addressed there.  I think they should have made it clear how the values are passed somewhere in the documentation.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: accuracy problem with using ocean variables
Reply #5 - Feb 6th, 2010, 1:11am
 
alirezad wrote on Feb 5th, 2010, 12:12pm:
It is confusing because there is a "netlist" file which is the design netlist and there is an "input.scs" file which is the simulator netlist.
It seems you have used Cadence ADE blindly.

We don't have such confusion because we understand how simulation is launched in Cadence ADE.

It is very common that Netlist for simulator is generated because we can't run simulation without it.
The followings are netlists for simulator under Cadence ADE.

spectre : input.scs
hspiceD : input.ckt
ADSsim(RFDE) : input.ckt
GoldenGate : "Analysis_Name".gg, (e.g. DC.gg, AC.gg. SP.gg, TR.gg, CR.gg, SSNA.gg, ET.gg, PLL.gg, etc.)
Back to top
 
« Last Edit: Feb 6th, 2010, 3:20am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: accuracy problem with using ocean variables
Reply #6 - Feb 6th, 2010, 6:33am
 
Pancho,

Please to be a little more gentle with those less experienced with you. What may seem obvious to you is not necessarily obvious to others - otherwise people wouldn't ask some of these questions in the first place. The question was well formed (it didn't necessarily matter which simulator was being used), and is apparently down to the precision which the design variables are being written into the netlist.

I can't quite remember (I'll have to look it up when I'm back in the office) how the precision of the design variables in the input.scs is controlled, but it probably makes sense to have the expression passed to the simulator rather than a fixed number - that way the simulator can resolve it with double precision accuracy.

Regards,

Andrew.
Back to top
 
 
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.