forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[otbn] Add Hugo shortcode to link to instruction description
And use it in the OTBN documentation. The new shortcode also changes the formatting slightly from what we had before (most of the time): Instructions are not displayed in a monospace font any more. This aligns with how we render register references, which also don't use a monospace font. Fixes lowRISC#4869 Signed-off-by: Philipp Wagner <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{/* | ||
A Hugo shortcode to link to an OTBN instruction. | ||
|
||
Usage: {{< otbnInsnRef insn >}} | ||
|
||
insn: Name of the instruction to link to (e.g. BN.WSRR). | ||
*/}} | ||
{{ $insn := .Get 0 }} | ||
{{ $ref := lower (replace $insn "." "") }} | ||
<a href='{{ ref . (printf "/hw/ip/otbn/doc/isa#%s" $ref) }}'>{{ $insn }}</a> |