spydrnet


Namespydrnet JSON
Version 1.13.0 PyPI version JSON
download
home_pagehttps://byuccl.github.io/spydrnet
SummaryPython package for analyzing and transforming netlists
upload_time2023-09-14 18:29:05
maintainerSpyDrNet Developers
docs_urlNone
authorAndrew Keller
requires_python>=3.6
licenseBSD
keywords netlist analysis transformation netlist fpga primitives module port edif digital hardware
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Welcome to SpyDrNet!
====================

.. image:: https://img.shields.io/pypi/v/spydrnet.svg
   :target: https://pypi.org/project/spydrnet/
   
.. image:: https://img.shields.io/pypi/pyversions/spydrnet.svg
   :target: https://pypi.org/project/spydrnet/

.. image:: https://app.travis-ci.com/byuccl/spydrnet.svg?branch=master
   :target: https://app.travis-ci.com/github/byuccl/spydrnet

A flexible framework for analyzing and transforming `netlists <https://en.wikipedia.org/wiki/Netlist>`_. Built to fill an important gap in FPGA research and reliability. Currently available as a pure Python package.

- **Website and Documentation:** https://byuccl.github.io/spydrnet
- **Mailing List:** https://groups.google.com/forum/#!forum/spydrnet-discuss
- **Source:** https://github.com/byuccl/spydrnet
- **Bug Reports:** https://github.com/byuccl/spydrnet/issues

Simple Examples
---------------

SpyDrNet can be used to create netlists from scratch. Because it is a low-level framework, manual netlist creation can be tedious (much like writting a high level application in assembly). To assist in rapid productivity, parsers and composers are provided for common netlist formats. Currently `EDIF <https://en.wikipedia.org/wiki/EDIF>`_ and structural Verilog are supported, but the roadmap also includes structural VHDL, Verilog Quartus Mapping Files (`Intel's VQM <https://www.intel.com/content/www/us/en/programmable/quartushelp/17.0/mapIdTopics/mwh1465406414431.htm>`_), and JSON.

**Loading Example Netlists**

Several example netlists are included in the repository to introduce the framework, its features, and functionality. To list and load these netlists, see the `using_example_netlists` page and then run the following: 

.. code:: python

    >>> import spydrnet as sdn
    >>> sdn.example_netlist_names
    ['4bitadder', '8051', ... , 'zpu4']
    >>> netlist = sdn.load_example_netlist_by_name('4bitadder')

**Parsing a Netlist**

.. code:: python

    >>> netlist = sdn.parse('<netlist_filename>.edf')

**View Data Associated with any Netlist Element**

.. code:: python

   >>> netlist.data
   {'.NAME': 'adder', 'EDIF.identifier': 'Z4bitadder', ... }

**List Libraries in a Netlist**

.. code:: python

    >>> list(library.name for library in netlist.libraries)
    ['VIRTEX', 'UNILIB', 'work']

**List Definitions in a Library**

.. code:: python

    >>> library = netlist.libraries[2]
    >>> list(definition.name for definition in library.definitions)
    ['adder']

**List Ports, Cables, and Instances in a Definition**

.. code:: python

    >>> definition = library.definitions[0]
    >>> list(port.name for port in definition.ports)
    ['data1(3:0)', 'data2(3:0)', 'answer(3:0)', 'clk', 'reset', 'enable']
    >>> list(cable.name for cable in definition.cables)
    ['answer_1(0)', 'answer_1(1)', 'answer_1_(2)', 'answer_1(3)', ... ]
    >>> list(instance.name for instance in definition.children)
    ['un3_answer1_axbxc3', 'un2_answer2_axbxc3', 'reset_c_i', ... ]

**Compose a Netlist**

This example exports a netlist into an EDIF formatted netlist file by the given name.

.. code:: python

    >>> sdn.compose(netlist, '<filename>.edf')
   
The following equivalent code may also be used.

.. code:: python
   
    >>> netlist.compose('<filename>.edf')

**Additional Examples**

Additional examples are available in the documentation for netlist creation, analysis, and transformation.

Install
-------

The stable release of SpyDrNet can be installed using ``pip``::

    > pip install spydrnet

To install from PyPI with all optional dependicies use::

    > pip install spydrnet[all]

For more installation instruction, see `INSTALL.rst`.

Bugs
----

Bugs can be reported on the `issues page <https://github.com/byuccl/spydrnet/issues>`_ or they can be fixed through a fork / pull request. All changes are welcome. Discussion of ideas for new features is available on the `mailing list <https://groups.google.com/forum/#!forum/spydrnet-discuss>`_.

A Brief History
---------------

The `BYU Configurable Computing Lab <https://ccl.ee.byu.edu/>`_ actively maintains the `BYU EDIF Tools <http://reliability.ee.byu.edu/edif/>`_ - a Java API for creating, modifying, or analyzing EDIF netlists. These tools are tied to the EDIF netlist format and provide JEDIF tools capable of flattening a circuit (by removing hierarchical organization) and applying fault-tolerance techniques such as `triple modular redundancy (TMR) <https://en.wikipedia.org/wiki/Triple_modular_redundancy>`_. Development of SpyDrNet began back in 2016 with the idea of creating an accessible, format independent, tool for netlist analysis and transformation. The underlying intermediate data structure is designed preserve proper netlist relationship as a generic netlist while allowing for the preservation of format specific constructs. A language agnostic prototype was developed and this prototype soon became useful in the lab for netlist analysis and reliability transformation studies. A more mature (though still having room for growth) tool is presented here. 

Design Notes
------------

We have tried to build this tool around the principles of expandability and modularity. Care has been taken to separate different parts of the program in an organized fashion.

How to contribute
-----------------
If this tool has been useful to you, or have new feature ideas that you would like to implement, feel free to make a pull request, or take a look at the issues to see how to contribute. New ideas, bug fixes and suggestions are also welcome (See `CONTRIBUTING.rst`).

Special Thanks
--------------

Special thanks is given to `NetworkX <https://networkx.github.io/>`_ - "a python package for the creation, manipulation, and study of the structure, dynamics and functions of complex networks."  This mature project has been used as a template for much of SpyDrNet's documentation and code structure. It also has saved enormous effort in heavy graph analysis as a robust and complete library used to analyze the relationships between circuit nodes.

License
-------

Released under the BSD 3-Clause License (see `LICENSE`)::

   Copyright (C) 2019, Brigham Young University
   All rights reserved.

            

Raw data

            {
    "_id": null,
    "home_page": "https://byuccl.github.io/spydrnet",
    "name": "spydrnet",
    "maintainer": "SpyDrNet Developers",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "spydrnet-discuss@googlegroups.com",
    "keywords": "Netlist,Analysis,Transformation,netlist,FPGA,primitives,module,port,EDIF,Digital,Hardware",
    "author": "Andrew Keller",
    "author_email": "andrewmkeller@byu.edu",
    "download_url": "https://files.pythonhosted.org/packages/52/d9/0ccd43942bd4ee31255d7ca858307083edc3944817120c0d83041bb13071/spydrnet-1.13.0.tar.gz",
    "platform": "Linux",
    "description": "Welcome to SpyDrNet!\n====================\n\n.. image:: https://img.shields.io/pypi/v/spydrnet.svg\n   :target: https://pypi.org/project/spydrnet/\n   \n.. image:: https://img.shields.io/pypi/pyversions/spydrnet.svg\n   :target: https://pypi.org/project/spydrnet/\n\n.. image:: https://app.travis-ci.com/byuccl/spydrnet.svg?branch=master\n   :target: https://app.travis-ci.com/github/byuccl/spydrnet\n\nA flexible framework for analyzing and transforming `netlists <https://en.wikipedia.org/wiki/Netlist>`_. Built to fill an important gap in FPGA research and reliability. Currently available as a pure Python package.\n\n- **Website and Documentation:** https://byuccl.github.io/spydrnet\n- **Mailing List:** https://groups.google.com/forum/#!forum/spydrnet-discuss\n- **Source:** https://github.com/byuccl/spydrnet\n- **Bug Reports:** https://github.com/byuccl/spydrnet/issues\n\nSimple Examples\n---------------\n\nSpyDrNet can be used to create netlists from scratch. Because it is a low-level framework, manual netlist creation can be tedious (much like writting a high level application in assembly). To assist in rapid productivity, parsers and composers are provided for common netlist formats. Currently `EDIF <https://en.wikipedia.org/wiki/EDIF>`_ and structural Verilog are supported, but the roadmap also includes structural VHDL, Verilog Quartus Mapping Files (`Intel's VQM <https://www.intel.com/content/www/us/en/programmable/quartushelp/17.0/mapIdTopics/mwh1465406414431.htm>`_), and JSON.\n\n**Loading Example Netlists**\n\nSeveral example netlists are included in the repository to introduce the framework, its features, and functionality. To list and load these netlists, see the `using_example_netlists` page and then run the following: \n\n.. code:: python\n\n    >>> import spydrnet as sdn\n    >>> sdn.example_netlist_names\n    ['4bitadder', '8051', ... , 'zpu4']\n    >>> netlist = sdn.load_example_netlist_by_name('4bitadder')\n\n**Parsing a Netlist**\n\n.. code:: python\n\n    >>> netlist = sdn.parse('<netlist_filename>.edf')\n\n**View Data Associated with any Netlist Element**\n\n.. code:: python\n\n   >>> netlist.data\n   {'.NAME': 'adder', 'EDIF.identifier': 'Z4bitadder', ... }\n\n**List Libraries in a Netlist**\n\n.. code:: python\n\n    >>> list(library.name for library in netlist.libraries)\n    ['VIRTEX', 'UNILIB', 'work']\n\n**List Definitions in a Library**\n\n.. code:: python\n\n    >>> library = netlist.libraries[2]\n    >>> list(definition.name for definition in library.definitions)\n    ['adder']\n\n**List Ports, Cables, and Instances in a Definition**\n\n.. code:: python\n\n    >>> definition = library.definitions[0]\n    >>> list(port.name for port in definition.ports)\n    ['data1(3:0)', 'data2(3:0)', 'answer(3:0)', 'clk', 'reset', 'enable']\n    >>> list(cable.name for cable in definition.cables)\n    ['answer_1(0)', 'answer_1(1)', 'answer_1_(2)', 'answer_1(3)', ... ]\n    >>> list(instance.name for instance in definition.children)\n    ['un3_answer1_axbxc3', 'un2_answer2_axbxc3', 'reset_c_i', ... ]\n\n**Compose a Netlist**\n\nThis example exports a netlist into an EDIF formatted netlist file by the given name.\n\n.. code:: python\n\n    >>> sdn.compose(netlist, '<filename>.edf')\n   \nThe following equivalent code may also be used.\n\n.. code:: python\n   \n    >>> netlist.compose('<filename>.edf')\n\n**Additional Examples**\n\nAdditional examples are available in the documentation for netlist creation, analysis, and transformation.\n\nInstall\n-------\n\nThe stable release of SpyDrNet can be installed using ``pip``::\n\n    > pip install spydrnet\n\nTo install from PyPI with all optional dependicies use::\n\n    > pip install spydrnet[all]\n\nFor more installation instruction, see `INSTALL.rst`.\n\nBugs\n----\n\nBugs can be reported on the `issues page <https://github.com/byuccl/spydrnet/issues>`_ or they can be fixed through a fork / pull request. All changes are welcome. Discussion of ideas for new features is available on the `mailing list <https://groups.google.com/forum/#!forum/spydrnet-discuss>`_.\n\nA Brief History\n---------------\n\nThe `BYU Configurable Computing Lab <https://ccl.ee.byu.edu/>`_ actively maintains the `BYU EDIF Tools <http://reliability.ee.byu.edu/edif/>`_ - a Java API for creating, modifying, or analyzing EDIF netlists. These tools are tied to the EDIF netlist format and provide JEDIF tools capable of flattening a circuit (by removing hierarchical organization) and applying fault-tolerance techniques such as `triple modular redundancy (TMR) <https://en.wikipedia.org/wiki/Triple_modular_redundancy>`_. Development of SpyDrNet began back in 2016 with the idea of creating an accessible, format independent, tool for netlist analysis and transformation. The underlying intermediate data structure is designed preserve proper netlist relationship as a generic netlist while allowing for the preservation of format specific constructs. A language agnostic prototype was developed and this prototype soon became useful in the lab for netlist analysis and reliability transformation studies. A more mature (though still having room for growth) tool is presented here. \n\nDesign Notes\n------------\n\nWe have tried to build this tool around the principles of expandability and modularity. Care has been taken to separate different parts of the program in an organized fashion.\n\nHow to contribute\n-----------------\nIf this tool has been useful to you, or have new feature ideas that you would like to implement, feel free to make a pull request, or take a look at the issues to see how to contribute. New ideas, bug fixes and suggestions are also welcome (See `CONTRIBUTING.rst`).\n\nSpecial Thanks\n--------------\n\nSpecial thanks is given to `NetworkX <https://networkx.github.io/>`_ - \"a python package for the creation, manipulation, and study of the structure, dynamics and functions of complex networks.\"  This mature project has been used as a template for much of SpyDrNet's documentation and code structure. It also has saved enormous effort in heavy graph analysis as a robust and complete library used to analyze the relationships between circuit nodes.\n\nLicense\n-------\n\nReleased under the BSD 3-Clause License (see `LICENSE`)::\n\n   Copyright (C) 2019, Brigham Young University\n   All rights reserved.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Python package for analyzing and transforming netlists",
    "version": "1.13.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/byuccl/spydrnet/issues",
        "Documentation": "https://byuccl.github.io/spydrnet/docs/stable",
        "Homepage": "https://byuccl.github.io/spydrnet",
        "Source Code": "https://github.com/byuccl/spydrnet"
    },
    "split_keywords": [
        "netlist",
        "analysis",
        "transformation",
        "netlist",
        "fpga",
        "primitives",
        "module",
        "port",
        "edif",
        "digital",
        "hardware"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03b1f14e94d56eb8f0aeb6a38eafc526470c30e898966e00cc6b099f106f8026",
                "md5": "5c5f5b3b8e8b4e870b3cbecd088d41ac",
                "sha256": "f4c6375ab679ee37a41749fa22ebf9e404d3d01d81d93239c2f11fb2f2747100"
            },
            "downloads": -1,
            "filename": "spydrnet-1.13.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c5f5b3b8e8b4e870b3cbecd088d41ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 1010166,
            "upload_time": "2023-09-14T18:29:03",
            "upload_time_iso_8601": "2023-09-14T18:29:03.138411Z",
            "url": "https://files.pythonhosted.org/packages/03/b1/f14e94d56eb8f0aeb6a38eafc526470c30e898966e00cc6b099f106f8026/spydrnet-1.13.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52d90ccd43942bd4ee31255d7ca858307083edc3944817120c0d83041bb13071",
                "md5": "2590084e00327910286ccd0d6c20d947",
                "sha256": "e5bd1cf33f11c3f27d0d3a26603dcfbfe1bbe22386e254018e418c7ae6b5c53a"
            },
            "downloads": -1,
            "filename": "spydrnet-1.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2590084e00327910286ccd0d6c20d947",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 937468,
            "upload_time": "2023-09-14T18:29:05",
            "upload_time_iso_8601": "2023-09-14T18:29:05.747208Z",
            "url": "https://files.pythonhosted.org/packages/52/d9/0ccd43942bd4ee31255d7ca858307083edc3944817120c0d83041bb13071/spydrnet-1.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-14 18:29:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "byuccl",
    "github_project": "spydrnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spydrnet"
}
        
Elapsed time: 0.11314s