PeakRDL-fw-hdl
A PeakRDL export plug-in that turns a SystemRDL
register model into a Featherweight-HDL register description — the
SystemVerilog class form built on fw_reg_block #(W) / fw_reg #(T).
The output is class-level model source, not RTL and not a UVM RAL model: it is consumed both by simulation testbenches and by fw-hdl's own synthesis front end, which lowers it to a register-block module.
Install
pip install peakrdl-fw-hdl[cli]
Use
peakrdl fw-hdl my_ip.rdl -o my_ip_reg_pkg.sv
In goes SystemRDL:
reg dma_ch_csr {
field { sw = rw; hw = r; } ch_en[0:0];
field { sw = r; hw = w; } busy[10:10];
field { sw = r; hw = w; onread = rclr; } int_done[21:21];
};
addrmap dma_regs {
dma_ch_csr csr @ 0x0;
};
Out comes the fw-hdl idiom:
package dma_reg_pkg;
import fw_hdl_pkg::*;
typedef struct packed {
bit [9:0] reserved_31_22; // 31:22 RESERVED
bit int_done; // 21 ROC
bit [9:0] reserved_20_11; // 20:11 RESERVED
bit busy; // 10 RO
bit [8:0] reserved_9_1; // 9:1 RESERVED
bit ch_en; // 0 RW
} dma_ch_csr_t;
class dma_regs extends fw_reg_block #(32);
fw_reg #(dma_ch_csr_t) csr; // 0x0000
function new(string name);
super.new(name);
csr = new("csr", this, 'h0,
.sw_wmask(dma_ch_csr__sw_wmask()),
.hw_wmask(dma_ch_csr__hw_wmask()),
.rclr_mask(dma_ch_csr__rclr_mask()));
endfunction
static function dma_ch_csr_t dma_ch_csr__sw_wmask();
return '{ ch_en:1, default:'0 };
endfunction
// ... hw_wmask, rclr_mask
endclass
endpackage: dma_reg_pkg
SystemRDL says more than fw-hdl's four behavior words (reset, sw_wmask,
hw_wmask, rclr_mask) can express. Everything that does not fit is reported at
the field that caused it, with a stable message code, and annotated in the
generated source — never silently changed. --strict turns those reports into
errors.
Documentation
docs/— installation, usage, the normative mapping reference, and the limitations tabledocs/design.md— why the mapping is what it is- Featherweight HDL — the register class library this targets
License
Apache-2.0
Metadata
Release files for peakrdl-fw-hdl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| peakrdl_fw_hdl-0.1.0.tar.gz | 84.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| peakrdl_fw_hdl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 121.4 kB
Release files / peakrdl_fw_hdl-0.1.0.tar.gz
| Download URL | peakrdl_fw_hdl-0.1.0.tar.gz |
|---|---|
| Size | 84.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6248553d10f2cc45ff368aaa761b3af780756595e635025e7905d4dc5490f31b
|
|
BLAKE2b-256 checksum How to use checksums |
b4a3902e0cfcadc24bc5e44d9d9708948dd68a7877e08e1434d5ea87f3c7b4b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / peakrdl_fw_hdl-0.1.0-py3-none-any.whl
| Download URL | peakrdl_fw_hdl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9610753cb642f5f3de0dfef01669abcfec53a039d7589d168a0776b62a874eb1
|
|
BLAKE2b-256 checksum How to use checksums |
98b035f4e7b444fbad94f51d907a3e94e5327b68eab1b2b3ee783ada9039f047
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for peakrdl-fw-hdl 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.