Skip to content

Commit

Permalink
[ipgen,pinmux] Fix documentation collateral
Browse files Browse the repository at this point in the history
Part of pinmux lowRISC#8440

Signed-off-by: Guillermo Maturana <[email protected]>
  • Loading branch information
matutem committed Oct 22, 2024
1 parent 4cc7823 commit 269ad39
Show file tree
Hide file tree
Showing 7 changed files with 602 additions and 14 deletions.
3 changes: 1 addition & 2 deletions BLOCKFILE
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ hw/ip/lc_ctrl/rtl/*
hw/ip/otbn/rtl/*
hw/ip/otp_ctrl/rtl/*
hw/ip/pattgen/rtl/*
hw/ip/pinmux/rtl/*
hw/ip/prim/rtl/*
hw/ip/prim_generic/rtl/*
hw/ip/prim_xilinx/rtl/*
Expand All @@ -73,7 +72,6 @@ hw/ip/usbdev/rtl/*
# too broad and will also block DV-only files)
hw/ip/lc_ctrl/data/lc_ctrl.hjson
hw/ip/rv_timer/data/rv_timer.hjson
hw/ip/pinmux/data/pinmux.hjson.tpl
hw/ip/spi_host/data/spi_host.hjson
hw/ip/spi_device/data/spi_device.hjson
hw/ip/adc_ctrl/data/adc_ctrl.hjson
Expand Down Expand Up @@ -115,6 +113,7 @@ hw/top_earlgrey/ip/ast/data/ast.hjson
hw/top_earlgrey/ip_autogen/alert_handler/data/alert_handler.hjson
hw/top_earlgrey/ip_autogen/clkmgr/data/clkmgr.hjson
hw/top_earlgrey/ip_autogen/flash_ctrl/data/flash_ctrl.hjson
hw/top_earlgrey/ip_autogen/pinmux/data/pinmux.hjson
hw/top_earlgrey/ip_autogen/pwrmgr/data/pwrmgr.hjson
hw/top_earlgrey/ip_autogen/rstmgr/data/rstmgr.hjson
hw/top_earlgrey/ip_autogen/rv_plic/data/rv_plic.hjson
Expand Down
190 changes: 190 additions & 0 deletions hw/top_earlgrey/ip_autogen/pinmux/doc/pinout_asic.md

Large diffs are not rendered by default.

195 changes: 195 additions & 0 deletions hw/top_earlgrey/ip_autogen/pinmux/doc/pinout_cw310.md

Large diffs are not rendered by default.

194 changes: 194 additions & 0 deletions hw/top_earlgrey/ip_autogen/pinmux/doc/pinout_cw340.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions hw/top_earlgrey/ip_autogen/pinmux/doc/targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# "top_earlgrey" Pinmux Targets
<!--
DO NOT EDIT THIS FILE DIRECTLY.
It has been generated with the following command:
util/topgen.py -t hw/top_earlgrey/data/top_earlgrey.hjson -o hw/top_earlgrey/
-->
| Target Name | #IO Banks | #Muxed Pads | #Direct Pads | #Manual Pads | #Total Pads | Pinout / Pinmux Tables |
|:-------------:|:-----------:|:-------------:|:--------------:|:--------------:|:-------------:|:---------------------------------:|
| ASIC | 4 | 47 | 14 | 9 | 70 | [Pinout Table](./pinout_asic.md) |
| CW310 | 4 | 47 | 14 | 14 | 75 | [Pinout Table](./pinout_cw310.md) |
| CW340 | 4 | 47 | 14 | 13 | 74 | [Pinout Table](./pinout_cw340.md) |
8 changes: 4 additions & 4 deletions util/mdbook_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
REPO_TOP / "hw/ip/usbdev/data/usbdev.hjson",
],
'top_earlgrey': [
(
REPO_TOP / "hw/top_earlgrey/ip/pinmux/data/autogen/pinmux.hjson",
REPO_TOP / "hw/ip/pinmux/",
),
(
REPO_TOP / "hw/top_earlgrey/ip_autogen/clkmgr/data/clkmgr.hjson",
REPO_TOP / "hw/top_earlgrey/ip_autogen/clkmgr/",
Expand All @@ -61,6 +57,10 @@
REPO_TOP / "hw/top_earlgrey/ip_autogen/flash_ctrl/data/flash_ctrl.hjson",
REPO_TOP / "hw/top_earlgrey/ip_autogen/flash_ctrl/",
),
(
REPO_TOP / "hw/top_earlgrey/ip_autogen/pinmux/data/pinmux.hjson",
REPO_TOP / "hw/top_earlgrey/ip_autogen/pinmux/",
),
(
REPO_TOP / "hw/top_earlgrey/ip_autogen/pwrmgr/data/pwrmgr.hjson",
REPO_TOP / "hw/top_earlgrey/ip_autogen/pwrmgr/",
Expand Down
15 changes: 7 additions & 8 deletions util/topgen/gen_top_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,20 @@ def create_pinmux_table(top, c_helper):
def gen_pinmux_docs(top, c_helper, out_path):
"""Generate pinmux/pinout summary table and linked pinout subtables for each target.
All files are placed into an 'autogen' dir within the top's ip/pinmux/doc directory.
All files are placed in the top's ip_autogen/pinmux/doc directory.
e.g.
<out_path>
└── ip
└── ip_autogen
└── pinmux
└── doc
└── autogen
├── pinout_asic.md # subtable
├── pinout_cw310.md # subtable
├── pinout_cw340.md # subtable
└── targets.md # Summary table
├── pinout_asic.md # subtable
├── pinout_cw310.md # subtable
├── pinout_cw340.md # subtable
└── targets.md # Summary table
"""

# 'out_path' is the top-level directory for a generated top (e.g. hw/top_earlgrey)
pinmux_top_doc_path = out_path / 'ip' / 'pinmux' / 'doc' / 'autogen'
pinmux_top_doc_path = out_path / 'ip_autogen' / 'pinmux' / 'doc'
pinmux_top_doc_path.mkdir(parents=True, exist_ok=True)

gencmd = ("util/topgen.py -t hw/top_{topname}/data/top_{topname}.hjson "
Expand Down

0 comments on commit 269ad39

Please sign in to comment.