Home Forums Generating an XML Netlist Using DesignWorks Professional

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #896
    NeilMackenzie
    Keymaster

    Generating an XML Netlist Using DesignWorks Professional

    Purpose of This Note

    This note describes how to use DesignWorks Professional to generate an XML netlist from a schematic of an electronic circuit.  This allows all the essential connectivity information in an electronic design to be exported in a structured format for PCB and simulation purposes.

     

    This note applies to: Windows Macintosh
    DesignWorks Professional 3.0 + 3.0 +
    DesignWorks Lite 3.2 + N/A
    LogicWorks N/A N/A
    Notes: N/A – not applicable to this version. “3.0 +” indicates version 3.0 and later.  Since this note may apply to multiple versions and platforms, there may be some variation in exact configuration of menu commands and screen layouts from that shown in this note, but the same principles apply.

    XML Netlist Format

    XML (Extensible Markup Language) is a general interface language that can be specialized for any data transfer application.  This note describes how to use the DesignWorks Report Generator to generate a netlist and component list in XML format.   Since the XML format is highly structured, it would be easy to convert this format to other possible input formats for PCB layout and simulation packages.

    XML Document Type Definition (DTD)

    The Document Type Definition defines the format of the netlist.  Here is the DTD for the DesignWorks XML Netlist format:

    <!DOCTYPE netlist [
        <!ELEMENT netlist (header?, components?, nets)>
        <!ELEMENT header (date?, source?, generator?)>
        <!ELEMENT components (component*)>
        <!ELEMENT nets (net*)>
        <!ELEMENT net (name?, pin*)>
        <!ELEMENT pin (name, pinnum)>
        <!ELEMENT component (name, part, value?, datestamp?)>
        <!ELEMENT date (#PCDATA)>
        <!ELEMENT source (#PCDATA)>
        <!ELEMENT generator (#PCDATA)>
        <!ELEMENT name (#PCDATA)>
        <!ELEMENT part (#PCDATA)>
        <!ELEMENT value (#PCDATA)>
        <!ELEMENT datestamp (#PCDATA)>
        <!ELEMENT pinnum (#PCDATA)>
    ]>  
    Note that this format allows the header and component lists to be omitted if only a pure list of nets (signals) is required.
    

    Generating the XML Netlist Format from DesignWorks

    Following is a simple report script that generates the above format.  Each device is listed with optional value (intended for component values for discrete components, etc.):

    $CREATEREPORT($DESIGNNAME.xml)

    $SIGPINFORMAT <pin><name>$DEVNAME</name><pinnum>$PINNUM</pinnum></pin>
    $MAXITEMSPERLINE(1)
    <!DOCTYPE netlist [
        <!ELEMENT netlist (header?, components?, nets)>
        <!ELEMENT header (date?, source?, generator?)>
        <!ELEMENT components (component*)>
        <!ELEMENT nets (net*)>
        <!ELEMENT net (name?, pin*)>
        <!ELEMENT pin (name, pinnum)>
        <!ELEMENT component (name, part, value?, datestamp?)>
        <!ELEMENT date (#PCDATA)>
        <!ELEMENT source (#PCDATA)>
        <!ELEMENT generator (#PCDATA)>
        <!ELEMENT name (#PCDATA)>
        <!ELEMENT part (#PCDATA)>
        <!ELEMENT value (#PCDATA)>
        <!ELEMENT datestamp (#PCDATA)>
        <!ELEMENT pinnum (#PCDATA)>
    ]>
    <netlist>
    <header>
    <date>$DATE</date>
        <source>$DESIGNNAME</source>
        <generator>DesignWorks Professional for Windows</generator>
    </header>
    
    <components>
    $DEVICES <component>$NEWLINE <name>$DEVNAME</name>$NEWLINE <part>&Part</part>$IF(&Value)$NEWLINE <value>&Value</value>$ENDIF$NEWLINE <datestamp>&(DateStamp.Dev)</datestamp>$NEWLINE </component>
    </components>
    <nets>
    $CONTSTART( )
    $SIGNALS <net><name>$SIGNAME</name>$NEWLINE $PINS$NEWLINE </net>
    </nets>
    </netlist>

    Note that since the DTD is relatively short, it is included in each netlist, rather than making reference to an external DTD.

     

     

     

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.