Skip to content
STIMSMITH

Basic Block (BB)

Concept

A basic block (BB) is a straight-line sequence of statements with a single entry and single exit, used as the fundamental node in control flow graphs. In hardware/RTL analysis, basic blocks are the primary units for coverage instrumentation, control flow construction, and inter-block dependency analysis (e.g., dataflow predecessor relationships) used to guide processor fuzzing.

First seen 6/11/2026
Last seen 6/11/2026
Evidence 3 chunks
Wiki v1

WIKI

Basic Block (BB)

Definition

A basic block (BB) is a maximal straight-line sequence of statements with a single entry point and a single exit point, terminated by a branch, jump, or other control-flow transfer. Basic blocks are the atomic nodes from which a Control Flow Graph (CFG) is constructed: edges between BBs represent possible transfers of control.

In the hardware / RTL setting used by Fine-Grained Code Analysis for Processor Fuzzing, basic blocks are derived from the HDL source. Conditional constructs such as if (...) ... else if (...) ... else ... give rise to multiple BBs, while continuous-assignment statements form their own BB kind.

READ FULL ARTICLE →

NEIGHBORHOOD

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

3 connections
The paper uses basic blocks as nodes in the CFG for dependency and coverage analysis.
Branch Coverage Instrumentation ← uses 90% 2e
Branch coverage instrumentation tracks which basic blocks have been accessed.
static analysis ← uses 90% 1e
Static analysis identifies and analyzes basic blocks in the processor RTL.

CITATIONS

6 sources
6 citations — click to expand
[1] Basic blocks are straight-line code regions with a single entry and a single exit, and they form the nodes of the control flow graph used in static analysis of RTL designs. Fine-Grained Code Analysis for Processor Fuzzing
[2] Coverage instrumentation records accessed basic blocks (excluding 'assign' type BBs) in hardware registers of width 500, one bit per BB. Fine-Grained Code Analysis for Processor Fuzzing
[3] Dependency analysis iterates over guard conditions G = {g1, g2, ...}, converts each assignment e to SSA form, and checks Q(i) = ¬g_{i0} ∧ e ∧ g_{i1} to add predecessor edges between BBs, repeating until a fixed point. Fine-Grained Code Analysis for Processor Fuzzing
[4] If an assignment e is an expression, the analysis recursively identifies the variables on the right-hand side and marks the BBs that assign those variables as predecessors of the BB containing e, until no more predecessors can be added. Fine-Grained Code Analysis for Processor Fuzzing
[5] In the Rocket processor illegal-instruction example, dependency analysis adds edges b4→a3 (via illegal_insn), a1→a2 (status_isa assignment), and a1→b2 (reg_misa assignment in b2), yielding a more accurate CFG. Fine-Grained Code Analysis for Processor Fuzzing
[6] The example snippet identifies BBs b1, b2 from the csr_reset / csr_signal conditional chain, BBs b3, b4, b5 from the illegal-instruction handling chain, and assign-type BBs a1 (status_isa = reg_misa[31:0]), a2 (io_status_isa = status_isa), and a3 (illegal_insn = ~io_status_isa[12]). Fine-Grained Code Analysis for Processor Fuzzing