Skip to content

Added WARL/WLRL CSR AsciiDoc appendix include files like already have for parameters#235

Merged
james-ball-qualcomm merged 5 commits intomainfrom
add_csr_table
Mar 25, 2026
Merged

Added WARL/WLRL CSR AsciiDoc appendix include files like already have for parameters#235
james-ball-qualcomm merged 5 commits intomainfrom
add_csr_table

Conversation

@james-ball-qualcomm
Copy link
Copy Markdown
Collaborator

No description provided.

… for parameters

Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Copilot AI review requested due to automatic review settings March 25, 2026 18:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CSR appendix generator that mirrors the existing parameter appendix workflow, producing per-CSR AsciiDoc row fragments and higher-level include files driven by a CSR table-layout YAML.

Changes:

  • Introduces tools/create_csr_appendix.py plus schemas/csr-table-schema.json and a default CSR table layout YAML.
  • Refactors shared appendix-generation helpers into tools/appendix_shared_utils.py and updates create_param_appendix.py to use it.
  • Extends Makefile-based golden-output testing to cover CSR appendix generation and table-layout variants.

Reviewed changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/default_csr_table.yaml Adds default CSR table column layout/widths.
tools/create_param_appendix.py Switches to shared appendix helper utilities.
tools/create_csr_appendix.py New CSR appendix generator producing per-CSR fragments and include files.
tools/appendix_shared_utils.py New shared helpers for appendix generators (filename, header, cols spec, norm-rule inference).
tools/README.md Documents the new CSR appendix generator CLI and outputs.
tests/params/test-csr-table-reordered.yaml Test CSR table layout variant (reordered columns).
tests/params/test-csr-table-minimal.yaml Test CSR table layout variant (minimal columns).
tests/params/test-csr-table-full-default.yaml Test CSR table layout variant matching defaults.
tests/params/test-csr-appendix.adoc Test harness AsciiDoc that includes generated CSR appendix outputs.
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/zort.XYZ.adoc Golden expected CSR row fragment (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/wlrl_csrs.adoc Golden expected per-category include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/warl_csrs.adoc Golden expected per-category include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/qux.QQQ.adoc Golden expected CSR row fragment (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/foo.GHI.adoc Golden expected CSR row fragment (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/foo.ABC.adoc Golden expected CSR row fragment (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch2/all_csrs.adoc Golden expected chapter-level include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch1/warl_csrs.adoc Golden expected per-category include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch1/satp.MODE.adoc Golden expected CSR row fragment (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/test-ch1/all_csrs.adoc Golden expected chapter-level include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/all_csrs_by_chapter.adoc Golden expected top-level by-chapter table include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-reordered/all_csrs_a_to_z.adoc Golden expected top-level A–Z table include (reordered variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/zort.XYZ.adoc Golden expected CSR row fragment (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/wlrl_csrs.adoc Golden expected per-category include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/warl_csrs.adoc Golden expected per-category include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/qux.QQQ.adoc Golden expected CSR row fragment (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/foo.GHI.adoc Golden expected CSR row fragment (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/foo.ABC.adoc Golden expected CSR row fragment (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch2/all_csrs.adoc Golden expected chapter-level include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch1/warl_csrs.adoc Golden expected per-category include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch1/satp.MODE.adoc Golden expected CSR row fragment (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/test-ch1/all_csrs.adoc Golden expected chapter-level include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/all_csrs_by_chapter.adoc Golden expected top-level by-chapter table include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-minimal/all_csrs_a_to_z.adoc Golden expected top-level A–Z table include (minimal variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/zort.XYZ.adoc Golden expected CSR row fragment (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/wlrl_csrs.adoc Golden expected per-category include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/warl_csrs.adoc Golden expected per-category include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/qux.QQQ.adoc Golden expected CSR row fragment (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/foo.GHI.adoc Golden expected CSR row fragment (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/foo.ABC.adoc Golden expected CSR row fragment (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch2/all_csrs.adoc Golden expected chapter-level include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch1/warl_csrs.adoc Golden expected per-category include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch1/satp.MODE.adoc Golden expected CSR row fragment (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/test-ch1/all_csrs.adoc Golden expected chapter-level include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/all_csrs_by_chapter.adoc Golden expected top-level by-chapter table include (full-default variant).
tests/params/expected/test-csr-table-variants/test-csr-table-full-default/all_csrs_a_to_z.adoc Golden expected top-level A–Z table include (full-default variant).
tests/params/expected/test-csr-appendix.adoc Golden expected top-level CSR appendix include harness.
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/zort.XYZ.adoc Golden expected generated CSR fragment (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/wlrl_csrs.adoc Golden expected per-category include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/warl_csrs.adoc Golden expected per-category include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/qux.QQQ.adoc Golden expected generated CSR fragment (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/foo.GHI.adoc Golden expected generated CSR fragment (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/foo.ABC.adoc Golden expected generated CSR fragment (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch2/all_csrs.adoc Golden expected chapter include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch1/warl_csrs.adoc Golden expected per-category include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch1/satp.MODE.adoc Golden expected generated CSR fragment (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/test-ch1/all_csrs.adoc Golden expected chapter include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/all_csrs_by_chapter.adoc Golden expected top-level by-chapter include (default CSR appendix run).
tests/params/expected/test-csr-appendix-adoc-includes/all_csrs_a_to_z.adoc Golden expected top-level A–Z include (default CSR appendix run).
schemas/csr-table-schema.json New JSON Schema for CSR table layout YAML files.
Makefile Adds build/compare/update test targets for CSR appendix generation and table variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/params/test-csr-table-reordered.yaml Outdated
Comment thread tools/README.md Outdated
Comment thread tools/create_csr_appendix.py Outdated
Comment thread tools/create_csr_appendix.py Outdated
Comment thread tools/default_csr_table.yaml Outdated
Comment thread tests/params/test-csr-table-full-default.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

@james-ball-qualcomm I've opened a new pull request, #236, to work on those changes. Once the pull request is ready, I'll request review from you.

james-ball-qualcomm and others added 3 commits March 25, 2026 11:52
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com>
Agent-Logs-Url: https://github.com/riscv/docs-resources/sessions/97879fc1-cfcc-4840-9ac8-a85f60aa5b19
Validate `category` field before use as dict key in CSR appendix generation
@james-ball-qualcomm james-ball-qualcomm merged commit 29879cc into main Mar 25, 2026
2 checks passed
@james-ball-qualcomm james-ball-qualcomm deleted the add_csr_table branch March 25, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants