[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] Problems with .model

From: Al Davis
Subject: Re: [Help-gnucap] Problems with .model
Date: Mon, 7 Nov 2005 22:38:29 -0500
User-agent: KMail/1.8.2

On Tuesday 01 November 2005 05:34 pm, Florian Steiper wrote:
> I have a simple cirquit that is a part from a Mosfet
> description from IRF. When I try to run this with the current
> (20050808) version of Gnucap I get the error message  "M1.X1:
> can't find model: MM". If I ttry the same with an older
> version (2005.02.20) I get no errors and it simulates fine. I
> pasted the messages from 20050808 and 20050220 below as well
> as the little circuit description that I used to generate
> this error message.
> Is this behavior reproducable for other users too, and how
> can I get around it ?

It is a real bug.

You can get around it by moving the model to outside the subckt.

You can fix it with a simple change:

In the file "", 
function COMPONENT_COMMON::attach_model ....
Change all (2) calls to the function "find_in_my_scope" to 

This bug also exists in the later releases including the most 
recent 2005-10-11 development snapshot.  I estimate it will be 
a week before the next development snapshot will be released.  
There are incomplete changes in other areas that make my 
current version unsuitable for the public.

Here's what I think happened ....

Actually, in older versions, it never really worked as it should 
have.  I knew that.  In previous versions, it didn't honor the 
proper scope.  This seemed to be ok provided that you didn't 
have models in different subckts with the same name.

The change was made to make the scoping Spice compatible.  
Subckts can now be nested, and if it is inside it is not 
visible outside.  Models were supposed to be this way too.  I 
thought they were, and remember doing it and testing it.

I think I screwed up on an RCS check in and accidentally 
reverted to an older version, not the old version that worked 
but with incorrect scoping, but to the broken private version 
that existed just before making the correct one.

There was also an intermediate version that calls 
"find_looking_out" and is simpler.  This one honored proper 
scoping for non-binned models, but if a subckt contained a 
binned model, and an enclosing larger scope (possibly the 
global scope) contained a non-binned model, it would take the 
global non-binned model instead of the local binned model.  I 
don't think any of these got out, but I mention it just in 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]