[Top][All Lists]

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

Re: [Gnucap-devel] Doubt

From: Al Davis
Subject: Re: [Gnucap-devel] Doubt
Date: Thu, 5 May 2005 21:02:29 -0400
User-agent: KMail/1.7.2

On Thursday 28 April 2005 10:15 am, Gopala Krishna wrote:
> I've traced  and watched the code(gnucap-2005-02-20) several
> times but still have many doubts.

That is a development release, so some things may be a little 

> <1> What is the difference between class node_t and nODE ?

nODE is a hack that I am using in a transition.

Going back ...  NODE (nODE in that development snapshot) is a 
node object.  If you make a copy of it, you now have two nodes.

node_t is an iterator.  It should be called NODE::iterator but 
that part of the code was done before the ::iterator convention 
was in common use.  In early gnucap code, a type name in all 
caps like FOOBAR defines an object.  A lower case one ending 
with _t is an iterator.

An iterator is like a pointer, but has special properties that 
make it better than a pointer.  Its representation may be as a 
pointer, but anything goes.  In this case, its representation 
is an array of 3 integers.  I am trying to get it down to one.

A netlist does not contain nodes.  It contains node iterators.  
(node_t)  That way, when the same node name is used again, they 
refer to the same node.

A NODE is the node itself, so it contains all of the 
information, including voltages, logic state, when it was last 
calculated, when it is scheduled to change again, and mode.

gnucap does not use the same algorithms as spice.  It is an 
event-driven mixed-mode simulator, that is as accurate as 
spice, and in some cases much faster.

> <2> What is the difference between class COMPONENT & class

Both are base classes.

A COMPONENT is something that might be in a netlist, like a 
resistor or mosfet.  These are derived, in several levels, from 

A COMMON is attached to a COMPONENT.  It contains information 
about the COMPONENT that does not change during simulation.  
Such information includes the width and length of a mosfet, and 
the link to the model.  State information is not in the common.

COMMONs may be shared.  If two or more COMPONENTS are identical 
except for their connections, they may share a COMMON.  This 
saves memory, and provides the basis for maintaining a cache of 
pre-evaluated models, which is not there yet.

> <3> Can anyone describe the following functions
>         ->attach_common(COMMON_COMPONENT *c,COMMON_COMPONENT
> **to); ->detach_common(COMMON_COMPONENT **from);

These are the functions to attach and detach a COMMON to a 
COMPONENT.  You can think of them as simple pointer 
assignments.  The rest is optimization and garbage collection.

> <4> Where (name of function)exactly is the equation solved ? ???

I don't understand the question.

> <5> How can I output the statics ?

What is a static?

reply via email to

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