Class: Udb::DocLink
- Inherits:
-
Object
- Object
- Udb::DocLink
- Defined in:
- lib/udb/doc_link.rb
Overview
Creates links into RISC-V documentation with the following formats for the destination link:
Documenation Format
============ ===============================================================
ISA manuals manual:ext:<ext_name>:<identifier>
manual:inst:<inst_name>:<identifier>
manual:insts:<inst_name>[-<inst_name>]+:<identifier>
manual:inst_group:<group_name>:<identifier>
manual:csr:<csr_name>:<identifier>
manual:csr_field:<csr_name>:<field_name>:<identifier>
manual:param:<ext_name>:<param_name>:<identifier>
where <identifier> is a string that describes the tagged text
UDB doc udb:doc:ext:<ext_name>
udb:doc:ext_param:<ext_name>:<param_name>
udb:doc:inst:<inst_name>
udb:doc:csr:<csr_name>
udb:doc:csr_field:<csr_name>:<field_name>
udb:doc:func:<func_name> (Documentation of common/built-in IDL functions)
udb:doc:cov_pt:<org>:<id>
where <org> is:
sep for UDB documentation that "separates" normative rules from test plans
combo for UDB documentation that "combines" normative rules with test plans
appendix for UDB documentation that has normative rules and test plans in appendices
where <id> is the ID of the normative rule
IDL code idl:code:inst:<inst-name>:<location>
TODO for CSR and CSR Fields
Instance Method Summary collapse
-
#dst_link ⇒ String
Unique ID of the linked to normative rule.
-
#initialize(dst_link, db_obj) ⇒ DocLink
constructor
A new instance of DocLink.
-
#to_adoc ⇒ String
Asciidoc to create desired link.
Constructor Details
#initialize(dst_link, db_obj) ⇒ DocLink
Returns a new instance of DocLink.
35 36 37 38 39 40 |
# File 'lib/udb/doc_link.rb', line 35 def initialize(dst_link, db_obj) raise ArgumentError, "Need String but was passed a #{data.class}" unless dst_link.is_a?(String) @dst_link = dst_link raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if @dst_link.nil? end |
Instance Method Details
#dst_link ⇒ String
Returns Unique ID of the linked to normative rule.
43 |
# File 'lib/udb/doc_link.rb', line 43 def dst_link = @dst_link |
#to_adoc ⇒ String
Returns Asciidoc to create desired link.
46 47 48 |
# File 'lib/udb/doc_link.rb', line 46 def to_adoc "<<#{@dst_link},#{@dst_link}>>" end |