mif


Namemif JSON
Version 0.6 PyPI version JSON
download
home_pageNone
Summaryreading and writing MIF files
upload_time2025-10-29 18:44:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords memory mif quartus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            mif
---

[![PyPI](https://img.shields.io/pypi/v/mif)](https://pypi.org/project/mif/)
[![GitHub Actions](https://github.com/agrif/mif/actions/workflows/test.yaml/badge.svg)](https://github.com/agrif/mif/actions/workflows/test.yaml)
[![Read the Docs](https://img.shields.io/readthedocs/mif/latest)][docs]

 [docs]: https://mif.readthedocs.io/en/latest/

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

 [mif]: https://www.intel.com/content/www/us/en/programmable/quartushelp/13.0/mergedProjects/reference/glossary/def_mif.htm
 [hex]: https://en.wikipedia.org/wiki/Intel_HEX

## Installation

Install via `pip`:

```bash
pip install mif
```

## Basic Use

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

```python
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`:

```python
mem[0x12][0]
```

For more detailed information, please [read the documentation][docs].

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mif",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "memory, mif, quartus",
    "author": null,
    "author_email": "Aaron Griffith <aargri@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/75/46/2e27f99e4718cd12f1385139b3bf14dfef5ce3aeb45a9a8555663aaa5db9/mif-0.6.tar.gz",
    "platform": null,
    "description": "mif\n---\n\n[![PyPI](https://img.shields.io/pypi/v/mif)](https://pypi.org/project/mif/)\n[![GitHub Actions](https://github.com/agrif/mif/actions/workflows/test.yaml/badge.svg)](https://github.com/agrif/mif/actions/workflows/test.yaml)\n[![Read the Docs](https://img.shields.io/readthedocs/mif/latest)][docs]\n\n [docs]: https://mif.readthedocs.io/en/latest/\n\n`mif` is a Python module to read and write [Memory Initialization\nFiles][mif], used by Quartus to interact with memory blocks on Intel\nFPGAs. They are similar to [Intel HEX][hex] files, except they support\narbitrary memory widths as first-class citizens.\n\n [mif]: https://www.intel.com/content/www/us/en/programmable/quartushelp/13.0/mergedProjects/reference/glossary/def_mif.htm\n [hex]: https://en.wikipedia.org/wiki/Intel_HEX\n\n## Installation\n\nInstall via `pip`:\n\n```bash\npip install mif\n```\n\n## Basic Use\n\nUse with `load` / `loads` and `dump` / `dumps`, similar to the `json` module:\n\n```python\nwith open('memory.mif') as f:\n    mem = mif.load(f)\n\nprint(mif.dumps(mem))\n```\n\nThe resulting `mem` is a numpy array of unpacked bits, where the first\ndimension is the address in memory, and the second are the bits in\nlittle-endian order. For example, to access the least significant bit\nat address `0x12`:\n\n```python\nmem[0x12][0]\n```\n\nFor more detailed information, please [read the documentation][docs].\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "reading and writing MIF files",
    "version": "0.6",
    "project_urls": {
        "Documentation": "https://mif.readthedocs.io/en/latest/",
        "Source": "https://github.com/agrif/mif/"
    },
    "split_keywords": [
        "memory",
        " mif",
        " quartus"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b4f39719d0ceffda9ce3c62ed9a8342053a195967341ad2d46eea0e5c312a540",
                "md5": "d5dd20d949e93a80139be267ea84e94c",
                "sha256": "2eb8c1b04a758f9028f5c115d5964ec5afd9402d1eef53d51d28b88ae6cec0fa"
            },
            "downloads": -1,
            "filename": "mif-0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5dd20d949e93a80139be267ea84e94c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6792,
            "upload_time": "2025-10-29T18:44:26",
            "upload_time_iso_8601": "2025-10-29T18:44:26.834289Z",
            "url": "https://files.pythonhosted.org/packages/b4/f3/9719d0ceffda9ce3c62ed9a8342053a195967341ad2d46eea0e5c312a540/mif-0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "75462e27f99e4718cd12f1385139b3bf14dfef5ce3aeb45a9a8555663aaa5db9",
                "md5": "5a4bf8fdb083b0cca6fccfc10479630f",
                "sha256": "19de8e124c4330ad1a3ec11b3dd6376ec44e0c2eb968412913d85802feb99371"
            },
            "downloads": -1,
            "filename": "mif-0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "5a4bf8fdb083b0cca6fccfc10479630f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 10024,
            "upload_time": "2025-10-29T18:44:27",
            "upload_time_iso_8601": "2025-10-29T18:44:27.589100Z",
            "url": "https://files.pythonhosted.org/packages/75/46/2e27f99e4718cd12f1385139b3bf14dfef5ce3aeb45a9a8555663aaa5db9/mif-0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-29 18:44:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "agrif",
    "github_project": "mif",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "mif"
}
        
Elapsed time: 0.61654s