11Cross-references
22================
33
4- .. role :: code-rst(code)
5- :language: reStructuredText
6-
7- .. rst :directive :: .. rdl:relative-to:: path
8-
9- It can be cumbersome to always specify the full register hierarchy in your docs.
10- This directive lets you temporarily set a more localized scope to a hierarchy
11- to make following references in the same document easier to manage.
12-
13- .. code-block :: rst
14-
15- Annoying! :rdl:ref:`very.long.path.to.my_block.my_register`
16-
17- .. rdl:relative-to:: very.long.path.to
18-
19- Much better! :rdl:ref:`my_block.my_register`
20-
21-
22- Cross-references will first search relative to the path specified, then
23- fall back to searching the absolute path.
4+ PeakRDL cross-references allow you to insert links into your documentation that
5+ point to specific register model nodes. These are very useful in programming
6+ guides, or more long-form prose in documentation.
247
8+ Cross-references can link to inline register reference content, or dynamic HTML content.
259
2610
11+ .. role :: code-rst(code)
12+ :language: reStructuredText
2713
2814
2915.. rst :role :: rdl:ref
@@ -46,7 +32,27 @@ Cross-references
4632 Same as the :rst:role: `rdl:ref ` role, except this will prefer linking to
4733 PeakRDL-HTML reference, regardless of the :confval: `peakrdl_default_link_to ` setting.
4834
35+
4936.. rst :role :: rdl:doc-ref
5037
5138 Same as the :rst:role: `rdl:ref ` role, except this will prefer linking to
5239 an inline :rst:dir: `docnode `, regardless of the :confval: `peakrdl_default_link_to ` setting.
40+
41+
42+ .. rst :directive :: .. rdl:relative-to:: path
43+
44+ It can be cumbersome to always specify the full register hierarchy in your docs.
45+ This directive lets you temporarily set a more localized scope to a hierarchy
46+ to make following references in the same document easier to manage.
47+
48+ .. code-block :: rst
49+
50+ Annoying! :rdl:ref:`very.long.path.to.my_block.my_register`
51+
52+ .. rdl:relative-to:: very.long.path.to
53+
54+ Much better! :rdl:ref:`my_block.my_register`
55+
56+
57+ Cross-references will first search relative to the path specified, then
58+ fall back to searching the absolute path.
0 commit comments