Using Cross-references#
Tip
To view the source of this document, click the “Show Source” option under the GitHub menu button on this page’s header.
Cross-references are a powerful way to embed links to your register reference anywhere in your documentation.
Basic cross-references#
Here is a basic example of some cross-references:
Configure the
my_soc.thingamabob.ctrlregister to the desired settings.Enable the device by setting
my_soc.thingamabob.ctrl.ento1.Check
my_soc.thingamabob.statusfor errors.
Using relative paths#
If your document is focusing on details for a particular component, it can be cumbersome to type out the entire path each time.
Here is the same example again, but without needing to specify the full path every time:
Control link text#
- By default, a link’s text will match the text used in the cross-reference.
The contents of the link text can be controlled in several ways:
:rdl:ref:`my_soc.turboencabulator.grammeter`Results in the full link text::rdl:ref:`~my_soc.turboencabulator.grammeter`Truncates text to only show the last segment::rdl:ref:`my_soc.|turboencabulator.grammeter`Truncates everything before the|::rdl:ref:`The Amazing Grammeter <my_soc.turboencabulator.grammeter>`displays custom text:
Controlling where a link takes you#
The rdl:html-ref and rdl:doc-ref roles can be used to
explicitly choose which documentation target the link will point to.
Using
rdl:reflinks to the HTML output by default:my_soc.thingamabob.statusUsing
rdl:doc-refwill prefer linking to the inline docs, if they exist:my_soc.thingamabob.status