Skip to main content

peakrdl-cocotb-ralgen

A SystemRDL to Raltest converter for cocotb.

Installation

pip3 install peakrdl-cocotb-ralgen

Usage

peakrdl cocotb_ralgen <SystemRDL File> -o <output folder>
peakrdl python <SystemRDL File> -o <output folder>

Then in your cocotb test file

from <AddrMap Name>_RAL import <AddrMap Name>_RAL_Test
...
ral=<AddrMap Name>_RAL_Test(regmodel)
from <AddrMap_Name>_RAL import <AddrMap_Name>_RAL_Test as RAL
@cocotb.test
async def test_ral(dut):
    env=Env(dut)
    await env.ral.rw_test()
...

And in your cocotb env file

from <AddrMap_Name>.reg_model.<AddrMap_Name> import <AddrMap_Name>_cls
from <AddrMap_Name>.lib  import AsyncCallbackSet
from <AddrMap_Name>_RAL import <AddrMap_Name>_RAL_Test as RAL
class Env:
     def __init__(dut,...):
	self.reg=<AddrMap_Name>_cls(
		 callbacks=AsyncCallbackSet(
		    read_callback=self.readReg,
		    write_callback=self.writeReg
		    ))
        self.ral=RAL(self.reg)
    async def ral_rw(self):
        self.ral.rw_test()
...

To support background read and writes you need to create callbacks which will return the signal value for a complete working example check the tests folder.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peakrdl_cocotb_ralgen-0.1.3.post21.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peakrdl_cocotb_ralgen-0.1.3.post21-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file peakrdl_cocotb_ralgen-0.1.3.post21.tar.gz.

File metadata

  • Download URL: peakrdl_cocotb_ralgen-0.1.3.post21.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for peakrdl_cocotb_ralgen-0.1.3.post21.tar.gz
Algorithm Hash digest
SHA256 e80bb0e959f89a22399c3875ded890b9466c95c8c66c424eebbdd900b712665f
MD5 2811cb67b27d559aa3929e55a92cdb6f
BLAKE2b-256 8bd787cb1ffc3040615d33078a9e3350eb24aa7f6cbb1b070d1b61fe73645bff

See more details on using hashes here.

File details

Details for the file peakrdl_cocotb_ralgen-0.1.3.post21-py3-none-any.whl.

File metadata

File hashes

Hashes for peakrdl_cocotb_ralgen-0.1.3.post21-py3-none-any.whl
Algorithm Hash digest
SHA256 b86bfa9fdd5539b7c9214babc1ca2a21b472a965d1ccbe35619bca0b76b3d5f0
MD5 9e8f7e9d667076a138edf86994dc5a79
BLAKE2b-256 ff89db73fd0e645ccacfa59993504d875f6c5ea6ac8c95a76a34bcaf2ba3e491

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7.post9

2 files

0.1.7.post2

2 files

0.1.7

2 files

0.1.6.post4

2 files

0.1.6

2 files

0.1.5.post8

2 files

0.1.5.post5

2 files

0.1.5.post4

2 files

0.1.5.post3

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3.post32

2 files

0.1.3.post30

2 files

0.1.3.post29

2 files

0.1.3.post28

2 files

0.1.3.post27

2 files

0.1.3.post26

2 files

0.1.3.post25

2 files

0.1.3.post24

2 files

0.1.3.post23

2 files

0.1.3.post22

2 files

This release

0.1.3.post21 This release

2 files

0.1.3.post20

2 files

0.1.3.post19

2 files

0.1.3.post18

2 files

0.1.3.post14

2 files

0.1.3.post12

2 files

0.1.3.post11

2 files

0.1.3.post8

2 files

0.1.3.post7

2 files

0.1.0

2 files

0.0.post1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page