PHY clock modes and DLL recalibration
Registers of group 0x02 that select the PHY clock and recalibrate the
DLL, with what we measured on the board.
Clock selection
Register |
Meaning |
|---|---|
|
bits |
|
|
|
PLL reset: |
Neither 0x200a2 nor 0x200f8 is part of phypara: a restored result
does not set the clock mode [spec: docsClean/07].
Two fixed sequences are used [spec: docsClean/07, docsClean/11]:
to direct clock: 0x200a2 = (v & 0xfffc) | 1; delay_dfi_clks(4);
0x200f8 = 1; delay_dfi_clks(0x1f)
to PLL clock: delay_dfi_clks(0x1f); 0x200f8 = 0;
delay_dfi_clks(4); 0x200a2 = (v & 0xfffc) | 2
DevInit starts on the direct clock, locks the PLL in step 3.5 (400 µs wait) and switches to the PLL clock (DevInit (SequenceCtrl[0])).
Quickboot switches to the PLL clock before the MR bursts and back to the direct clock before the DLL recalibration, and ends in direct-clock mode. Without the switch back, the memory test fails in about one boot of three with whole byte lanes or rank 1 one beat off; with it, 10 boots of 10 are clean [exp 018, exp 019].
A training burst needs the PLL clock mode [spec: docsClean/07].
Switching PLL → direct → PLL after the DLL recalibration and then restoring the direct clock leaves the memory failing (about 30 % of the words) [exp 019, open: which step is not reversible].
Period counters and frequency buckets (0x2000a, 0x20017, 0x20012,
0x20186, 0x20187) are described in DevInit (SequenceCtrl[0]).
Quickboot does not measure the period: it restores 0x2000a/12/17 from
the saved result [spec: docsClean/11].
ACSM clock multiplier
0x20042 and 0x20044 are set by DevInit step 6.3 (0x20042 = mult |
0x100, 0x20044 = 2 at ratio 4) and are 0 in a final result. With
0x20042 = 0x0108 the same 20-entry ACSM burst takes 12 times longer to
report done (48 polls instead of 4) [exp 016]. They belong to write
leveling, not to RdDQS [spec: docsClean/07].
ACSM dividers 0x90808 / 0x90813 are (0x20314 << 8) | 1 and
(0x20315 << 8) | 1; 0x20314/15 are read-only calibration outputs that
change by a few counts from boot to boot (0x36–0x37, 0x79–0x7d)
[exp 012]. A restored result must recompute them after the DLL
recalibration [spec: docsClean/11].
DLL recalibration (quickboot step 6)
Sequence [spec: docsClean/11; confirmed exp 016, exp 019]:
delay_ps_or_clks(0, 0x40) (multiplier off: 65 ticks)
0x2f310 = 1; 0x2f0f8 = 1
u = 0x20049 & 0x01f0
0x2f049 = u | 0x0400; wait 1 ns
0x2f0e0 = 1; wait 1 us
code = 0x200cf <- only valid here
0x2f0c3 = 1; 0x2f0e0 = 0; 0x2f049 = u | 0x0200
0x2004e + pstate = code & 0x1f
0x9f02d = 1 (PHY version 8..10; a level, never cleared)
0x2f009 + pstate = value of 0x20009 saved at the start
Measured:
0x200cfis live only while ``0x2f0e0 = 1``. Read at any other time (before the DQ reset, after the PLL sequence, after the recalibration, up to 120 ms later, or from the host) it returns0x1f[exp 015].Sampled at the right moment it gives
0x0con PHY0 and0x0don PHY1, the reference values, in every boot (10 of 10) [exp 016, exp 019].0x20049reads0x3f0before the PLL sequence,0x1f0after DevInit step 3.5 writes0x01f0, and0x3f0again after the recalibration;0x200c3reads1,0,1at the same points [exp 015].0x2004eis inphypara. A host restore must not overwrite the value sampled in the current boot (same value in our runs, so no effect was seen) [exp 016].Nothing is polled after
0x2f0c3 = 1[spec].
Commit strobes
Strobe |
Use |
|---|---|
|
configuration commit after a logical block of writes; strict order, no wait between them [spec: docsClean/07] |
|
channel commit (after routing or channel selection changes) |
|
only when |
A host write of a per-bit read delay needs none of them [exp 015].