gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] [Help-gnucap] Multiple instances having the same inst


From: Felix Salfelder
Subject: Re: [Gnucap-devel] [Help-gnucap] Multiple instances having the same instance name
Date: Tue, 16 Jun 2015 09:06:15 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 15, 2015 at 02:49:45PM -0400, al davis wrote:
> Just curious .. what do others do?

bash$ cat | (spectre +spice /dev/stdin |& grep -i error) <<EOF
V1 0 1 1
R1 0 1 1
R1 0 1 1
.dc
EOF
Error found by spectre during circuit read-in.
    ERROR (SFE-401): Duplicate instantiation of `R1' in `top-level'.
spectre terminated prematurely due to fatal error.

> I am not sure from a user perspective which way is preferred.  
> My gut feel is that it doesn't matter.

well, it does not seem to matter much, unless the device is referenced later
on. print, dc sweep or current branch reference come to mind. in these cases,
a warning seems appropriate. something like

.print i(R1)
WARNING: there's more than one R1.

should be unconditional in interactive mode. ERROR in batch mode... YMMV

> Old versions of gnucap had an option "dupcheck" to turn checking 
> on and off, defaulting to off, but that got removed as being in-
> the-way and incorrectly implemented in the conversion to 
> plugins.

"off" is a sane default. the "on" setting should be on a/the todo list, at
least.

> Technically, to do it efficiently involves using hash tables, 
> which may happen eventually for other reasons.  Any  other 
> method would be too slow for large circuits.

on hierarchical circuits, run times are much shorter. but i'm curious: what are
the "other reasons" for the hash tables?

cheers
felix



reply via email to

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