Class to test memory devices by writing/reading random data blocks. More...
#include <MemCheckState.h>
Public Member Functions | |
MemCheckState (MemoryDevice &device) | |
virtual | ~MemCheckState () |
void | execute () |
Public Attributes | |
InterruptDelegate | onComplete |
Protected Member Functions | |
virtual void | fillBlock (uint32_t addr, uint32_t *buffer, size_t size) |
Fill buffer with test data. More... | |
Detailed Description
Class to test memory devices by writing/reading random data blocks.
B: Build outgoing block C: Check received block W: Start write of outgoing block R: Start read of incoming block
CPU B, B C, B C, B | ^ ^ | | | SPI -> W-> R-> W-> R-> W...
Interrupt version, 433ms Additional time due to setup code. A 512 byte buffer creates 772 requests, for each of write/read, a total of 1544 requests. So the additional (433 - 383) = 50ms is from 32us per request. 1024 byte: 443ms 256 byte: 423ms 128 byte: 404ms 64 bytes: ms FAIL
With task queue and packet chaining:
1024 byte: 387ms 512 byte: 391ms 256 byte: 400ms 128 byte: 418ms 64 byte: 452ms
So how come it's faster? Who cares - awesome, way to go :-)
Constructor & Destructor Documentation
◆ MemCheckState()
|
inline |
◆ ~MemCheckState()
|
inlinevirtual |
Member Function Documentation
◆ execute()
|
inline |
◆ fillBlock()
|
inlineprotectedvirtual |
Fill buffer with test data.
- Parameters
-
addr Starting address where data will be written buffer Buffer to store data size Size of buffer in 32-bit words (i.e. byte count = size * 4)
Method is virtual so display devices can be tested which may have quirks in their memory layout.
Member Data Documentation
◆ onComplete
InterruptDelegate HSPI::Test::MemCheckState::onComplete |
The documentation for this class was generated from the following file: