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.5.tar.gz (10.5 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.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mif-0.5.tar.gz
Algorithm Hash digest
SHA256 60a903f57aaa91474c0ca8eb20cec5e8849cdb4397686373e70d4afd4c05b5ce
MD5 f1cbbde30cf9284eb674c1cd0ffb9269
BLAKE2b-256 32f0210f9cfe07a2fea131d86d7900855817635d257d065dc7e6bb88137d2c12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mif-0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dd5bfa98df28d843a5f08c05be244d3193114aa9f5dd6de0b513d3bb9b0f661f
MD5 e52e029925eed7ac1725783d686951f6
BLAKE2b-256 7818d360b8471098616828f552c95ba0bd19bb20da47deb9747d49d71fed7820

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