{
  "api_version": "1.0.0",
  "slug": "cyclone-fpga-bitstream",
  "url": "https://reversedwithai.com/p/cyclone-fpga-bitstream",
  "markdown_url": "https://reversedwithai.com/p/cyclone-fpga-bitstream.md",
  "json_url": "https://reversedwithai.com/p/cyclone-fpga-bitstream.json",
  "title": "Mapped a Cyclone FPGA's configuration bitstream with Claude Code",
  "tagline": "Claude did the mapping; a real board checked its work.",
  "summary": "The repository is set up for Claude Code, with a CLAUDE.md context file, and maps configuration RAM bits with results checked on a real board.",
  "target": {
    "name": "Intel (Altera) Cyclone IV EP4CE6F17C8 bitstream",
    "type": "firmware",
    "type_label": "Firmware and hardware"
  },
  "platform": "FPGA",
  "models": [
    "Claude"
  ],
  "tools": [
    "Claude Code",
    "Quartus Prime Lite",
    "openFPGALoader",
    "SQLite"
  ],
  "outcome": "research",
  "outcome_label": "Research",
  "human_effort": null,
  "time_spent": null,
  "cost": null,
  "license": null,
  "checks": {
    "source_available": "yes",
    "repro_steps": "yes",
    "real_hardware": "yes",
    "independently_verified": null
  },
  "author": {
    "name": "14sea",
    "url": null
  },
  "sources": {
    "repository": "https://github.com/14sea/Cyclone_CRAM_Mapper",
    "writeup": null,
    "discussions": [
      "https://news.ycombinator.com/item?id=47658386"
    ],
    "all": [
      "https://github.com/14sea/Cyclone_CRAM_Mapper",
      "https://news.ycombinator.com/item?id=47658386"
    ]
  },
  "image": {
    "url": "https://covers.reversedwithai.com/cyclone-fpga-bitstream.webp",
    "credit": "Image: GitHub (14sea/Cyclone_CRAM_Mapper)"
  },
  "commit_history": {
    "commits": 493,
    "ai_commits": 459,
    "ai_days": 41,
    "first_ai_commit": "2026-04-05",
    "last_ai_commit": "2026-09-30",
    "credited_models": [
      {
        "name": "Claude Opus 4.7",
        "commits": 228
      },
      {
        "name": "Claude Opus 4.6",
        "commits": 184
      },
      {
        "name": "Claude Opus 4.8",
        "commits": 18
      },
      {
        "name": "Claude Fable 5",
        "commits": 15
      }
    ]
  },
  "added_at": "2026-10-13T00:00:12+00:00",
  "updated_at": "2026-10-13T00:00:12+00:00",
  "sources_reviewed_at": "2026-10-13T00:00:12+00:00",
  "reviewed_by": "editor",
  "human_notes": "Hardware verification needed manual work. The author says the method holds up as long as hallucination is kept in check.",
  "reproduce": null,
  "body_md": "14sea used Claude Code to reverse engineer the configuration bitstream of an Intel (formerly Altera) Cyclone IV EP4CE6 FPGA. The aim is a fully open toolchain for the chip. The project maps logic and much of the routing in the 368,011-byte RBF file, worked out its per-frame CRC, and checks results on a real board. The repo includes a CLAUDE.md file described as the AI assistant context file, and a bitstream-re skill. The README does not say what the AI did.\n\n## Method\n\nThe core method is \"pair-diff\" fuzzing, taken from Project IceStorm. Python scripts generate tiny Verilog designs that differ in one thing, compile them with Quartus Prime 21.1 Lite command-line tools, and diff the resulting bitstreams. Results go into a SQLite database. When codec output that matched Quartus byte for byte still failed on the board, the author inferred that the chip checks a CRC. The CRC turned out to be computed per frame, and differences between frames identified it as CRC-16 (polynomial 0x8005) with a fixed initial value.\n\n## Where the research stands\n\nThis is research in progress; the README's most recent dated entries are from 24 April 2026. It reports a CRAM address model verified at all 376 of 376 positions. LUT truth tables can be read and written. The file CRC is worked out, with 1,727 of 1,727 frames verified. Routing is partly mapped: the C4 wires are 100% mapped for index 0, R4 has 25 of 37 indices mapped (about 24 or 25), R24 is partly mapped at about 66% pair-diff accuracy, and C16 is not mapped yet. A round trip of routing switches through the codec showed 0 dropped and 0 hallucinated cells. The project also found that the EP4CE6 and EP4CE10 share the same physical die.\n\nBitstreams were flashed to a Heijin AX301 board to check the results. Small designs built through its partly open Yosys and nextpnr flow run on the board, but a large NEORV32 build made that way resets the FPGA when flashed.\n\nTo try it you need a Heijin AX301 board with an EP4CE6F17C8 and a USB-Blaster, Quartus Prime 21.1 Lite, openFPGALoader and Python 3. The Python scripts drive Quartus, store results in SQLite and compare bitstreams.\n\nSources:\n- https://github.com/14sea/Cyclone_CRAM_Mapper",
  "ai_use_excerpts": null
}
