[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Spice netlister



Hi --

> If a "spice-subcircuit-LL" component is added to the schematic the
> netlister will wrap it up with a .subckt/.ends cards. That's pretty
> close to the behaviour I wanted.

Cool!

> There are some issues, though:
> 1. It forces me to add a simulation card to the schematic. In general
> cases that something I'd like to avoid (it is OK for testbench
> schematics, though).

spice-sdb is not as smart as it could be.  In particular, it needs
something in the schematic to trigger emission of each line (or lines)
of SPICE code.  That's why you need the spice-subcircuit-LL to tell
gnetlist/spice-sdb to emit the .subckt/.end.

If gnetlist was better prepared to deal with hierarchy, then it might
be possible to emit .subckt/.end when hierarchy was encountered.  This
represents a project for future hacking.

> 2. All nested models or ".include" cards (if "-I" option was used) are
> added inside the .subckt. That may cause problems with spice
> simulators that do not like such nested constructs.

The way to deal with this is to create a Makefile which has a separate
callout to gnetlist -g spice-sdb for each hierarchical level.  If you
don't want the .include, then don't use -I in the gnetlist
invocation.  Do something like this in the Makefile:

top_level.cir: mid_level.cir top_level.sch
 	gnetlist -g spice-sdb -I -o top_level.cir top_level.sch

mid_level.cir: bot_level.cir mid_level.sch
 	gnetlist -g spice-sdb -I -o mid_level.cir mid_level.sch

bot_level.cir: bot_level.sch
 	gnetlist -g spice-sdb -o bot_level.cir bot_level.sch

> 3. There are special "spice-subcircuit-IO" components used for making
> subcircuit pins. Does it mean the netlister cannot cope with "normal"
> instance pins?

See above. The netlister needs to see a special SPICE component to
force it to emit the .subckt/.end SPICE cards.  Making gnetlist better
adapted to deal with hierarchy would obviate the need to instantiate
special SPICE components.  OTOH, then the netlister would rely upon
*intrinsic* behaviors to create hierarchy, instead of *explicit*
components which force the emission of hierarchy cards.  Some might
suggest that this is not a feature.  (I am agnostic.)

Cheers,

Stuart


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user