Skip to content

Commit f6fb42a

Browse files
Renaming CertLinks to DocLinks since parameters will also use them.
1 parent d6edb6e commit f6fb42a

File tree

7 files changed

+32
-23
lines changed

7 files changed

+32
-23
lines changed

arch/csr/misa.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fields:
141141
- id: csr.misa.M.disabled
142142
name: Disabling `misa.M` bit
143143
description: What happens when you turn off `misa.M`
144-
links:
144+
doc_links:
145145
- manual:csr:misa:disabling-extension
146146
cert-test-procedures:
147147
- id: csr.misa.M.muldiv_with_M_on&off
@@ -212,7 +212,7 @@ cert-coverage-points:
212212
- id: csr.misa.disabling_bits
213213
name: Disabling `misa` bits
214214
description: What happens when you turn off bits
215-
links:
215+
doc_links:
216216
- manual:csr:misa:disabling-extension
217217
cert-test-procedures:
218218
- id: csr.misa.off&on

arch/ext/Xmock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ cert-coverage-points:
158158
- id: ext.Xmock.cov1
159159
name: Mock coverage point 1
160160
description: Let's have fun with the `Xmock` extension
161-
links:
161+
doc_links:
162162
- manual:inst:mul:encoding
163163
- udb:doc:inst:mock
164164
- id: ext.Xmock.cov2
165165
name: Mock coverage point 2
166166
description: And some more fun!
167-
links:
167+
doc_links:
168168
- manual:csr:misa:disabling-extension
169169
cert-test-procedures:
170170
- id: ext.Xmock.my_first

arch/inst/M/mul.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ cert-coverage-points:
7474
- id: inst.mul.encoding
7575
name: Encoding
7676
description: Encoding of `mul` instruction
77-
links:
77+
doc_links:
7878
- manual:inst:mul:encoding
7979
- id: inst.mul.basic_op
8080
name: Basic operation
8181
description: Basic operation of `mul` instruction
82-
links:
82+
doc_links:
8383
- manual:inst:mul:operation
8484
- id: inst.mul.ill_exc_misa_M_disabled
8585
name: Illegal instruction exception when misa.M is 0
8686
description: |
8787
An illegal instruction exception is raised when the instruction is executed
8888
and `misa.M` is 0.
89-
links:
89+
doc_links:
9090
- manual:csr:misa:disabling-extension
9191

9292
cert-test-procedures:

arch/inst/mock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ cert-coverage-points:
6565
- id: inst.mock.encoding&basic_op
6666
name: Encoding and basic operation
6767
description: Encoding and basic operation for `mock` instruction
68-
links:
68+
doc_links:
6969
- manual:inst:mul:encoding
7070
- udb:doc:inst:mock
7171
- id: inst.mock.ill_exc_misa_M_disabled
7272
name: Illegal instruction exception when misa.M is 0
7373
description: |
7474
An illegal instruction exception is raised when the instruction is executed
7575
and `misa.M` is 0.
76-
links:
76+
doc_links:
7777
- manual:csr:misa:disabling-extension
7878
# - idl:code:inst:mock:illegal-inst-exc-misa-disabled
7979

backends/portfolio/templates/coverage_points.adoc.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Coverage Points for `<%= nice_name %>`: ::
1414
| <%= defined?(org) ? anchor_for_udb_cert_cov_pt(org, cp.id) : "" %><%= cp.id %>
1515
| <%= cp.name %>
1616
| <%= cp.description %>
17-
a| <% cp.cert_links.each do |link| -%>
17+
a| <% cp.doc_links.each do |link| -%>
1818
* <%= link.to_adoc %>
1919
<% end # each link -%>
2020
<% end # each coverage point -%>

lib/arch_obj_models/database_obj.rb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -773,28 +773,37 @@ def description = @data["description"]
773773
# @return [String] Unique ID of the coverage point
774774
def id = @data["id"]
775775

776-
# @return [Array<CertLink>] List of certification point links (cross references)
777-
def cert_links
778-
return @cert_links unless @cert_links.nil?
776+
# @return [Array<DocLink>] List of certification point documentation links
777+
def doc_links
778+
return @doc_links unless @doc_links.nil?
779779

780-
@cert_links = []
781-
@data["links"]&.each do |link_data|
782-
@cert_links << CertLink.new(link_data, @db_obj)
780+
@doc_links = []
781+
@data["doc_links"]&.each do |link_data|
782+
@doc_links << DocLink.new(link_data, @db_obj)
783783
end
784784

785-
raise "Missing links for certification coverage point ID '#{id}' of kind #{@db_obj.kind}" if @cert_links.empty?
785+
raise "Missing doc_links for certification coverage point ID '#{id}' of kind #{@db_obj.kind}" if @doc_links.empty?
786786

787-
@cert_links
787+
@doc_links
788788
end
789789
end
790790

791-
class CertLink
792-
# @param data [String] The cross reference link provided in the YAML
791+
# Used to create links into RISC-V documentation with the following formats:
792+
# ISA manuals manual:ext:<ext-name>:<id>
793+
# manual:inst:<inst-name>:<id>
794+
# manual:csr:<csr-name>:<id>
795+
# manual:csr:<csr-name>:<id>
796+
# non-ISA system component standards, UDB generated documentation,
797+
# and regions of Sail/IDL pseudo-code.
798+
#
799+
#
800+
class DocLink
801+
# @param data [String] The documentation link provided in the YAML
793802
def initialize(data, db_obj)
794803
raise ArgumentError, "Need String but was passed a #{data.class}" unless data.is_a?(String)
795804
@id = data
796805

797-
raise ArgumentError, "Missing link to certfication coverage point ID for #{db_obj.name} of kind #{db_obj.kind}" if id.nil?
806+
raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if @id.nil?
798807
end
799808

800809
# @return [String] Unique ID of the linked to coverage point

schemas/schema_defs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@
279279
"name": {
280280
"type": "string"
281281
},
282-
"links": {
283-
"description": "Cross reference to UDB documentation, ISA manual, or IDL code",
282+
"doc_links": {
283+
"description": "Link to UDB documentation, ISA manual, Sail code, or IDL code",
284284
"type": "array",
285285
"items": {
286286
"type": "string"

0 commit comments

Comments
 (0)