Hardware Design Framework based on python and MyHDL
Project description
pihdf: Python Hardware Design Framework based on MyHDL
======================================================
.. image:: https://travis-ci.org/hnikolov/pihdf.svg?branch=master
:target: https://travis-ci.org/hnikolov/pihdf
A very preliminary documentation (work-in-progress) is available at: http://hnikolov.github.io/pihdf_doc/
Install ``pihdf`` using pip
---------------------------
You can install the latest release of ``pihdf`` from pypi: ::
$ sudo pip install pihdf
**Note:** If you do not have ``pip`` installed: ::
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
Install ``pihdf`` from source
---------------------------
If you plan to contribute to ``pihdf``, then install it from source: ::
$ git clone https://github.com/hnikolov/pihdf
$ cd pihdf
$ sudo python setup.py develop
Option *develop* installs ``pyhdf`` in *editable* mode.
This is very convenient because your changes are immediately reflected into the installed ``pihdf`` package.
This means that you do not need to re-install ``pihdf`` in order your changes to take effect.
Dependences on Python packages
------------------------------
``pihdf`` requires the following python packages: **myhdl, myhdl_lib, simplejson, coverage, nose**.
These packages will be installed during the installation of ``pihdf`` if not present on your system.
**Note:** These packages will **not** be un-installed if you un-install ``pyhdf``.
Co-simulation, waveform and dotty viewers
-----------------------------------------
For co-simulations, ``pihdf`` uses the **Icarus iverilog** simulator. **GTKWave** is the waveform viewer used in ``pihdf``. For structured designs, ``pihdf`` generates also the design topology (i.e., HW modules interconnections) as a ``.dot`` file. To viasualize it, you can use the ``xdot`` program. Install all programs by executing: ::
$ sudo apt-get install iverilog gtkwave xdot
Create ``myhdl.vpi``
------------------
For co-simuations, myhdl uses a ``.vpi`` interface. To create the ``myhdl.vpi`` file used with **Icarus**, you need the source of ``myhdl``: ::
$ git clone https://github.com/jandecaluwe/myhdl
$ make -C myhdl/cosimulation/icarus
$ sudo mkdir /.pihdf
$ sudo cp myhdl/cosimulation/icarus/myhdl.vpi /.pihdf
**Note:** ``pihdf`` expects file ``myhdl.vpi`` to be in folder ``/.pihdf``
Un-install
----------
Un-installing ``pihdf`` (should you decide to do so) is easy. Depending on how you installed it, you can:
Un-install ``pihdf`` using ``pip``: ::
$ sudo pip uninstall pihdf
Or, un-install ``pihdf`` if installed from source: ::
$ cd pihdf
$ sudo python setup.py develop --uninstall
To remove the command-line tool ``module`` from its location: ::
$ which module | xargs sudo rm
Note
----
The command-line tool ``module`` makes use of the very convenient package ``docopt`` (https://github.com/docopt/docopt), which is copied in the ``pihdf`` repository.
======================================================
.. image:: https://travis-ci.org/hnikolov/pihdf.svg?branch=master
:target: https://travis-ci.org/hnikolov/pihdf
A very preliminary documentation (work-in-progress) is available at: http://hnikolov.github.io/pihdf_doc/
Install ``pihdf`` using pip
---------------------------
You can install the latest release of ``pihdf`` from pypi: ::
$ sudo pip install pihdf
**Note:** If you do not have ``pip`` installed: ::
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
Install ``pihdf`` from source
---------------------------
If you plan to contribute to ``pihdf``, then install it from source: ::
$ git clone https://github.com/hnikolov/pihdf
$ cd pihdf
$ sudo python setup.py develop
Option *develop* installs ``pyhdf`` in *editable* mode.
This is very convenient because your changes are immediately reflected into the installed ``pihdf`` package.
This means that you do not need to re-install ``pihdf`` in order your changes to take effect.
Dependences on Python packages
------------------------------
``pihdf`` requires the following python packages: **myhdl, myhdl_lib, simplejson, coverage, nose**.
These packages will be installed during the installation of ``pihdf`` if not present on your system.
**Note:** These packages will **not** be un-installed if you un-install ``pyhdf``.
Co-simulation, waveform and dotty viewers
-----------------------------------------
For co-simulations, ``pihdf`` uses the **Icarus iverilog** simulator. **GTKWave** is the waveform viewer used in ``pihdf``. For structured designs, ``pihdf`` generates also the design topology (i.e., HW modules interconnections) as a ``.dot`` file. To viasualize it, you can use the ``xdot`` program. Install all programs by executing: ::
$ sudo apt-get install iverilog gtkwave xdot
Create ``myhdl.vpi``
------------------
For co-simuations, myhdl uses a ``.vpi`` interface. To create the ``myhdl.vpi`` file used with **Icarus**, you need the source of ``myhdl``: ::
$ git clone https://github.com/jandecaluwe/myhdl
$ make -C myhdl/cosimulation/icarus
$ sudo mkdir /.pihdf
$ sudo cp myhdl/cosimulation/icarus/myhdl.vpi /.pihdf
**Note:** ``pihdf`` expects file ``myhdl.vpi`` to be in folder ``/.pihdf``
Un-install
----------
Un-installing ``pihdf`` (should you decide to do so) is easy. Depending on how you installed it, you can:
Un-install ``pihdf`` using ``pip``: ::
$ sudo pip uninstall pihdf
Or, un-install ``pihdf`` if installed from source: ::
$ cd pihdf
$ sudo python setup.py develop --uninstall
To remove the command-line tool ``module`` from its location: ::
$ which module | xargs sudo rm
Note
----
The command-line tool ``module`` makes use of the very convenient package ``docopt`` (https://github.com/docopt/docopt), which is copied in the ``pihdf`` repository.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pihdf-0.1.3.tar.gz
(49.4 kB
view details)
File details
Details for the file pihdf-0.1.3.tar.gz
.
File metadata
- Download URL: pihdf-0.1.3.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42a448dd02e6f820709ab20bfd1f6c93dbf870b69a5ce3a6c5f6db8223c0577f |
|
MD5 | 05d19ac668cc8a49e6021a859253c5df |
|
BLAKE2b-256 | 028bbf441173e7280603cb1601e4c8848cedcb552d7df06e9af4d058b64152f4 |