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.3.tar.gz (8.2 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.3-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peakrdl_bsv-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.0 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for peakrdl_bsv-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e508332c188cf3123987f8bcb01773bb0cde3a5a0fc01073241f2b991950a5c6
MD5 70752052753ca7d4b948dfffb08ced87
BLAKE2b-256 0def4982ec069bb43bf8590b8e449f14b76ddb30cfce171739168cee3bae444b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: peakrdl_bsv-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.0 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for peakrdl_bsv-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a33682a99211cda46116a88ad679b4e46d74a8bd9c81d16fde19a4906dda39a
MD5 15227bee05a315a3ff5b6fcc4c56efea
BLAKE2b-256 66e73d1ae72309ba556d978d2846f9585304365a95dbd746aadb72bd26cf4d77

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