Changed "type" to "enum" object that accepts more info.#230
Changed "type" to "enum" object that accepts more info.#230james-ball-qualcomm merged 10 commits intomainfrom
Conversation
Signed-off-by: James Ball <jameball@qti.qualcomm.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the CSR definition model to replace the previous type: [...] selector with an enum object that can carry both legal values and illegal-write behavior, and propagates that change through the generator, schemas, docs, and fixtures.
Changes:
- Add
enumsupport to type-string rendering and CSR HTML rendering. - Update CSR YAML ingestion + params JSON output to emit
enum: { legal, illegal-write-* }(and preserve original literal texts for HTML). - Update JSON schemas and test fixtures to reflect the new CSR encoding.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/shared_utils.py | Teach infer_param_type_string() to render enum.legal (integer list) as a bracketed enum display. |
| tools/create_params.py | Parse CSR enum object (legal + illegal-write behavior), preserve authored literal text for HTML, emit enum in CSR output. |
| tools/README.md | Document CSR selector change from type to enum and describe expected fields. |
| tests/shared_utils/test_shared_utils.py | Add success case + update fatal-message expectation for infer_param_type_string() with enum. |
| tests/params/test-ch2.yaml | Migrate CSR definitions from type to enum and add new enum test cases. |
| tests/params/expected/test-params.json | Update expected params JSON CSR entries to use enum output. |
| tests/params/expected/test-params.html | Update expected params HTML CSR rendering to show enum details and preserved literal text. |
| tests/norm-rule/test-ch2.yaml | Update normative rule names/tags to align with new CSR enum cases. |
| tests/norm-rule/test-ch2.adoc | Update normative tag anchors/text for the updated CSR enum rules. |
| tests/norm-rule/expected/test-norm-rules.json | Update expected normative rules JSON for renamed/added enum-related rules. |
| tests/norm-rule/expected/test-norm-rules.html | Update expected normative rules HTML tables/content for renamed/added enum-related rules. |
| tests/norm-rule/expected/test-ch2-norm-tags.json | Update expected tag map and section tag listings for renamed/added rules. |
| schemas/params-schema.json | Replace CSR output field type with enum and enforce mutual exclusivity with width/ro-mask. |
| schemas/param-defs-schema.json | Replace CSR input field type with enum in the parameter-definition YAML schema. |
| schemas/param-common-schema.json | Introduce csrEnum (input) and csrEnumOutput (output) shapes and rehome CSR enum validation there. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
|
@james-ball-qualcomm I've opened a new pull request, #231, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
|
@james-ball-qualcomm I've opened a new pull request, #232, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: James Ball <jameball@qti.qualcomm.com>
…utput schemas Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com> Agent-Logs-Url: https://github.com/riscv/docs-resources/sessions/696caf25-8347-46a3-a3c1-eb835d1cfd5c
[WIP] [WIP] Address feedback on "type" to "enum" object changes in PR #230
…h one of these pre-fab schemes. Signed-off-by: James Ball <jameball@qti.qualcomm.com>
3ca5f6b to
6572f1d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.