firmware/liboard_misoc/sdram: use similar loops on read_level_scan and read_level for consistent results

This commit is contained in:
Florent Kermarrec 2018-10-16 09:40:39 +02:00
parent 6357a50d33
commit 3318925f4e
1 changed files with 6 additions and 6 deletions

View File

@ -244,13 +244,13 @@ mod ddr {
ddrphy::rdly_dq_rst_write(1); ddrphy::rdly_dq_rst_write(1);
for _ in 0..DDRPHY_MAX_DELAY { for _ in 0..DDRPHY_MAX_DELAY {
let mut working = true;
for _ in 0..256 {
sdram_phy::command_prd(DFII_COMMAND_CAS|DFII_COMMAND_CS| sdram_phy::command_prd(DFII_COMMAND_CAS|DFII_COMMAND_CS|
DFII_COMMAND_RDDATA); DFII_COMMAND_RDDATA);
spin_cycles(15); spin_cycles(15);
let mut working = true;
for p in 0..DFII_NPHASES { for p in 0..DFII_NPHASES {
for _ in 0..1024 {
for &offset in [n, n + DQS_SIGNAL_COUNT].iter() { for &offset in [n, n + DQS_SIGNAL_COUNT].iter() {
let addr = DFII_PIX_RDDATA_ADDR[p].offset(offset as isize); let addr = DFII_PIX_RDDATA_ADDR[p].offset(offset as isize);
let data = prs[DFII_PIX_DATA_SIZE * p + offset]; let data = prs[DFII_PIX_DATA_SIZE * p + offset];