One thing we could really use is a simple, well-documented generic textual output netlist format.
Most netlist formats for specific tools will be written and contributed as built-in formats. However, sometimes it's very useful to write little scripts or programs to extract information, statistics, etc, from a netlist, and these are better served by parsing through a very simple generic netlist than either trying to hook into the PHDL parsing infrastructure or re-parsing a proprietary output format like PADS.
It also makes it easy for someone to develop a backend in the language of their choice, should they chose to do so. (Although obviously we'd LIKE to have our netlist formats all rolled up and supported by a project, we should never do anything to prevent 3rd parties that aren't interested in working with us from doing their own thing.)
This also really opens up new backend possibilities for uses where, for example, a netlist can be read in and acted on programmatically, but only from a foreign environment (think the built-in TCL interpreters in a lot of commercial tools that can read and write files).
The good(?) news is that, looking at the PHDL code, I think we may already have an intermediate format like this, used by the phdltrans.jar code, but it's not completely exposed to the user or documented.
Anonymous
There is a .net file generated by the compiler, which is actually a generic xml format version of the netlist. Phdltran.jar reads this file back in and creates data structures from which the netlist can then be created. I've attached a .net file generated for a basic rc filter.
Is this similar to what your mentioning?
We should add documentation about the specific format of this file so that someone can write their own parser for it if they so desire.
One thing though is that this file is created by the 2.1 version of the compiler, if we decide in the future to go back to the 2.0 version, we will need to rewrite or lose this functionality.
Seems like the XML (.net) output is probably good enough if we document it, since most languages (even scripting languages) can deal with XML well enough.
So given that, I've changed the bug title to reflect that what we really need for it is just documentation.
I've proposed a PHDL Intermediate Format (PHDLIF) with a full specification and example API in Git. If we get consensus on this format it will address this bug (and more).