diff --git a/tests/norm-rule/expected/test-ch1-norm-tags.json b/tests/norm-rule/expected/test-ch1-norm-tags.json index e6ff7b9..1b1167f 100644 --- a/tests/norm-rule/expected/test-ch1-norm-tags.json +++ b/tests/norm-rule/expected/test-ch1-norm-tags.json @@ -3,6 +3,7 @@ "norm:inline": "inside inline", "norm:inline-with-hash": "includes a hash # symbol.", "norm:extension-dependency": "The F extensions depends on the Zicsr extension.", + "norm:all-bases": "Everyone loves RISC-V!", "norm:clarification-without-text": "isn't clear enough.", "norm:clarification-with-text": "also isn't clear enough.", "norm:cat-colors": "Cats come in many colors.", @@ -81,6 +82,7 @@ "norm:inline", "norm:inline-with-hash", "norm:extension-dependency", + "norm:all-bases", "norm:clarification-without-text", "norm:clarification-with-text", "norm:cat-colors", diff --git a/tests/norm-rule/expected/test-norm-rules.html b/tests/norm-rule/expected/test-norm-rules.html index e948e90..23da350 100644 --- a/tests/norm-rule/expected/test-norm-rules.html +++ b/tests/norm-rule/expected/test-norm-rules.html @@ -223,7 +223,7 @@

82 Normative Rules: Includes 19 Implementation-D Rule's "instance" property - all_bases + ALL_BASES base Rule's "kind" property @@ -231,6 +231,10 @@

82 Normative Rules: Includes 19 Implementation-D Any Rule's "instance" property + + Everyone loves RISC-V! + norm:all-bases + clarification-without-text isn't clear enough. diff --git a/tests/norm-rule/expected/test-norm-rules.json b/tests/norm-rule/expected/test-norm-rules.json index 447cf39..1538984 100644 --- a/tests/norm-rule/expected/test-norm-rules.json +++ b/tests/norm-rule/expected/test-norm-rules.json @@ -74,7 +74,7 @@ "tags": [] }, { - "name": "all_bases", + "name": "ALL_BASES", "def_filename": "tests/norm-rule/test-ch1.yaml", "chapter_name": "One", "kind": "base", @@ -82,7 +82,15 @@ "instances": [ "Any" ], - "tags": [] + "tags": [ + { + "name": "norm:all-bases", + "context": false, + "text": "Everyone loves RISC-V!", + "tag_filename": "/build/test-ch1-norm-tags.json", + "stds_doc_url": "test-ch1.html" + } + ] }, { "name": "clarification-without-text", diff --git a/tests/norm-rule/test-ch1.adoc b/tests/norm-rule/test-ch1.adoc index f3cd308..ef8a3ca 100644 --- a/tests/norm-rule/test-ch1.adoc +++ b/tests/norm-rule/test-ch1.adoc @@ -29,6 +29,9 @@ Use inline anchor that [#norm:inline-with-hash]+includes a hash # symbol.+ [[norm:extension-dependency]] The F extensions depends on the Zicsr extension. +[[norm:all-bases]] +Everyone loves RISC-V! + // PASSES This normative text [#norm:clarification-without-text]#isn't clear enough.# This normative text [#norm:clarification-with-text]#also isn't clear enough.# diff --git a/tests/norm-rule/test-ch1.yaml b/tests/norm-rule/test-ch1.yaml index 2a035b9..0e951e7 100644 --- a/tests/norm-rule/test-ch1.yaml +++ b/tests/norm-rule/test-ch1.yaml @@ -29,9 +29,10 @@ normative_rule_definitions: - name: one_base kind: base instance: RV32I - - name: all_bases + - name: ALL_BASES kind: base instance: Any + tag: "norm:all-bases" - name: clarification-without-text tag: "norm:clarification-without-text" clarification-link: https://www.github.com/riscv/jfkd/issues/67 diff --git a/tests/params/expected/test-params.html b/tests/params/expected/test-params.html index ad851d6..a2a91a0 100644 --- a/tests/params/expected/test-params.html +++ b/tests/params/expected/test-params.html @@ -33,7 +33,7 @@ .sticky-caption{position:sticky;top:0;background:#fff;padding:8px 0;z-index:1} .col-name{width:18%} .col-type{width:22%} - .col-extensions{width:18%} + .col-bases-extensions{width:18%} .col-descriptions{width:42%} @media (max-width: 1000px){ .app{grid-template-columns:1fr} @@ -47,25 +47,25 @@
-

17 Parameters

+

18 Parameters

- + - + - + @@ -143,6 +143,12 @@

17 Parameters

+ + + + + +
Chapter One: 12 ParametersChapter One: 13 Parameters
Parameter NameTypeExtension(s)Description(s)
Parameter NameTypeBases/ExtensionsDescription(s)
Zch1-A, Zch1-B This is a list with values 1, 2 and 4.
ALL_BASESint2AnyEveryone loves RISC-V!
@@ -153,11 +159,11 @@

17 Parameters

- + - Parameter NameTypeExtension(s)Description(s) + Parameter NameTypeBases/ExtensionsDescription(s) diff --git a/tests/params/expected/test-params.json b/tests/params/expected/test-params.json index 0d55182..1b641df 100644 --- a/tests/params/expected/test-params.json +++ b/tests/params/expected/test-params.json @@ -407,6 +407,38 @@ } ] }, + { + "name": "ALL_BASES", + "def_filename": "test-ch1.yaml", + "chapter_name": "One", + "type": "int2", + "json-schema": { + "type": "integer", + "minimum": -2, + "maximum": 1 + }, + "impl-defs": [ + { + "name": "ALL_BASES", + "def_filename": "tests/norm-rule/test-ch1.yaml", + "chapter_name": "One", + "kind": "base", + "impl-def-behavior": false, + "instances": [ + "Any" + ], + "tags": [ + { + "name": "norm:all-bases", + "context": false, + "text": "Everyone loves RISC-V!", + "tag_filename": "/build/test-ch1-norm-tags.json", + "stds_doc_url": "test-ch1.html" + } + ] + } + ] + }, { "name": "ROSE_COLORS", "def_filename": "test-ch2.yaml", diff --git a/tests/params/test-ch1.yaml b/tests/params/test-ch1.yaml index fc4744d..f14c2e1 100644 --- a/tests/params/test-ch1.yaml +++ b/tests/params/test-ch1.yaml @@ -42,3 +42,6 @@ parameter_definitions: - name: LIST_INT impl-def: LIST_INT type: [1, 2, 4] + - name: ALL_BASES + impl-def: ALL_BASES + type: int2 diff --git a/tools/create_params.py b/tools/create_params.py index 96713be..a3988e9 100644 --- a/tools/create_params.py +++ b/tools/create_params.py @@ -522,7 +522,7 @@ def html_head(f, table_names: List[str]): .sticky-caption{position:sticky;top:0;background:#fff;padding:8px 0;z-index:1} .col-name{width:18%} .col-type{width:22%} - .col-extensions{width:18%} + .col-bases-extensions{width:18%} .col-descriptions{width:42%} @media (max-width: 1000px){ .app{grid-template-columns:1fr} @@ -596,11 +596,11 @@ def html_table_header(f, table_name: str, table_caption: str): f.write(' \n') f.write(' \n') f.write(' \n') - f.write(' \n') + f.write(' \n') f.write(' \n') f.write(' \n') f.write(' \n') - f.write(' Parameter NameTypeExtension(s)Description(s)\n') + f.write(' Parameter NameTypeBases/ExtensionsDescription(s)\n') f.write(' \n') f.write(' \n') @@ -631,15 +631,15 @@ def html_param_table_row(f, param: Dict[str, Any], chapter_name: Optional[str]): impl_defs = filter_impldefs_for_chapter(impl_defs_all, chapter_name) type_display = format_param_type_for_html(param) - extension_names: List[str] = [] + base_extension_names: List[str] = [] for impl_def in impl_defs: if not isinstance(impl_def, dict): continue instances = impl_def.get("instances") if isinstance(instances, list): for instance in instances: - if isinstance(instance, str) and instance not in extension_names: - extension_names.append(instance) + if isinstance(instance, str) and instance not in base_extension_names: + base_extension_names.append(instance) descriptions: List[str] = [] if isinstance(note, str): @@ -674,14 +674,14 @@ def html_param_table_row(f, param: Dict[str, Any], chapter_name: Optional[str]): if not descriptions: descriptions.append("(No description available)") - extensions_str = ", ".join(extension_names) if extension_names else "(none)" + base_extension_str = ", ".join(base_extension_names) if base_extension_names else "(none)" row_span = len(descriptions) f.write(' \n') f.write(f' {name}\n') f.write(f' {type_display}\n') - f.write(f' {extensions_str}\n') + f.write(f' {base_extension_str}\n') f.write(f' {descriptions[0]}\n') f.write(' \n')