Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Nov 8, 2023
1 parent 993460c commit 83584b9
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,36 @@ Install from [PyPi](https://pypi.org/project/peakrdl-html) using pip:

## Example

An [example of HTML output](https://systemrdl.github.io/PeakRDL-html) generated from a
fictional SystemRDL register description: [turboencabulator.rdl](example/turboencabulator.rdl).
The easiest way to use PeakRDL-ipxact is via the `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_:

.. code-block:: bash

## Usage
Pass the elaborated output of the [SystemRDL Compiler](http://systemrdl-compiler.readthedocs.io)
into the exporter.
# Install the command line tool
python3 -m pip install peakrdl

Assuming `root` is the elaborated top-level node, or an internal `AddrmapNode`:
# Generate HTML
peakrdl html your_design.rdl -o output_dir

```python
from peakrdl_html import HTMLExporter

exporter = HTMLExporter()
Here is an [example of HTML output](https://systemrdl.github.io/PeakRDL-html) generated from a
fictional SystemRDL register description: [turboencabulator.rdl](example/turboencabulator.rdl).

exporter.export(root, "path/to/output")

## PeakRDL TOML config options

If using the [PeakRDL command-line tool](https://peakrdl.readthedocs.io), some
additional things can be configured via the TOML configuration file.

```toml
[html]
user_template_dir = "path/to/dir/"
user_static_dir = "path/to/dir/"
extra_doc_properties = ["list", "of", "properties"]
generate_source_links = false
```



## Reference

### `HTMLExporter(**kwargs)`
Expand Down Expand Up @@ -90,15 +101,16 @@ Perform the export!
* Control whether nodes with `ispresent=false` are generated. Default is True.


## PeakRDL TOML config options
### API Example
Pass the elaborated output of the [SystemRDL Compiler](http://systemrdl-compiler.readthedocs.io)
into the exporter.

If using the [PeakRDL command-line tool](https://peakrdl.readthedocs.io), some
additional things can be configured via the TOML configuration file.
Assuming `root` is the elaborated top-level node, or an internal `AddrmapNode`:

```toml
[html]
user_template_dir = "path/to/dir/"
user_static_dir = "path/to/dir/"
extra_doc_properties = ["list", "of", "properties"]
generate_source_links = false
```python
from peakrdl_html import HTMLExporter

exporter = HTMLExporter()

exporter.export(root, "path/to/output")
```

0 comments on commit 83584b9

Please sign in to comment.