Some Spice implementation notes and roadmap

Standard version

There is no standard or version in Spice currently maintained in public. All known implementations (both free and non-free) use their own dialects and are mutually incompatible.

History

Gnucap Spice support was originally implemented during Spice2 times. More features, mainly behavioural modelling were added, with goals similar to Spice3, but using a more regular syntax. As a consequence, Gnucap is not compatible with any Spice3 derivative out there.

Future

Since Gnucap has moved to plugins around 2010, the Spice parsing is essentially separate from the core library. The plugin apps/lang_spice.cc works well for what it was meant to do (including some compatibility kludges with ancient commercial spices). It can be thought of as an example or template for more specialised and higher levels of compatibility, if so required.

Internals

Gnucap provides the data structures to support the most relevant parts of any Spice. The last known real blocker, the “global” directive has been sorted during the node rework. There are known issues with case sensitivity, but these won't show up in a purely case insensitive run.

Questions about Spice

When it comes to Spice compatibility, the following questions may arise and have been discussed ad-nauseam here and in other places.

- Which Spice? Is it worth providing, say, ngSpice or Xyce input compatibility?

We think so. And we will definitely offer help.

- Spice lacks essential modelling features in modern applications. Why bother?

Verilog-AMS “includes” Spice as a subset (the chosen dialect is left as an implementation detail), and the use of spice “models” in a Verilog-AMS context is well defined. The idea here is to streamline the transition. Much like git can clone subversion repos, and compiled fortran code retains the use in a C program.

- Most user defined Spice devices come as subcircuit macros, can't we just translate those to Verilog-A?

This might solve all our problems, since Verilog-A is unambiguous, and we need to support it anyway.

- Where do I start?

Compile a list of things that need doing. A one mile walk starts with a single step.

gnucap/manual/tech/spice.txt · Last modified: 2025/05/01 07:13 by felixs
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki