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.5.tar.gz (9.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_bsv-0.0.5-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peakrdl_bsv-0.0.5.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for peakrdl_bsv-0.0.5.tar.gz
Algorithm Hash digest
SHA256 69c93f4a50b72887488e3dc6d846e8fb346ad3f99531ff63137bb2c67f425b40
MD5 98790caac06bcd9d8f5ee3fbe8da570d
BLAKE2b-256 15ae5a86fb4af9c2a60ac4ada385f6e1788bbedf47d801d490bb0b56c85dea22

See more details on using hashes here.

Provenance

The following attestation bundles were made for peakrdl_bsv-0.0.5.tar.gz:

Publisher: release.yml on jahagirdar/peakrdl-bsv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: peakrdl_bsv-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for peakrdl_bsv-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1843ac7e8c337f6895bea459163140a0d99a65d9480ad4f355f42dc8c437d2b
MD5 72a475a20cc3e90b50031c193e95ffad
BLAKE2b-256 499e5a1ad6eff568ed7dd953a26e6de00b634e440f22da304a2b670572fdf293

See more details on using hashes here.

Provenance

The following attestation bundles were made for peakrdl_bsv-0.0.5-py3-none-any.whl:

Publisher: release.yml on jahagirdar/peakrdl-bsv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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