Generate python wrapper for a register model compiled SystemRDL input
Project description
PeakRDL-python
Generate Python wrapper for a register model compiled SystemRDL input
Installing
Install from github only at the moment.
Exporter Usage
Pass the elaborated output of the SystemRDL Compiler to the exporter.
import sys
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl.python.exporter import PythonExporter
rdlc = RDLCompiler()
try:
rdlc.compile_file("path/to/my.rdl")
root = rdlc.elaborate()
except RDLCompileError:
sys.exit(1)
exporter = PythonExporter()
exporter.export(root, "path/to/output")
The exporter will create a python package in the specified output directory consists of the python wrapper and a test bench for the wrapper which can be run within a unittest framework.
Reference
PythonExporter(**kwargs)
Constructor for the Python Exporter class
Optional Parameters
user_template_dir- Path to a directory where user-defined template overrides are stored.
user_template_context- Additional context variables to load into the template namespace.
PythonExporter.export(node, path, **kwargs)
Perform the export!
Parameters
node- Top-level node to export. Can be the top-level
RootNodeor any internalAddrmapNode.
- Top-level node to export. Can be the top-level
path- Output directory.
autoformatoutputs- True - All the generated code is run through autopep8 (warning this can be slow for large designs)
Project details
Release history Release notifications | RSS feed
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-python-0.0.9.tar.gz.
File metadata
- Download URL: peakrdl-python-0.0.9.tar.gz
- Upload date:
- Size: 36.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.7.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75458b1f3036c58d314d1316a4aab340a64150f9463f7489a4ef509bd48ea155
|
|
| MD5 |
7cc01b67a43d99ccbcd17fb2107be7e1
|
|
| BLAKE2b-256 |
44722239696c119921401af064fa2d19a48a666eeb4cd36d41721e53eb450a5f
|
File details
Details for the file peakrdl_python-0.0.9-py3-none-any.whl.
File metadata
- Download URL: peakrdl_python-0.0.9-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.7.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea47b841cf1016a3407369a4c857e7b059a8b5518e269b0ad1e27f998e7cb7c
|
|
| MD5 |
d6786e85ac1b74a7fb0417c645e7fc65
|
|
| BLAKE2b-256 |
9d85c56da3cd9ff7eb69602b5b1d4dae5cce0a467df4e74e24bef850c7147821
|