{
  "episode": 9,
  "slug": "openhw-cve2-ep09-flash-boot",
  "date": "2026-11-21",
  "board": {
    "model": "ALINX PI-AR035-F1-1",
    "fpga": "XC7A35T-FGG484-2",
    "clock_mhz": 50,
    "uart": "115200 8N1",
    "jtag_serial": "210512180081"
  },
  "cpu": {
    "core": "OpenHW CVE2 / CV32E20",
    "isa": "RV32IM",
    "ram_bytes": 65536,
    "bootloader_region_bytes": 16384,
    "app_region_bytes": 49152,
    "bootloader_stack_top": "0x00004000",
    "app_stack_top": "0x00010000"
  },
  "flash": {
    "part": "GD25Q128E",
    "jedec_id": "0x00c84018",
    "capacity_bytes": 16777216,
    "sector_bytes": 4096,
    "page_bytes": 256,
    "spi_clock_mhz": 6.25,
    "commands": ["9F", "03", "20", "02", "05", "06", "66", "99"]
  },
  "flash_map": {
    "factory_bitstream": ["0x00000000", "0x00bfffff"],
    "slot_a": ["0x00c00000", "0x00c7ffff"],
    "slot_b": ["0x00c80000", "0x00cfffff"],
    "meta_a": ["0x00d00000", "0x00d00fff"],
    "meta_b": ["0x00d01000", "0x00d01fff"]
  },
  "uart_protocol": {
    "header_bytes": 15,
    "fields": ["'P'", "slot", "force", "len_u32", "crc32_u32", "version_u32"],
    "byte_order": "little-endian",
    "crc": "standard CRC-32 / zlib polynomial 0xEDB88320",
    "force_semantics": "write payload even when advertised CRC does not match; used to create a bad-metadata slot for fallback testing"
  },
  "metadata_record": {
    "bytes": 32,
    "fields": ["magic", "seq", "slot", "len", "crc", "version", "attempts", "rec_crc"],
    "magic": "0x45503952",
    "record_crc_covers_bytes": 28,
    "policy": "newer seq wins; if newest image fails CRC, boot() tries the older valid slot"
  },
  "images": {
    "bootloader_bytes": 7192,
    "bootloader_elf_bytes": 12668,
    "bootloader_hex_binary_bytes": 65536,
    "bootloader_hex_text_bytes": 147456,
    "bootloader_hex_words": 16384,
    "app_a_bytes": 1021,
    "app_b_bytes": 1021,
    "bitstream_bytes": 2192137
  },
  "results": {
    "slot_a": {
      "meta_seq": 1,
      "slot": "A",
      "image_bytes": 1021,
      "crc32": "0xa8a0cdcd",
      "version": 1,
      "rx_crc_match": true,
      "program_pass": true,
      "meta_pass": true,
      "load_pass": true,
      "app_banner": "EP09 APP A VER=00000001 RUNNING",
      "heartbeats": 5
    },
    "slot_b": {
      "meta_seq": 2,
      "slot": "B",
      "image_bytes": 1021,
      "crc32": "0x0a74fc2c",
      "version": 2,
      "rx_crc_match": true,
      "program_pass": true,
      "meta_pass": true,
      "load_pass": true,
      "app_banner": "EP09 APP B VER=00000002 RUNNING",
      "heartbeats": 5
    },
    "forced_a": {
      "meta_seq": 3,
      "active": "A",
      "advertised_crc": "0x575f3232",
      "actual_crc": "0xa8a0cdcd",
      "force_write": true,
      "program_pass": true,
      "meta_pass": true,
      "switch_load_fail": true,
      "switch_fail": true,
      "fallback": "B",
      "fallback_load_pass": true,
      "app_banner": "EP09 APP B VER=00000002 RUNNING",
      "heartbeats": 5,
      "reset_used": false
    },
    "cold_fallback": {
      "runs": 2,
      "log_bytes_each": 336,
      "logs_identical": true,
      "newest_slot": "A",
      "newest_load_fail": true,
      "fallback": "B",
      "fallback_load_pass": true,
      "app_banner": "EP09 APP B VER=00000002 RUNNING",
      "heartbeats": 5,
      "reset_loop": false
    },
    "restore_a": {
      "meta_seq": 4,
      "active": "A",
      "image_bytes": 1021,
      "crc32": "0xa8a0cdcd",
      "version": 4,
      "program_pass": true,
      "meta_pass": true,
      "load_pass": true,
      "app_banner": "EP09 APP A VER=00000001 RUNNING",
      "heartbeats": 5
    },
    "final_boot_a": {
      "log_bytes": 268,
      "selected_slot": "A",
      "load_pass": true,
      "app_banner": "EP09 APP A VER=00000001 RUNNING",
      "heartbeats": 5,
      "fallback": false
    }
  },
  "timing": {
    "wns_ns": 0.735,
    "whs_ns": 0.054,
    "tns_ns": 0.0,
    "ths_ns": 0.0,
    "failing_endpoints": 0,
    "total_endpoints": 11147
  },
  "resources": {
    "lut": 4261,
    "lut_pct": 20.49,
    "ff": 3720,
    "ff_pct": 8.94,
    "bram": 16,
    "bram_total": 50,
    "bram_pct": 32.0,
    "dsp": 11,
    "dsp_pct": 12.22,
    "iob": 25
  },
  "drc": {
    "errors": 0,
    "warnings": 76,
    "critical_warnings": 0,
    "warning_classes": {
      "REQP-1839": 21,
      "DPIP": 33,
      "DPOP": 12,
      "other": 10
    },
    "boundary": "REQP-1839 covers BRAM address pins driven by registers with asynchronous reset; the reset is only asserted during configuration."
  },
  "hashes": {
    "bootloader_bin_sha256": "c5d90cc072a1fbef1054c98c104aa90147feb5c6b4f740d6a6e2e0ed65649ba8",
    "bootloader_hex_sha256": "dfcaaa3f06635da2529d72575329c6782b1a8c4428c2dd460f9a24a5af4dac3d",
    "app_a_bin_sha256": "c1457fe560a88b461c96d4e39eeacd125050b71972ec1a9c9660d6da6aebbfba",
    "app_b_bin_sha256": "5246f22c2cee1eac9ab293ae3ef89493d9796bcbf94f8dbc9e3c971d6f887dbc",
    "bitstream_sha256": "bbb72e23488fa636e9b1f8c0e4012b7a01b98dbdecdf493ccc7a73442bbca665"
  },
  "independent_boots": 2,
  "cold_boot_logs_identical": true
}
