Skip to main content

reading and writing MIF files

Project description

mif

PyPI GitHub Actions 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.6.tar.gz (10.0 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.6-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mif-0.6.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mif-0.6.tar.gz
Algorithm Hash digest
SHA256 19de8e124c4330ad1a3ec11b3dd6376ec44e0c2eb968412913d85802feb99371
MD5 5a4bf8fdb083b0cca6fccfc10479630f
BLAKE2b-256 75462e27f99e4718cd12f1385139b3bf14dfef5ce3aeb45a9a8555663aaa5db9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mif-0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mif-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2eb8c1b04a758f9028f5c115d5964ec5afd9402d1eef53d51d28b88ae6cec0fa
MD5 d5dd20d949e93a80139be267ea84e94c
BLAKE2b-256 b4f39719d0ceffda9ce3c62ed9a8342053a195967341ad2d46eea0e5c312a540

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