Skip to content

build/altera: MAX 10: SDRInput as a fabric register (ALTDDIO_IN adds a clock of latency). - #2758

Merged
enjoy-digital merged 1 commit into
masterfrom
altera-max10-sdrinput
Nov 3, 2026
Merged

enjoy-digital merged 1 commit into
masterfrom
altera-max10-sdrinput

Conversation

@enjoy-digital

Copy link
Copy Markdown
Owner

Follow-up to #2751/#2754 (MAX 10 IO lowering). #2754 kept ALTDDIO_IN for SDRInput, because a loopback showed it captures correctly in every bank. A loopback can't see latency, though. ALTDDIO_IN's dataout_h is re-registered to line up with the falling-edge data, which is one clock more than SDRInput's contract (o = i registered once). So on MAX 10 SDRInput now uses the same fabric-register fallback as SDROutput; FAST_INPUT_REGISTER packs it into the IOE input register.

What it broke, on a DE10-Lite (10M50, IS42S16320, HalfRateGENSDRPHY at 166.67 MHz, CL3, Quartus 23.1):

  • The BIOS memtest and the LiteDRAM BIST both pass with ALTDDIO_IN. Each is a round trip through one port, and with the read data a clock late, the SDRAM clock phase leveling (clock/intel, liblitedram: ALTPLL dynamic phase shift and SDRAM clock phase leveling at boot (SDR). #2756) still finds phases where round trips work.
  • Data written through one port and read through another is wrong, though. BIST generator (native port) writes read back through the CPU's L2 (JTAGBone) lose the high half of every 32-bit word: 1024 of 1024 words differ.
  • With SDRInput as a fabric register: 0 of 1024 words differ. The leveling window also grows from 18 to 30 of 48 steps.

Tested:

  • pytest test/build: 223 passed. The MAX 10 IO test now checks that neither ALTDDIO_OUT nor ALTDDIO_IN is emitted.
  • Hardware, as above. The board test used the same lowering applied as a special override in the target, not this branch's common.py.

Written by an AI agent (Claude Code), supervised by Florent Kermarrec.

🤖 Generated with Claude Code

…a clock of latency).

ALTDDIO_IN's dataout_h is re-registered to line up with the falling-edge data, one clock
more than SDRInput's contract (o = i registered once). On a DE10-Lite with LiteDRAM's
HalfRateGENSDRPHY (166.67 MHz, CL3), the read data then landed a clock late: the BIOS memtest
and the LiteDRAM BIST still passed (a round trip through one port, at the clock phases where
the SDRAM samples commands and data on different edges), but data written by a native port
(the BIST generator) and read through the CPU's L2 came back with the high half of every word
lost. As a fabric register (packed in the IOE by FAST_INPUT_REGISTER): 0 of 1024 words differ,
and the SDRAM clock phase window grows from 18 to 30 of 48 steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enjoy-digital
enjoy-digital merged commit c6922ca into master Nov 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant