Skip to main content

Export BSV description from the systemrdl-compiler register model

Project description

peakrdl-bsv Generating BSV Configuration registers from SystemRDL code.

Peakrdl plugin for generated bluespec rtl from system RDL file.

This plugin takes an input file.rdl and generates three bluespec files

  1. file_signal.bsv This contains the module definition of each individual signal in the rdl file.
  2. file_reg.bsv This groups the signals into their containing register module.
  3. file_csr.bsv This creates a module with the registers, address decoding and S/W read write methods.

Installation and usage

Installing the application

pip3 install peakrdl-bsv

Generating BSV files from test.rdl

	peakrdl bsv test.rdl -o .

This can then be used in your design as follows

import file_csr::*;
...
ConfigCSR_file csr <- mkConfigCSR_file;

rule xyz;
csr.reg.signal.write(...)
endrule

The hardware side methods defined on a signal module are

  • method Bool pulse() returns true when a 1 is written to the signal. self clearing.
  • method Bool swacc() returns true when a s/w read or write operation is performed.
  • method Bool swmod() returns true when a write or a read with sideeffect operation is performed.
  • method Bool anded() Returns an AND reduced value of the signal.
  • method Bool ored(); Returns an OR reduced value of the signal.
  • method Bool xored() Returns an XOR reduced value of the signal.
  • method Action clear() Set's the signal to 0.
  • method Action _write(Bit#(n) data) writes data to the register.
  • method Bit#(n) _read Returns the value of the register.

Example

To see an example

cd tests
make

This will generate the required files from the test.rdl file

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

peakrdl_bsv-0.0.4.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

peakrdl_bsv-0.0.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file peakrdl_bsv-0.0.4.tar.gz.

File metadata

  • Download URL: peakrdl_bsv-0.0.4.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for peakrdl_bsv-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0d203efa08f9d54e2d7794e6f079af9ecb3d796967ca7df0c3bd67be721f72d6
MD5 1bb39abb158f5cd90b8d722765cd9f9a
BLAKE2b-256 397ff37351b887033d2eb787fe9ff66c9248415222aeb4aba66439e6d2c69b3e

See more details on using hashes here.

File details

Details for the file peakrdl_bsv-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: peakrdl_bsv-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.6 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for peakrdl_bsv-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 190a0772de60656120ab3eab381a0d7b84dfdc583119b4d747c68d33577b8a93
MD5 70c5ace005349811b66042f20e11d2ef
BLAKE2b-256 396a5f03984dce5f6da5c895577ae61d1e909892578aab8793fb5cc6a5196112

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