forked from M-Labs/artiq
bootloader: repeat memory test 4 times
This commit is contained in:
parent
6fb0cbfcd3
commit
495625b99d
@ -64,6 +64,7 @@ fn memory_test(total: &mut usize, wrong: &mut usize) -> bool {
|
||||
fn prng32(seed: &mut u32) -> u32 { *seed = 1664525 * *seed + 1013904223; *seed }
|
||||
fn prng16(seed: &mut u16) -> u16 { *seed = 25173 * *seed + 13849; *seed }
|
||||
|
||||
for _ in 0..4 {
|
||||
// Test data bus
|
||||
test!((); for i in (0..0x100) { MEMORY[i] = 0xAAAAAAAA });
|
||||
test!((); for i in (0..0x100) { MEMORY[i] = 0x55555555 });
|
||||
@ -75,7 +76,7 @@ fn memory_test(total: &mut usize, wrong: &mut usize) -> bool {
|
||||
// Test random addressing with counter data
|
||||
test!(let mut seed = 0;
|
||||
for i in (0..0x10000) { MEMORY[prng16(&mut seed)] = i });
|
||||
|
||||
}
|
||||
*wrong == 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user