conditional branch snippet
ConceptIn OTBN RIG, a conditional branch is a more complicated kind of snippet used to build random programs. The generator’s JSON output represents a tree of snippets, and the documentation gives an if/else-style size rule: if computing the condition takes `a` cycles and the two branches have sizes `b` and `c`, the snippet size is `a + max(b, c)`.
First seen 5/31/2026
Last seen 6/1/2026
Evidence 2 chunks
Wiki v2
WIKI
Overview
In the OpenTitan OTBN Random Instruction Generator (otbn-rig), random programs are built from blocks called snippets. The documentation says that, besides the simplest straight-line instruction sequence, there are more complicated snippets such as conditional branches and loops.
Relationship to the snippet model
NEIGHBORHOOD
No graph connections found for this entity yet. It may appear in future ingestion runs.
explore full graph →RELATIONSHIPS
1 connectionsSnippets include more complex forms such as conditional branches
LINKED ENTITIES
1 linksCITATIONS
3 sources3 citations — click to collapse
[1] OTBN RIG builds random programs from snippets, and conditional branches are one of the more complicated snippet kinds; the JSON output represents a tree of snippets. Random Instruction Generator - OpenTitan Documentation
[2] For an if/else-style conditional branch, if evaluating the condition takes `a` cycles and the two branches have sizes `b` and `c`, the snippet size is `a + max(b, c)`. Random Instruction Generator - OpenTitan Documentation
[3] Snippet size is intended as an upper bound on executed instructions, but the bound may not be strict in the if/else example when `a != b`. Random Instruction Generator - OpenTitan Documentation