mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add udma stresstest feature
This commit is contained in:
parent
ffb00cf6ad
commit
2dddae34fc
2 changed files with 12 additions and 0 deletions
|
|
@ -32,6 +32,9 @@ board-baosec = [] # USB form factor token
|
|||
board-baosor = [] # Precursor form factor
|
||||
board-dabao = [] # Dev board form factor
|
||||
|
||||
udma-stress-test = [
|
||||
] # For RTL simulation testing - aggravates a key corner case
|
||||
|
||||
compress-entropy = []
|
||||
magic-manual = []
|
||||
std = ["log", "xous-api-names", "usb-device", "xous-api-ticktimer"]
|
||||
|
|
|
|||
|
|
@ -426,6 +426,15 @@ pub trait Udma {
|
|||
}
|
||||
}
|
||||
fn udma_busy(&self, bank: Bank) -> bool {
|
||||
// create dummy traffic on IFRAM that causes stall conditions on the bus
|
||||
// the write is totally bogus and
|
||||
#[cfg(feature = "udma-stress-test")]
|
||||
for i in 0..12 {
|
||||
unsafe {
|
||||
let ifram_tickle = 0x5000_0000 as *mut u32;
|
||||
ifram_tickle.add(i).write_volatile(i as u32);
|
||||
}
|
||||
}
|
||||
// Safety: only safe when used in the context of UDMA registers.
|
||||
unsafe {
|
||||
let saddr = self.csr().base().add(bank as usize).add(DmaReg::Saddr.into()).read_volatile();
|
||||
|
|
|
|||
Loading…
Reference in a new issue