gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Gnucap-devel] netlist translation via XML/XSLT


From: Dan McMahill
Subject: Re: [Gnucap-devel] netlist translation via XML/XSLT
Date: Wed, 13 Sep 2006 07:02:57 -0400
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

Andrew Plumb wrote:
Hi Everyone,

Jonathan David pinged me on this one (re. Re: [Gnucap-devel] Verilog -
was: Re: Use of M as suffix for Mega, Date:     Thu, 24 Aug 2006 17:11:18
-0700 (PDT)).  It's probably not a good idea for me to contribute the
actual code I wrote a while back to do netlist translation, but I'm quite
willing to start from scratch to create something formally GPL'd.

The way I originally structured things was as command-line, Java-based
tool to keep things platform independent.  I coded up a JavaCC-based
parser to convert Spectre-syntax and SPICE-syntax into an XML-intermediate
format, then used Java's built-in XSLT parser to transform the resulting
XML into whatever textual output was needed, including Verilog-AMS.

For a GPL'd set of tools, I think the approach I'll take is to create a
simple lex/yacc-based parser to read SPICE format from STDIN and write XML
to STDOUT.  Then anyone can use xsltproc to create/modify/enhance their
own output format, or possibly re-use the parser code to write directly to
a BSD/MySQL database or equivalent for other funky stuff.

Probable usage examples:

spice2xml < netlist.cir > netlist.xml
spice2xml -i netlist.cir -o netlist.xml
spice2xml -i netlist.cir > netlist.xml
spice2xml < netlist.cir -o netlist.xml
cat netlist.cir | spice2xml > netlist.xml

...then all you would have to do is:

xsltproc spice2vams.xsl netlist.xml > netlist.vams

Has anyone looked at gnetman? I think that was part of the idea there. The author of that tool has quite a bit of experience in netlist databases so it may be a useful starting place. Even if none of the code is used, there may be some good ideas there.

-Dan





reply via email to

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