The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Tolerances
https://designers-guide.org/forum/YaBB.pl?num=1299682454

Message started by Richardsim on Mar 9th, 2011, 6:54am

Title: Tolerances
Post by Richardsim on Mar 9th, 2011, 6:54am

I'm using Verilog-Ams within Cadence and have been unsuccesful so far in changing the accuracy settings for (angular)displacement, force and moment across/through variables.
I have a schematic connecting verilog-ams circuit blocks. At the start of each verilog-ams file I have included:

`include "constants.vams"
`define POSITION_ABSTOL 1e-9
`define ANGLE_ABSTOL 1e-9
`include "disciplines.vams"

In my simulation window I can however see that the values used in the transient simulation are the default ones:
`define POSITION_ABSTOL 1e-6
`define ANGLE_ABSTOL 1e-6

It therefore appears that this is not the correct way to insert these settings.

Apart from changing these in disciplines.vams, how can I change these values?

Title: Re: Tolerances
Post by sheldon on Mar 9th, 2011, 6:12pm

Richard,

  Are these values defined in the disciplines.vams? It may be that
your values are being overwritten. Just a guess.

                                                           Best Regards,

                                                                Art Schaldenbrand

Title: Re: Tolerances
Post by Marq Kole on Mar 10th, 2011, 6:03am

You might want to check that AMS Designer loads (or does not load) the quantity.spectre file from its installation hierarchy:

$CDS_ROOT/tools/dfII/samples/artist/ahdlLib/quantity.spectre

These are values that Spectre and AMS Designer use. You can override these values using a Spectre quantity statement in your <somename>.scs file that drives the analog kernel in AMS Designer.

I am not sure about the order in which the various definitions are processed, but it seems that your definitions are overriden by some other definitions later in the input processing.

Cheers,
Marq

Title: Re: Tolerances
Post by Geoffrey_Coram on Mar 10th, 2011, 6:40am

I don't know what's in your disciplines.vams, but I see

`ifdef POSITION_ABSTOL
       abstol     = `POSITION_ABSTOL;
`else
       abstol     = 1e-6;
`endif

in one I've got here, which ought to work with the lines that Richardsim posted, since he `defines these quantities before including disciplines.vams.

Title: Re: Tolerances
Post by Marq Kole on Mar 14th, 2011, 2:22am

Hi Geoffrey,

There is some sort of interaction between the natures defined in the disciplines.vams and the quantities defined as part of Spectre. I do not know the detailss, but I do sometimes get warnings about temperature quantity redefined from K to degree C or vice versa. So I do agree that they ought to work but apparently they don't.

Hi Richardsim,

Is this the only Verilog-A module you have in your design or do you have more than this? If that is the case you will probably have to do the `defines in each module that is compiled - even the Verilog-A modules that are part of your PDK if you use that.

Cheers,
Marq

Title: Re: Tolerances
Post by Richardsim on Apr 8th, 2011, 7:22am

Sorry, for this late reply and thank you for all the suggestions.
Disciplines.vams indeed includes the definition posted by Geoffrey_Coram. Rather than adjusting this file (the software is on a server and I'm not the only user), the steps taken are:
* including this statement in each verilog-ams module
* using the define statements after the 'include disciplines.vams statement.

The order of the 'define and 'include statements therefore appears critical.

Now I can see in my simulation window that the correct tolerances are being used.

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