Forum Discussion

Dexter22's avatar
Dexter22
Icon for New Contributor rankNew Contributor
16 days ago

Agilex 7 R-Tile PIPE Direct Mode: Raw Rx Data Misalignment - Is Soft Word Alignment Needed?

Hello,

I am designing a custom PCIe Logical PHY using Agilex 7 R-Tile in PIPE Direct Mode. My goal is to implement the PCS/MAC layer in soft logic (FPGA fabric).

I have established a link with the Host, but I am unable to detect the COM symbol (K28.5). Instead, I observe the following two repeating patterns on the 10-bit RxData bus via Signal Tap:

Observed Raw Data (Repeating 10-bit Hex values):

Pattern A (RD-): 0x3E5, 0x142, 0x147, 0x267, 0x30E, 0x236, 0x156, 0x155, 0x155, ...

Pattern B (RD+): 0x01D, 0x2BD, 0x2B8, 0x198, 0x0F1, 0x1C9, 0x151, 0x155, 0x155, ...

My Analysis:

The trailing 0x155 matches D10.2 (TS1 Link/Lane ID), which is symmetric (0101010101), so it looks correct even if bit-reversed.

The header 0x3E5 (Pattern A) and 0x01D (Pattern B) do not match K28.5 directly.

However, if I apply Bit Reversal and a 3-bit Shift to 0x3E5, it perfectly matches the K28.5 comma pattern. This strongly suggests the data is valid but is coming in as Raw, Bit-Reversed, and Misaligned bits.

My Questions:

In PIPE Direct Mode, is it standard behavior for the R-Tile Hard IP to bypass Word Alignment and output raw, unaligned data?

Does this mean the user is strictly responsible for implementing Bit Reversal and a Soft Word Aligner (Bit Slip / Barrel Shifter) in the FPGA fabric to achieve Symbol Lock?

Is there any IP parameter or configuration to enable Hard Word Alignment while keeping the PIPE Direct interface?

I would appreciate any confirmation or advice from those experienced with R-Tile PIPE Direct mode.

Thank you.

1 Reply

  • Wincent_Altera's avatar
    Wincent_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Dexter22 ,

    Based on the your provided result 

    • Yes — in PIPE Direct mode on Agilex 7 R‑Tile, the hard IP intentionally bypasses PCS word/symbol alignment. You will see raw, unaligned serialized data on the PIPE RX interface.
    • Yes — you are responsible for soft word alignment (comma/K28.5 detection with bitslip), bit orientation handling (bit‑reversal if needed), and subsequent 8b/10b or 128b/130b processing in the FPGA fabric.
    • No — there is no IP parameter to turn on hard PCS alignment while retaining PIPE Direct. If you want hard alignment and decoding, you must use the standard PCIe controller modes (not PIPE Direct).

    As PIPE Direct Mode is mostly customize by user (no available design example provided by Altera), I would lay down some of debug suggestion based on my experience, hope that can help you to move a step forward.

    Verify bit ordering:

    • If your K28.5 only appears after reversing the 10 bits, your lane is likely bit‑reversed relative to your decoder.
    • Make the reversal a parameter so you can flip per lane without re‑synthesis.

    Implement a robust comma detector:

    • Check for both 0011111010 (RD−) and 1100000101 (RD+) across all bit positions of your capture word.
    • Once aligned, validate with running disparity and known training patterns (TS1/TS2) to confirm stability.

    Confirm your valid‑bit placement:

    • At Gen1/Gen2 speeds, only certain bits of the RX bus are meaningful per cycle (commonly the 10 LSBs of each half). Treat upper bits as don’t‑care until alignment is achieved.

    Use training patterns as a sanity check:

    • The repeated 0x155 (D10.2) is expected in TS1 fields. Once aligned, you should cleanly parse TS1/TS2 content and comma locations.

    Regards,
    Wincent