cocotbext-hyperbus


Namecocotbext-hyperbus JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/meeeeet/cocotbext_hyperbus
SummaryA cocotb extension for HyperBus controllers
upload_time2024-06-24 10:57:25
maintainerNone
docs_urlNone
authorMeet Sangani
requires_python>=3.8
licenseMIT
keywords cocotb hyperbus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cocotb extension for HyperBus

[![PyPI version](https://badge.fury.io/py/cocotbext-hyperbus.svg)](https://badge.fury.io/py/cocotbext-hyperbus)

## Installation

Installation from pip (release version, stable):

    pip install cocotbext-hyperbus

Installation for active development:

    git clone https://github.com/meeeeet/cocotbext_hyperbus
    pip install -e cocotbext_hyperbus

## Documentation and usage examples

See the `tests` directory for complete testbenches using these modules.

### Configuration

1. Alter the following parameter in the Infineon HyperRAM RTL code to avoid the cocotb having to wait a long time and the simulation crashing.

    ```
    // tdevice values: values for internal delays
    // power-on reset
    specparam tdevice_VCS    = 150;
    // Deep Power Down to Idle wake up time
    specparam tdevice_DPD    = 150;
    // Exit Event from Deep Power Down
    specparam tdevice_DPDCSL = 20;
    // Warm HW reset
    specparam tdevice_RPH    = 40;
    // Refresh time
    specparam tdevice_REF100 = 40;
    // Page Open Time
    specparam tdevice_PO100 = 40;
    ```

2. Make a wrapper module for better experience and make sure to use signal names in lowercase in wrapper module as shown in [`test/wrapper_ram.v`](https://github.com/meeeeet/cocotbext_hyperbus/blob/main/tests/wrapper_ram.v).

### HyperBus

The `HyperBusController` class can be used to drive and receive data from HyperRAM.

To use these modules, import the one you need and connect it to the DUT:

    from cocotbext_hyperbus import HyperBusController
    @cocotb.test()
    async def sample_test(dut):
        hbc=HyperBusController(dut)

#### Methods

* `Reset(dut)`: Reset the _dut_
* `WriteReg(addr,data)`: Write _data_ into register at _addr_
* `ReadReg(addr)`: Read from register at _addr_
* `generate_random_data(len)`: Generate random 32-bit data of _len_ length
* `WriteMem(addr,data)`: Write _data_ into memory at _addr_
* `ReadMem(addr,len)`: Read _len_ 32-bit data from memory starting from _addr_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/meeeeet/cocotbext_hyperbus",
    "name": "cocotbext-hyperbus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "cocotb, HyperBus",
    "author": "Meet Sangani",
    "author_email": "meet.sangani@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/5f/4d/5c8f91c49d8a5536d9f55470c56329ecfed6fb15db0fb8d00be6676c63be/cocotbext_hyperbus-0.2.2.tar.gz",
    "platform": null,
    "description": "# cocotb extension for HyperBus\n\n[![PyPI version](https://badge.fury.io/py/cocotbext-hyperbus.svg)](https://badge.fury.io/py/cocotbext-hyperbus)\n\n## Installation\n\nInstallation from pip (release version, stable):\n\n    pip install cocotbext-hyperbus\n\nInstallation for active development:\n\n    git clone https://github.com/meeeeet/cocotbext_hyperbus\n    pip install -e cocotbext_hyperbus\n\n## Documentation and usage examples\n\nSee the `tests` directory for complete testbenches using these modules.\n\n### Configuration\n\n1. Alter the following parameter in the Infineon HyperRAM RTL code to avoid the cocotb having to wait a long time and the simulation crashing.\n\n    ```\n    // tdevice values: values for internal delays\n    // power-on reset\n    specparam tdevice_VCS    = 150;\n    // Deep Power Down to Idle wake up time\n    specparam tdevice_DPD    = 150;\n    // Exit Event from Deep Power Down\n    specparam tdevice_DPDCSL = 20;\n    // Warm HW reset\n    specparam tdevice_RPH    = 40;\n    // Refresh time\n    specparam tdevice_REF100 = 40;\n    // Page Open Time\n    specparam tdevice_PO100 = 40;\n    ```\n\n2. Make a wrapper module for better experience and make sure to use signal names in lowercase in wrapper module as shown in [`test/wrapper_ram.v`](https://github.com/meeeeet/cocotbext_hyperbus/blob/main/tests/wrapper_ram.v).\n\n### HyperBus\n\nThe `HyperBusController` class can be used to drive and receive data from HyperRAM.\n\nTo use these modules, import the one you need and connect it to the DUT:\n\n    from cocotbext_hyperbus import HyperBusController\n    @cocotb.test()\n    async def sample_test(dut):\n        hbc=HyperBusController(dut)\n\n#### Methods\n\n* `Reset(dut)`: Reset the _dut_\n* `WriteReg(addr,data)`: Write _data_ into register at _addr_\n* `ReadReg(addr)`: Read from register at _addr_\n* `generate_random_data(len)`: Generate random 32-bit data of _len_ length\n* `WriteMem(addr,data)`: Write _data_ into memory at _addr_\n* `ReadMem(addr,len)`: Read _len_ 32-bit data from memory starting from _addr_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A cocotb extension for HyperBus controllers",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/meeeeet/cocotbext_hyperbus"
    },
    "split_keywords": [
        "cocotb",
        " hyperbus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9108f9023eb15b3d40b5796c249a99326aa26ea99ff8d163d902f1049b903599",
                "md5": "7284807b489fb59fd45bdf4ba611ae8f",
                "sha256": "8a63c25b389d0fa176d2db0b752f796c344b933aa8a414ca77288a44fb9e0409"
            },
            "downloads": -1,
            "filename": "cocotbext_hyperbus-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7284807b489fb59fd45bdf4ba611ae8f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6658,
            "upload_time": "2024-06-24T10:57:22",
            "upload_time_iso_8601": "2024-06-24T10:57:22.650521Z",
            "url": "https://files.pythonhosted.org/packages/91/08/f9023eb15b3d40b5796c249a99326aa26ea99ff8d163d902f1049b903599/cocotbext_hyperbus-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f4d5c8f91c49d8a5536d9f55470c56329ecfed6fb15db0fb8d00be6676c63be",
                "md5": "45bd6eef510863250ff099a2c576d666",
                "sha256": "63493a04f1a2f1dc6af934d7046a6b47ee90cbcbb5534d3a5d7e6eb784686623"
            },
            "downloads": -1,
            "filename": "cocotbext_hyperbus-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "45bd6eef510863250ff099a2c576d666",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6024,
            "upload_time": "2024-06-24T10:57:25",
            "upload_time_iso_8601": "2024-06-24T10:57:25.360182Z",
            "url": "https://files.pythonhosted.org/packages/5f/4d/5c8f91c49d8a5536d9f55470c56329ecfed6fb15db0fb8d00be6676c63be/cocotbext_hyperbus-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-24 10:57:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "meeeeet",
    "github_project": "cocotbext_hyperbus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cocotbext-hyperbus"
}
        
Elapsed time: 4.60406s