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
file_signal.bsvThis contains the module definition of each individual signal in the rdl file.file_reg.bsvThis groups the signals into their containing register module.file_csr.bsvThis 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)writesdatato the register.method Bit#(n) _reaReturns 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peakrdl_bsv-0.0.1.tar.gz.
File metadata
- Download URL: peakrdl_bsv-0.0.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.22.4 CPython/3.12.9 Linux/5.15.0-1082-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d30d396a603494dcd0daba634fc0e2f570949edc28084a06660bc9e6a538f1f
|
|
| MD5 |
2d7c2506ebc9917279ea44b8a80e7d3a
|
|
| BLAKE2b-256 |
34503ba9544efbac8c19e29c295b291c70af9fd2550709aa579eb01286a37d16
|
File details
Details for the file peakrdl_bsv-0.0.1-py3-none-any.whl.
File metadata
- Download URL: peakrdl_bsv-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.22.4 CPython/3.12.9 Linux/5.15.0-1082-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cddda5b766a616b8f5b057aa3327fb5dbbb075adc438cc74a54a4e8f816bf11
|
|
| MD5 |
29e66208e12032eb892bfef5a5c96509
|
|
| BLAKE2b-256 |
0d2fd6f4d01aa58e4a61c2f5ee33df8fe88abb24332d36dd1ae70aeed6e429b6
|