Skip to content

ISSUE-001: Readback alignment mismatch — 333 mismatches at offset 0x0 #371

@gHashTag

Description

@gHashTag

Problem

Full readback completes successfully (1516616 bytes) but verify fails with 333 mismatches starting at offset 0x0.

Context

  • FPGA: XC7A100T, IDCODE 0x13631093
  • Cable: DLC10, CPLD version 0xFFFE (normal for clones)
  • STAT register: 0x401079FC — DONE=1, Part NOT Secured, readback allowed
  • Tool: jtag_switcher with debug mode

Known from Debug Output

Raw TDO bytes (64-bit CFG_OUT read):

C8 C6 08 C9 C8 C6 08 C9 C8 C6 08 C9

After bit-reversal: 13 63 10 93 13 63

Hypotheses

H1: Frame alignment issue

  • First 32 bits of readback might be sync/preamble/skipped frames
  • Compare reads from offset 0 but reference starts at different frame
  • UG470 frame addressing: FAR + FDRO sequence might not align with readback frames

H2: Double bit-reversal

  • shift_cfg_in() bit-reverses bytes before sending via JTAG
  • read_cfg_out_32() bit-reverses TDO bytes when receiving
  • If xpc.c A6 protocol already handles bit ordering → double-reversal = zeros

H3: Wrong NOP count

  • Current code sends 2-8-16 NOPs after read command
  • Pipeline might need more/less for full flush

Next Steps

  1. Investigate: Read UG470 Section 7.1.2 (Readback Configuration)
  2. Fix: Based on investigation, modify readback sequence
  3. Test: Rerun verify command
  4. Document: Update jtag_switcher.c comments with UG470 references

Related

  • Experience: FPGA-014
  • Hardware state: ISSUE-001 open
  • BLK-001: RESOLVED

Priority: MEDIUM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions