bitstream-re

Reverse-engineer FPGA configuration bitstreams by pair-diffing RBFs and encoding CRAM geometry into a read/write codec.

7|1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/14sea/Cyclone_CRAM_Mapper --skill bitstream-re
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitstream-re
Source: https://github.com/14sea/Cyclone_CRAM_Mapper/tree/main/.claude/skills/bitstream-re
Command: npx skills add https://github.com/14sea/Cyclone_CRAM_Mapper --skill bitstream-re

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you reverse-engineer FPGA configuration bitstreams by mapping which CRAM bits control specific functionality, so you can reliably read, modify, and regenerate behavior without relying on proprietary assumptions.

Core Features & Use Cases

  • Pair-diff CRAM discovery: isolates configuration bits by XOR-diffing RBFs from minimally different designs instead of trying to parse RBF structures directly.
  • Routing and codec modeling: builds models for both CRAM geometry and routing behavior, then applies switch/LUT updates via a codec while maintaining XOR-delta semantics.
  • Hardware safety and verification workflow: includes guardrails like CRC recomputation and a mandatory end-to-end hardware validation loop to prevent unsafe or non-functional bitstreams.
  • SKU/jailbreak probing: tests whether “smaller” SKUs are enabled/disabled primarily by fitter whitelists and verifies physical legality before expanding models.

Quick Start

Use the bitstream-re skill to compute CRAM offsets and routing models for an EP4CE6 by running staged pair-diffs on Quartus-generated RBFs, then codec-replaying the results into an identical silicon-validated bitstream with CRC patched before flashing.

Frequently Asked Questions about bitstream-re

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reverse-engineer FPGA bitstreams to map CRAM bits for Intel Cyclone IV?

Reverse-engineer FPGA bitstreams by XOR-diffing minimally different Quartus-generated RBFs to isolate CRAM bits, then encoding routing behavior into a safe read/write codec. This pair-diff method maps configuration bits without parsing proprietary RBF structures directly.

What is pair-diff CRAM discovery and how does it work for FPGA configuration?

Pair-diff CRAM discovery isolates specific FPGA configuration bits by comparing RBFs from minimally different designs. Instead of reverse-engineering RBF structures directly, it uses XOR-delta semantics to identify which CRAM bits control routing, switches, and LUT updates.

Do I need to patch the CRC when modifying an Altera Cyclone IV bitstream?

Yes, you must patch the CRC when modifying an Altera Cyclone IV bitstream. Hardware safety requires correct CRC recomputation to prevent unsafe or non-functional bitstreams, alongside mandatory end-to-end on-hardware validation before flashing.

Can I use bitstream reverse engineering to probe smaller FPGA SKUs and bypass fitter whitelists?

You can probe smaller FPGA SKUs by testing whether fitter whitelists enable or disable features, but you must verify physical legality before expanding models. This probing checks if SKU limits are enforced primarily by software rather than silicon.

How do I extract routing models from RBF files for FPGA silicon validation?

Extract routing models by running staged pair-diffs on Quartus-generated RBFs to compute CRAM offsets, then codec-replaying the results into a silicon-validated bitstream. Hardware verification on real boards confirms the extracted routing behavior accurately.

What are the limitations of reverse-engineering bitstreams without proprietary documentation?

Without proprietary documentation, bitstream reverse-engineering requires silicon-validated diff discipline and mandatory hardware confirmation to avoid non-functional outputs. Limitations include relying on pair-diffing rather than direct parsing, and needing physical boards for end-to-end verification.