Report the EMC DLL's code from its calibration start value

EMC_DIG_DLL_STATUS.DLL_OUT (10:0) read 0. TRM 18.11.2.219 gives the
basis the earlier note said was missing: EMC_DLL_CFG_1's
DDLLCAL_CTRL_START_TRIM (10:0, reset 0x20) is the DLL calibration's
start value, which the timing table sets per frequency. With no delay
line to drift, calibration has nothing to move it by, so DLL_OUT now
reports the channel's start trim once the DLL locks. EMC_DLL_CFG_1
reads its reset value until written.

Minerva's _digital_dll_prelock() returns the value and nothing reads it
further; DRAM training and the 800/1600 MHz switching are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYewwDPujjo5B2xRyC5Grb
This commit is contained in:
Claude committed 2026-09-26 10:23:31 +00:00
1 parent 6d5ccb5328
commit 803729580b
2 files changed
+19 -7

No files matched your search

+6 -3
View File
@@ -204,7 +204,12 @@ frequency-switching module, depend on:
400 ps tDQS2DQ. Minerva divides by that count.
- **Digital DLL.** `EMC_DIG_DLL_STATUS` reports lock as soon as the DLL is
(re)started; `EMC_CFG_DIG_DLL.CFG_DLL_EN` reads back as written, which is
what Minerva spins on around each DLL restart.
what Minerva spins on around each DLL restart. The DLL's code, `DLL_OUT`
(10:0), is where its calibration starts: the channel's
`EMC_DLL_CFG_1.DDLLCAL_CTRL_START_TRIM` (10:0, reset 0x20, TRM
18.11.2.219), which the timing table programs per frequency. With no
delay line to drift, calibration has nothing to move it by. (Minerva's
`_digital_dll_prelock()` returns it; nothing reads it further.)
- **Clock change.** A new source or divisor in CAR `CLK_SOURCE_EMC` (TRM
5.2.73) is the CAR/EMC handshake: the EMC replays the writes queued in its
clock-change FIFO (`EMC_CCFIFO_DATA` / `_ADDR`) and raises
@@ -215,8 +220,6 @@ frequency-switching module, depend on:
DRAM active and the state machines idle.
- **Measured clock.** bdk's PTO counter measures the EMC at the modelled
clock (the measured 204 MHz figure at the boot clock).
- **Not modelled.** The DLL's delay code (`DLL_OUT`) reads 0: the TRM gives
no tap delay to derive it from.
With the stock `bootloader/` folder, hekate's IPL trains 204, 800 and
1600 MHz, and Nyx then switches between 800 and 1600 MHz on every GUI loop,