Re: netlist translation via XML/XSLT

Dan McMahill <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.