A zero-setup RISC-V analysis tool that parses, validates, and visualizes ISA structureβrevealing hidden relationships across extensions.
A complete 3-tier implementation that transforms raw RISC-V instruction data into:
- π Structured extension groups
- π ISA cross-references
- π§ͺ Verified outputs via unit tests
- π Interactive graph visualizations
- β‘ Zero-setup browser execution (offline)
- π§ Smart normalization across inconsistent naming
- π¬ Cross-validation with official ISA manual
- π Graph-based insight into extension relationships
- π§ͺ Test-backed correctness (38 tests)
| File | Language | Network |
|---|---|---|
riscv-explorer.html |
JavaScript | β Offline |
src/explorer.py |
Python | β Required |
start riscv-explorer.htmlpython src/explorer.py --allRun specific tiers:
python src/explorer.py --tier1
python src/explorer.py --tier2
python src/explorer.py --tier3Run tests:
python -m unittest tests/test_explorer.py -v- Parses 245+ instructions
- Groups by extension
- Detects overlaps
- Matches against ISA manual
- Normalizes naming differences
- Identifies mismatches
- Extension relationships
- Shared instruction mapping
- Interactive visualization
- β 245 instructions processed
- π¦ 262 total extension mappings
- π 17 multi-extension overlaps detected
Top Extensions:
rv_i β 40 instructions
rv_d β 28 instructions
rv_c β 26 instructions
rv_f β 26 instructions
Multi-Extension Examples:
ADD.UW β rv_zba, rv64_zba
AES64DS β rv64_zknd, rv64_zkne
ANDN β rv_zbb, rv_zbkb
- π 42 ISA files scanned
- π 847 candidate tokens extracted
Results:
- β Matched: 23
- β JSON-only: 0
β οΈ Manual-only: 63 (expected noise)
Example Matches:
rv_a β a
rv_c β c
rv_zba β zba
Top Relationships (by shared instructions):
rv_zbb ββ[5]ββ rv_zbkb
rv_zbc ββ[2]ββ rv_zbkc
rv_zba ββ[1]ββ rv64_zba
The browser version renders a live interactive graph:
- π΅ Node size β instruction count
- π Edge weight β shared instructions
- π¨ Color β extension family
- π± Hover β full instruction list
The base integer extension (rv_i) contains the highest number of instructions (~40), confirming its role as the foundational layer of the RISC-V architecture.
π Insight: Most other extensions build on top of this core, reinforcing a modular ISA design philosophy.
Multiple instructions belong to more than one extension (e.g., ANDN, CLMUL, AES64DS).
π Insight: RISC-V extensions are not strictly isolatedβthey share functionality, especially in:
- Bit manipulation (
rv_zb*) - Cryptography (
rv_zk*)
This suggests intentional reuse and composability, not duplication.
Extensions like:
rv_zbbrv_zbkbrv_zbc
show the highest number of shared instructions.
π Insight: Bit-manipulation extensions form a tightly coupled cluster, indicating:
- High internal cohesion
- Designed to be used together
- β JSON-only extensions: 0
β οΈ Manual-only tokens: 63
π Insight: The instruction dictionary is complete and consistent, while the ISA manual introduces:
- Extra tokens (e.g., section names, abbreviations)
- Expected parsing noise
This validates the reliability of structured JSON over raw documentation parsing.
The force-directed graph highlights:
- Dense clusters (bitmanip group)
- Sparse links (specialized extensions like
rv_zbaβrv64_zba)
π Insight: RISC-V follows a hybrid structure:
- Dense clusters β general-purpose extensions
- Sparse edges β niche or architecture-specific features
Normalization required:
- Removing prefixes (
rv32_,rv64_) - Case harmonization
π Insight: RISC-V naming conventions are flexible but inconsistent, reinforcing the need for:
- Programmatic normalization
- Rule-based parsing instead of hardcoding
RISC-Vβs design emphasizes:
- π§© Modularity β extensions build on a strong base
- π Interoperability β shared instructions across domains
- π Scalability β easy to extend without breaking structure
This project transforms raw instruction data into actionable architectural insights about the RISC-V ecosystem.
RISC-V-instruction-explorer/
βββ README.md
βββ riscv-explorer.html
βββ src/
βββ tests/
βββ output/
- Regex-based (
^rv\d*_) - Lowercase transformation
- No hardcoding β future-proof
- Embedded dataset
- No CORS issues
- Instant execution
- Adjacency dictionary
- Fast lookups
- Easy visualization
- Flexible JSON schema supported
- Missing extensions β
_unknown - Manual parsing may include noise (expected)
- β 0 missing extensions in JSON dataset
- β 23 validated ISA matches
- β 17 cross-extension overlaps identified
π Confirms both data completeness and structural interconnectivity
This project demonstrates that RISC-Vβs instruction set is not merely a collection of isolated extensions, but a deeply interconnected and modular architecture.
Through systematic parsing, normalization, and cross-referencing, several structural characteristics emerge:
- The base ISA (
rv_i) acts as a stable foundation, with higher-level extensions layering functionality rather than redefining it - Extension boundaries are intentionally porous, enabling instruction reuse across domains such as bit manipulation and cryptography
- The observed clustered graph topology reflects design intentβdense regions correspond to general-purpose capability groups, while sparse connections highlight specialized features
From a data perspective, the contrast between structured JSON and unstructured ISA documentation reinforces a key observation:
machine-readable specifications enable far more reliable analysis than textual standards alone
The necessity of normalization further indicates that RISC-V prioritizes extensibility over strict naming uniformity, a trade-off that favors long-term scalability at the cost of tooling complexity.
The findings suggest that RISC-V is best understood not as a fixed ISA, but as an evolving ecosystem of interoperable instruction subsets.
This has direct implications for:
- Compiler design β optimization across overlapping extensions
- Hardware implementation β selective inclusion of tightly coupled instruction groups
- Tooling & analysis β need for abstraction layers over raw specification formats
By combining parsing, validation, and visualization, this work transforms static instruction data into a dynamic representation of architectural intent.
Ultimately, this project highlights how even low-level ISA data, when properly structured and analyzed, can reveal higher-order design principles underlying modern computing architectures.




