{
  "$schema": "https://siliconverify.com/schemas/tool-v1.json",
  "slug": "riscv",
  "title": "RISC-V Pipeline Visualizer — RV32I 5-Stage",
  "category": "risc-v",
  "category_label": "RISC-V",
  "urls": {
    "interactive": "https://siliconverify.com/riscv.html",
    "static_sheet": "https://siliconverify.com/ref-riscv.html",
    "api_doc": "https://siliconverify.com/api/riscv.json",
    "blog_index": "https://siliconverify.com/llms-riscv.txt"
  },
  "description": "The RISC-V Pipeline Visualizer simulates the canonical RV32I 5-stage pipeline (IF, ID, EX, MEM, WB) running real RISC-V code. Load a program (Fibonacci, GCD, sieve, dot product, sort) and see the instructions flow through the stages. Hazard detection, data forwarding, and branch prediction can be toggled to show their effect on CPI. Use it to understand why a 5-stage pipeline achieves CPI ≈ 1 in the best case and how hazards create stalls.",
  "keywords": [
    "RISC-V",
    "RV32I",
    "5-stage pipeline",
    "pipeline visualizer",
    "forwarding",
    "hazard detection"
  ],
  "pricing": {
    "class": "workbench-tool",
    "protocol": "x402",
    "network": "base",
    "currency": "USDC",
    "price_atomic": 1000,
    "price_usd": 0.001,
    "payTo": "0x97DAA5649Fd7Dfe3e46fCd9f75516e36E750eed7",
    "static_sheet_price_atomic": 1000,
    "export_price_atomic": 5000
  },
  "content": {
    "formulas": [
      "CPI (no hazards) = 1.0 (one instruction per cycle)",
      "CPI (with stalls) = 1.0 + stall_cycles / instruction",
      "Load-use hazard: 1 cycle stall (or 1 cycle with forwarding + 1 cycle for load latency)",
      "Branch misprediction penalty: pipeline_depth − 1 cycles (5-1 = 4 for the 5-stage pipeline)",
      "Speedup = pipeline_depth / (1 + stall_fraction) (Amdahl)"
    ],
    "citations": [
      "Patterson, D. A., Hennessy, J. L., \"Computer Organization and Design: RISC-V Edition,\" 2nd ed., Morgan Kaufmann, 2021.",
      "Waterman, A., Asanović, K., \"The RISC-V Instruction Set Manual, Volume I: Unprivileged ISA,\" 2019."
    ],
    "faq": [
      {
        "q": "Why does my pipeline take 4 cycles per branch instead of 1?",
        "a": "Branch misprediction: the next 4 instructions (in a 5-stage pipeline) have already started executing. On a mispredict, they are flushed. Branch prediction reduces this penalty."
      },
      {
        "q": "What is the difference between a stall and a flush?",
        "a": "A stall (bubble) inserts a NOP into one stage while letting other stages continue. A flush (on a branch misprediction) discards all instructions after the branch in the pipeline."
      }
    ]
  },
  "accessibility": {
    "crawlable": true,
    "javascript_required": true,
    "static_alternative": "/ref-riscv.html",
    "structured_data": [
      "TechArticle",
      "SoftwareApplication",
      "FAQPage",
      "BreadcrumbList"
    ]
  },
  "x402_challenge_example": {
    "request": "curl -A 'GPTBot/1.0' -i https://siliconverify.com/riscv.html",
    "response_headers": [
      "HTTP/1.1 402 Payment Required",
      "X-Siliconverify-Resource-Class: workbench-tool",
      "X-Siliconverify-Price-Atomic: 1000",
      "X-Siliconverify-Price-USD: 0.001"
    ],
    "response_body": "{\n  \"x402Version\": 1,\n  \"accepts\": [\n    {\n      \"scheme\": \"exact\",\n      \"network\": \"base\",\n      \"maxAmountRequired\": \"1000\",\n      \"resource\": \"https://siliconverify.com/riscv.html\",\n      \"description\": \"SiliconVerify workbench tool — interactive browser-based engineering calculator. Client-side computation, no server cost.\",\n      \"mimeType\": \"text/html\",\n      \"payTo\": \"0x97DAA5649Fd7Dfe3e46fCd9f75516e36E750eed7\",\n      \"validAfter\": 1783274656,\n      \"validBefore\": 1783274956\n    }\n  ]\n}",
    "paid_request": "curl -A 'GPTBot/1.0' -H 'X-PAYMENT: 0x<txhash>' -i https://siliconverify.com/riscv.html"
  },
  "last_updated": "2026-07-05"
}