Describe, simulate and debug hardware in Python
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.rst

pyha

Updates https://coveralls.io/repos/github/gasparka/pyha/badge.svg?branch=develop
  • Free software: Apache Software License 2.0

Install

From pip:

pip install --user pyha

RTL/NETLIST level simulations require Docker :

curl -fsSL https://get.docker.com | sh

Follow the instructions to add yourself to the 'docker' group.

Features

  • Describe hardware in Python and convert to VHDL
  • Cycle-accurate and fast simulator
  • Debuggable in Python – very useful as Python and VHDL sources are highly correlated
  • Simple testing framework by pairing pytest and cocotb
  • Builtin fixed-point and complex types

Quick start

Take a look at the cores implemented in Pyha, each of them have a Notebook to ease the experimentation. For example, start with the moving-average core:

Python source

Notebook

VHDL conversion

And then see how the 'dc-removal' is built by reusing the 'moving-average' component:

Python source

Notebook

VHDL conversion

Documentation

Under construction!