A cocotb extension for HyperBus controllers
Project description
cocotb extension for 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
-
Change the following parameter from the RTL code of Infineon's HyperRAM else the cocotb will have to wait for long duration and simulation may gets crash.
// 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;
-
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
.
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 dutWriteReg(addr,data)
: Write data into register at addrReadReg(addr)
: Read from register at addrgenerate_random_data(len)
: Generate random 32-bit data of len lengthWriteMem(addr,data)
: Write data into memory at addrReadMem(addr,len)
: Read len 32-bit data from memory starting from addr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cocotbext_hyperbus-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e9320db8f6c8b864a69bca601480f966edf5131d65f206f93ab9bfd87ff8ef |
|
MD5 | d978e6fdc84563f6b7b423921944b07a |
|
BLAKE2b-256 | 722d4a1d87ef59bae8f6181494a058b2864cf93103db81b78972361654bd745c |