Skip to main content

reading and writing MIF files

Project description

mif

PyPI Travis CI Read the Docs

mif is a Python module to read and write Memory Initialization Files, used by Quartus to interact with memory blocks on Intel FPGAs. They are similar to Intel HEX files, except they support arbitrary memory widths as first-class citizens.

Installation

Install via pip:

pip install mif

Basic Use

Use with load / loads and dump / dumps, similar to the json module:

with open('memory.mif') as f:
    mem = mif.load(f)

print(mif.dumps(mem))

The resulting mem is a numpy array of unpacked bits, where the first dimension is the address in memory, and the second are the bits in little-endian order. For example, to access the least significant bit at address 0x12:

mem[0x12][0]

For more detailed information, please read the documentation.

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

mif-0.4.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mif-0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mif-0.4.tar.gz.

File metadata

  • Download URL: mif-0.4.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for mif-0.4.tar.gz
Algorithm Hash digest
SHA256 954876ffeea34ccb9d4b66fa8f088562097c4004d109b61e4ce84257a21b1f51
MD5 d9a71b096b0398d52333029de60b7241
BLAKE2b-256 fbb233689ee1c1159a10267cc232282fb9b2cefa23a44e2f92a787e1239a4241

See more details on using hashes here.

File details

Details for the file mif-0.4-py3-none-any.whl.

File metadata

  • Download URL: mif-0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for mif-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66fd66b4dc4cf4e35df90d49cb8d7f9a0087ea21b9ab2a15b0943236b35039b6
MD5 0b592fad0654a370952ee1e0c431ba7e
BLAKE2b-256 956d58be0b5c04a629024c50d2a7bd5531ddac1ae3ea06cc2c2aa6993119f471

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page