Skip to content

Commit

Permalink
docs: Add peripheral registers
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Aug 21, 2023
1 parent 1183399 commit 9a4d515
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: publish-docs
on:
push:
branches: [main]
branches: [docs]
workflow_dispatch:
jobs:
deploy:
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: mattnotmitt/doxygen-action@v1
with:
working-directory: sw/
- name: Generate Runtime Documentation
- name: Generate runtime documentation
# yamllint disable rule:line-length
run: |
mkdir doxybook2; cd doxybook2
Expand All @@ -29,5 +29,9 @@ jobs:
./doxybook2/bin/doxybook2 --input sw/doxygen/xml --output docs/runtime --config docs/doxybook2.json
rm -rf doxybook2
# yamllint enable rule:line-length
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --force
- name: Generate peripheral registers documentation
run: make docs
- name: Install Python requirements
run: pip install -r docs/requirements.txt
- name: Build and deploy documentation
run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
axi_riscv_atomics: { git: https://github.com/pulp-platform/axi_riscv_atomics, version: 0.6.0 }
common_cells: { git: https://github.com/pulp-platform/common_cells, version: 1.28.0 }
FPnew: { git: https://github.com/openhwgroup/cvfpu, rev: 1202ca3 } # TODO: Update to next release
register_interface: { git: https://github.com/pulp-platform/register_interface, version: 0.3.3 }
register_interface: { git: https://github.com/pulp-platform/register_interface, rev: patch/markdown-docs }
tech_cells_generic: { git: https://github.com/pulp-platform/tech_cells_generic, version: 0.2.11 }
riscv-dbg: { git: https://github.com/pulp-platform/riscv-dbg, rev: ec0d92fa5fdaaf611e5b8a4cc8ee84017ff98710 }

Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
REGGEN = $(shell bender path register_interface)/vendor/lowrisc_opentitan/util/regtool.py

Check failure on line 1 in Makefile

View workflow job for this annotation

GitHub Actions / Check License headers

FAILED: File does not start with comment

.PHONY: all docs
.PHONY: clean clean-docs

all: docs
clean: clean-docs

docs: docs/generated/peripherals.md

clean-docs:
rm -rf docs/generated/peripherals.md

docs/generated/peripherals.md: hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson
$(REGGEN) -d $< > $@
5 changes: 5 additions & 0 deletions docs/rm/peripherals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Snitch Cluster peripherals

This section documents the registers exposed by the Snitch cluster to interface with various cluster-level peripherals, including the performance counters.

{% include-markdown 'generated/peripherals.md' %}
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ nav:
- Snitch: rm/snitch.md
- Snitch Cluster:
- Overview: rm/snitch_cluster.md
- Peripherals: rm/peripherals.md
- Schema: schema-doc/snitch_cluster.md
- Reqrsp Interface: rm/reqrsp_interface.md
- Custom Instructions: rm/custom_instructions.md
Expand Down

0 comments on commit 9a4d515

Please sign in to comment.