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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mif-0.7.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mif-0.7.tar.gz
Algorithm Hash digest
SHA256 0713be13c28cafe7105a68cad91be0fc55a5215cfc4952af6f6a89ee48532cc6
MD5 6d4838f918e6e826cada9066de85129a
BLAKE2b-256 3ecd7c432c0da3e0466aedb9fd0718e3dc289538de6683853de17c2e7bc416fd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mif-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f7aff9da4abbbd76092c967b4a774fa9f1b09b5329f88eebd94a8957fc009661
MD5 4a7ab31e38b4510cf01ef2ed6df51979
BLAKE2b-256 58b9ce37e42b1da29bb5cfc1b38a0abe400834985ba0edcaf3be891a2420f2d5

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