mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
improve the bdma test
this makes the output of the bdma test a bit more compact, and adds some features to help CI automation to pick out failures to help validate if fixes are durable
This commit is contained in:
parent
b64cff6f86
commit
d45330e65d
2 changed files with 16 additions and 8 deletions
|
|
@ -6,7 +6,7 @@ use utralib::utra::bio_bdma::SFR_CONFIG_CLOCKING_MODE;
|
||||||
use utralib::*;
|
use utralib::*;
|
||||||
use xous_bio_bdma::*;
|
use xous_bio_bdma::*;
|
||||||
|
|
||||||
use crate::{print, println};
|
use crate::println;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pub fn bdma_test(_args: &Vec<String>, seed: u32) -> usize {
|
pub fn bdma_test(_args: &Vec<String>, seed: u32) -> usize {
|
||||||
|
|
@ -204,8 +204,7 @@ impl TestPattern {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bdma_coincident_test(_args: &Vec<String>, seed: u32) -> usize {
|
pub fn bdma_coincident_test(_args: &Vec<String>, seed: u32, clkmode: u32) -> usize {
|
||||||
let clkmode = 0;
|
|
||||||
const TEST_LEN: usize = 1024;
|
const TEST_LEN: usize = 1024;
|
||||||
|
|
||||||
let mut passing = 0;
|
let mut passing = 0;
|
||||||
|
|
@ -286,10 +285,10 @@ fn coincident_u32(
|
||||||
for (i, &d) in src.iter().enumerate() {
|
for (i, &d) in src.iter().enumerate() {
|
||||||
let rbk = unsafe { dst.as_ptr().add(i).read_volatile() };
|
let rbk = unsafe { dst.as_ptr().add(i).read_volatile() };
|
||||||
if rbk != d {
|
if rbk != d {
|
||||||
if errs < 4 {
|
if errs < 3 {
|
||||||
println!("{} err @{}, {:x} rbk: {:x}", name, i, d, rbk);
|
println!("{} err @{}, {:x} rbk: {:x}", name, i, d, rbk);
|
||||||
} else {
|
} else {
|
||||||
print!(".");
|
// crate::print!(".");
|
||||||
}
|
}
|
||||||
errs += 1;
|
errs += 1;
|
||||||
pass = 0;
|
pass = 0;
|
||||||
|
|
|
||||||
|
|
@ -458,11 +458,20 @@ impl Repl {
|
||||||
#[cfg(feature = "bao1x-bio")]
|
#[cfg(feature = "bao1x-bio")]
|
||||||
"bdma" => {
|
"bdma" => {
|
||||||
let mut seed = 0;
|
let mut seed = 0;
|
||||||
|
let mut clkmode: u32 = 3;
|
||||||
|
let mut passing: bool;
|
||||||
loop {
|
loop {
|
||||||
crate::platform::bio::bdma_coincident_test(&args, seed);
|
crate::println!("seed {}, clkmode {}", seed, clkmode);
|
||||||
|
if crate::platform::bio::bdma_coincident_test(&args, seed, clkmode) != 4 {
|
||||||
|
clkmode = (clkmode + 1) % 4;
|
||||||
|
passing = false;
|
||||||
|
crate::println!("~~BDMAFAIL~~");
|
||||||
|
} else {
|
||||||
|
passing = true
|
||||||
|
};
|
||||||
|
crate::println!(" pasing: {:?}", passing);
|
||||||
seed += 1;
|
seed += 1;
|
||||||
crate::println!("seed {}", seed);
|
if passing || seed > 8 {
|
||||||
if seed > 32 {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue