gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] Hierarchical name ordering


From: al davis
Subject: Re: [Gnucap-devel] Hierarchical name ordering
Date: Sat, 19 Jan 2008 13:48:13 -0500
User-agent: KMail/1.9.7

On Saturday 19 January 2008, a r wrote:
> Although consistency with other simulators is "nice to have"
> I don't think it makes much difference for a gnucap user.
> It's just a convention after all.

That is why it has been this way for years.
>
> If it's simple to add and maintain, I would prefer an option
> (can be hidden). But then, with so many other changes, I
> wouldn't bother with backward compatibility much.

It really is simple.  There is no technical reason for it to be 
one way or the other.  (aside from the old reason of matching 
the first letter).  It is easy to make it take it either way.

> Personally, I would prefer some blocking issues (like probing
> voltages of internal nets) to be resolved as well.

That is more difficult than it seems.  The problem is that the 
name list takes significant space, if it is copied.  So, 
subcircuits are instantiated with a "shallow copy" which 
strategically makes unique copies only where it is absolutely 
needed.  It will be done eventually, but my to-do list is huge.

For now, you can get the info you need by probing components.  
Mostly, I prefer probing components anyway.  If you really need 
a node voltage, put a nothing component from that node to 
ground, and probe its voltage.  The best choice is 
an "admittance" element, with a value of 0.  You can name it 
the same as the node.

>
> BTW, can you post a sample code that:
> a) replaces a nested cell with a different one,
> b) replaces an instance parameter of such a cell.
>
> >From the documentation, it seems like this is a supported
> > feature of
>
> Gnucap but I could have never figured out how to do it in
> practice.

Can you explain?

a) I don't think it works.  Replace a component inside a 
particular instantiation of a subckt with something else?

b) I think you can accomplish what you want with named 
parameters.  Remember .. in gnucap, a "param" is a variable.  
It can be changed at any time.  In some other simulators it is 
a text pre-processor substitution.

.subckt foo (a b)
.param bob=10k
R1 (a b) bob
.ends

X1 (1 2) foo bob=2k
X2 (2 3) foo bob=bill
X3 (3 0) foo

.param bill=300
.op
.param bill=2k
.op





reply via email to

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