The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> $table_model funny results
https://designers-guide.org/forum/YaBB.pl?num=1273699409

Message started by mowiehowie on May 12th, 2010, 2:23pm

Title: $table_model funny results
Post by mowiehowie on May 12th, 2010, 2:23pm

Hi there,

I've been trying to use the $table_model function to model up a voltage reference with the results of my schematic simulation.

My tables got 3 columns (trimming / temperature / current or voltage )

What happens is when performing a DC varying temperature and trimming, spectre is returning some wrong data.

Like this:

Trimming Temperature Current

#end of table 30

30         1.05E2           8.04E-7
30           1.25E2           8.14E-7

# beggining of table 31
31           -40                -4.21E-8
31           -30                -5.01E-8

When the input is (31, -40) spectre is still returning the output of (30,125), what mess up the entire results. >:(
It ignores the (31,-40) input.

Can anyone help me out ?
I am using the command $table_model(trim variable, temperature variable, data file, "2");

I think the problem is the interpolation control carachter "2" but I don't know what to use instead.

Thank you.  

Title: Re: $table_model funny results
Post by patrick on May 12th, 2010, 4:27pm

I think what you are looking for is discrete lookup in both dimensions?

$table_model(trim variable, temperature variable, data file, "D,D");

i.e. if the value is in the table return it otherwise error out (see LRM 2.3 page 229).

"2" will specify quadratic interpolation - I would generally avoid it, if you do want to interpolate the data use 1 for linear or 3 for cubic splines.

Patrick

Title: Re: $table_model funny results
Post by mowiehowie on May 13th, 2010, 5:31am

Hi Patrick, thank you for your answer.

Well that's exactly what I want, discrete look-up, I just want these values to turn out.

I did what you said, but it's returning an error like this:

$table_model failed: Expected but did not find a value at this dimension during Discrete Interpolation. Correct the problem and try again.

Edit: Just to let you know, it seems the problem was solved out by using "D,1". Anyway, I still don't know why it doesnt accept "D,D".

Title: Re: $table_model funny results
Post by patrick on May 13th, 2010, 10:09am

Perhaps you can debug it by adding a line explicitely giving the lookups:

$strobe($table_model(30, 40, data file, "D,D"));

does that strobe the value you expect? Then perhaps the lookup vars are not exactly what you think they are, then strobe them,....

Title: Re: $table_model funny results
Post by Marq Kole on May 14th, 2010, 1:31am

My take is that "D" is causing an error with the real notation in the table. You could try to verify this by replacing the 1.25E2 with 125 in the table (and all similar notations in the 2nd column, of course).

Marq

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