The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:21am
Pages: 1
Send Topic Print
$table_model funny results (Read 3518 times)
mowiehowie
Junior Member
**
Offline



Posts: 26

$table_model funny results
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. Angry
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.  
Back to top
 
 
View Profile   IP Logged
patrick
Junior Member
**
Offline



Posts: 30
Santa Rosa, CA.
Re: $table_model funny results
Reply #1 - 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
Back to top
 
 
View Profile   IP Logged
mowiehowie
Junior Member
**
Offline



Posts: 26

Re: $table_model funny results
Reply #2 - 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".
Back to top
 
 
View Profile   IP Logged
patrick
Junior Member
**
Offline



Posts: 30
Santa Rosa, CA.
Re: $table_model funny results
Reply #3 - 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,....
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: $table_model funny results
Reply #4 - 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
Back to top
 
 
View Profile   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.