Skip to main content
https://img.shields.io/pypi/v/pygmyhdl.svg

PygMyHDL is no longer supported or maintained because it depends upon the ``byteplay3`` module which is only compatible with Python 3.5.

PygMyHDL is a thin wrapper around MyHDL. MyHDL lets you design and simulate digital hardware using Python. PygMyHDL does the same thing, but tries to make it a little simpler. Think of it as “MyHDL on training wheels”. Once you get enough experience with PygMyHDL, you’ll probably cast it aside and just use straight MyHDL. That’s OK; that’s why I invented it.

Features

PygMyHDL adds the following features to MyHDL:

  • Wire and Bus classes for declaring single-bit and multi-bit digital signals.

  • Bus objects have .o and .i properties that are used to get the value on a bus (that’s the .o property) and to drive values onto a bus (using the .i property).

  • State objects are used to declare state variables for finite-state machines. Each State object also stores all the defined states in its s attribute for use in making comparisons to states or updating state values.

  • The @chunk decorator is used to indicate a function will create one or more pieces of logic circuitry. These pieces will be implicitly gathered into a list of logic instances that can be simulated and synthesized later. (MyHDL requires you to explicitly store logic instances into Python variables so they can be found and processed later.)

  • The decorators @comb_logic and @seq_logic are used to declare functions that perform combinational and sequential logic operations, respectively. (These are almost identical to MyHDL’s @always_comb and @always_seq decorators except they assist with the implicit instantiation of logic.)

  • Helper functions are provided for testing a digital design using random test vectors, exhaustive test vectors, user-defined test vectors, or a simple clock signal.

  • The myhdlpeek module is used to display the results of logic simulations as waveforms or tables.

Getting Started

Below are some examples of Jupyter notebooks using PygMyHDL. Unfortunately, the Github Notebook viewer doesn’t render the waveform displays so you’ll have to download and run the notebooks locally or click on the static HTML link to see what PygMyHDL can do.


History

0.0.4 (2021-07-06)

  • Moved ownership from xesscorp to devbisme.

0.0.3 (2017-11-05)

  • Added State object for working with finite-state machines in PygMyHDL.

0.0.2 (2017-09-20)

  • Fixed Bus object so my_bus.o[m:n] now calls my_bus(m, n) to get a shadow slice instead of creating an array of wires.

0.0.1 (2017-08-30)

  • First release on PyPI.

Metadata

Release files for pygmyhdl 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygmyhdl 0.0.4
File Size Uploaded Provenance
pygmyhdl-0.0.4.tar.gz 23.0 kB Without provenance Details

Release files / pygmyhdl-0.0.4.tar.gz

Download URL pygmyhdl-0.0.4.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2e4c4cc4ade2ff10c720f690ef904bd66b3409b5f7088d0603a9889edcd31a5b
BLAKE2b-256 checksum
How to use checksums
36d096adc28c62df651d3983a60d2fb81b783e3a3fe11ea9d7a8b2697beca302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Security for pygmyhdl 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page