The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> spectre difference between ic5033 / ic5141
https://designers-guide.org/forum/YaBB.pl?num=1123917954

Message started by svensl on Aug 13th, 2005, 12:25am

Title: spectre difference between ic5033 / ic5141
Post by svensl on Aug 13th, 2005, 12:25am

I have a verilogA model which I use. The output is strobed and saved in a file for further matlab processing. Recently we switched from ic5033 to ic5141. When I run the exact same model under ic5033 I obtain difference performance results than when simulated under ic5141. The model is a sigma delta modulator. The performance difference between the two is 30dB in SNR!!

When looking at the terminal output the only difference I can see is that ic5141 spectre compiles a model named ahdlcmi and that it gives me a warning saying that absdelay() does not account for phase shift in small-signal analysis.

Could it be absdelay? But when I replace it with a sample and hold, i.e. zi_nd(signal, {1},{1}, period, period), it will not give the warning. However, that SNR performance will be the same.

What is the ahdlcmi module library?

Any ideas?

Thanks

Title: Re: spectre difference between ic5033 / ic5141
Post by byang on Aug 13th, 2005, 3:04pm

My suggestion is to try tightening tolerance first, such as setting errpreset=conservative or even setting reltol explicitly. Make sure the two versions use the same method.

Baolin

Title: Re: spectre difference between ic5033 / ic5141
Post by Andrew Beckett on Aug 14th, 2005, 12:13am

Verilog-A is now (at least partially) compiled to C,and then this is compiled (by gcc) and linked in as a shared library (to increase performance). I doubt whether this would make a difference, but you can check by doing:


Code:
setenv CDS_AHDLCMI_ENABLE NO


if using csh, or:


Code:
CDS_AHDLCMI_ENABLE="NO"
export CDS_AHDLCMI_ENABLE


if using sh/ksh/bash.

Do this before running spectre - or if using ADE, do it before starting DFII.

I doubt however whether this would make a difference. What it does is turn off model compilation.

Most likely it is a tolerance issue, or something like that, as
Baolin suggested. Either that or you've accidentally changed something else!

If you find a difference with the model compilation stuff, report it to customer support. Similarly if you can't find the difference, customer support should be able to help you (but you'll need to give the testcase).

Regards,

Andrew.


Title: Re: spectre difference between ic5033 / ic5141
Post by svensl on Aug 14th, 2005, 1:30am

Thanks for both of your comments. I made sure the methods and setting for both ic5033 and ic5141 were the same and I also tried setting the setenv CDS_AHDLCMI_ENABLE NO. Still the difference between the two simulations is the same. I will see what support has to say and post any results.
Thanks

Title: Re: spectre difference between ic5033 / ic5141
Post by sheldon on Aug 14th, 2005, 9:58pm

Some other questions, how are you windowing the data in post processing?
The output spectrum of an Sigma-Delta is very sensitive if the Rectangular
window is used.  Also how are you strobing the output of the Sigma-
Delta modulator? Are you using the strobe function or are you using
an external zvcvs source? Using the external zvcvs source would eliminate
the need for the sample and hold and also eliminate interpolation error
in the output. Unfortunately it does not reduce the data set size so it might
be good to strobe the output of the zvcvs source.

                                                                     Sheldon

Title: Re: spectre difference between ic5033 / ic5141
Post by svensl on Aug 15th, 2005, 8:20am

I am saving to a file using something like this:

analog begin
@(initial_step) begin
if(record==1) begin
fptr=$fopen("output");
end
period=1/sample_rate;
end

if(record==0) period=1/sample_rate;
@(timer(0,period)) begin
if(record==1) $fstrobe(fptr, "%g", V(in));
end

@(final_step) begin
$fclose(fptr);

But I don't see how this could make a difference between the two spectre versions. BTW, other models that also use the strobing work fine in both versions. I will have to work through each line in my model and see where the differnce between the two versions arises.

Cheers

Title: Re: spectre difference between ic5033 / ic5141
Post by byang on Aug 15th, 2005, 1:36pm

Another thing to check is whether the absdelay has accidentally caused some difference in transient time-stepping. You can ompare the number of accepted time steps in the log files.

Baolin

Title: Re: spectre difference between ic5033 / ic5141
Post by Geoffrey_Coram on Aug 18th, 2005, 10:53am

Svensl -
You said you have the settings the same in both simulators, but Baolin actually suggested something different: tightening the tolerances (the default tolerances may be the same, but may be too loose).  You can change them in one or the other and see if the results in the particular version change appreciably.

For a wild guess, is there a sqrt() in your model?  Try replacing it with pow(x,0.5).

Title: Re: spectre difference between ic5033 / ic5141
Post by Eugene on Aug 18th, 2005, 1:36pm

Is there some known difference between sqrt(x) and pow(x,0.5)? I am fairly sure sqrt(x) is actually
sqrt(x+epsilon) where epsilon is some really small number. You see the effect of epsilon in an AC analysis biased at or near x=0. I don't recall if pow(x,0.5) also has epsilon. Epsilon was added to avoid convergence difficulties near x=0. Is there another difference besides epsilon?

Title: Re: spectre difference between ic5033 / ic5141
Post by Geoffrey_Coram on Aug 22nd, 2005, 5:53am

sqrt(x) is probably calculated correctly; it's just the derivative 1/sqrt(x) that is computed as 1/sqrt(x + epsilon) to avoid division by zero.  This would be noticable in a small-signal analysis, where the derivatives are used.  epsilon is only 1e-9, which is not "small" relative to capacitance values (pF).  The pow() function does not seem to get this epsilon added.

Title: Re: spectre difference between ic5033 / ic5141
Post by Eugene on Aug 22nd, 2005, 7:57am

I ran into the problem while using baseband equivalent models of RF amplifiers. I had used the sqrt function to compute the amplitude of the complex envelope. I tried computing gain with zero input and noticed zero gain.  In my appication, even 1e-9 was large since it was relative to zero. I've since switched to a Cartesian approach that avoids the entire issue. Anyway, thanks for the information Geoffrey.

Title: Re: spectre difference between ic5033 / ic5141
Post by svensl on Aug 24th, 2005, 12:29am


Geoffrey_Coram wrote on Aug 18th, 2005, 10:53am:
Svensl -
You said you have the settings the same in both simulators, but Baolin actually suggested something different: tightening the tolerances (the default tolerances may be the same, but may be too loose).  You can change them in one or the other and see if the results in the particular version change appreciably.

For a wild guess, is there a sqrt() in your model?  Try replacing it with pow(x,0.5).



Thanks, how can I tell Spectre to output all of its simulation parameters it uses during the simulation to a log file or to the terminal window?

Title: Re: spectre difference between ic5033 / ic5141
Post by Geoffrey_Coram on Aug 24th, 2005, 10:29am

My version of spectre prints out a list of important parameter values...

I'd suggest you look through "spectre -help options" and look for all the tolerances.  Cut them by an order of magnitude (or two) and see what happens.

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