Nut/OS  5.0.5
API Reference
memtest.c File Reference
This graph shows which files directly or indirectly include this file:

Functions

datum MemtestDataBus (volatile datum *addr)
 Check data bus wiring on a 8 bit databus.
datumMemtestAddrBus (volatile datum *base, size_t size)
 Check address bus wiring on a 8 bit databus.
datumMemtestDevice (volatile datum *base, size_t size)
 Check address bus wiring on a 8 bit databus.

Function Documentation

datum MemtestDataBus ( volatile datum addr)

Check data bus wiring on a 8 bit databus.

Test the data bus wiring in a memory region by performing a walking 1's test at a fixed address within that region. The address (and hence the memory region) is selected by the caller.

Parameters:
addrmemory address that shall be used for this test
Returns:
0 on success, a non-zero result is the first pattern that failed
datum* MemtestAddrBus ( volatile datum base,
size_t  size 
)

Check address bus wiring on a 8 bit databus.

Test the address bus wiring in a memory region by performing a walking 1's test on the relevant bits of the address and checking for aliasing. This test will find single-bit address failures such as stuck -high, stuck-low, and shorted pins.

The base address and size of the region are selected by the caller.

For best results, the selected base address should have enough LSB 0's to guarantee single address bit changes. For example, to test a 64-Kbyte region, select a base address on a 64-Kbyte boundary. Also, select the region size as a power-of-two--if at all possible.

Parameters:
basememory base address that shall be used for this test
sizesize of the memory region
Returns:
NULL if the test succeeds. A non-zero result is the first address at which an aliasing problem was uncovered. By examining the contents of memory, it may be possible to gather additional information about the problem.

References NULL.

datum* MemtestDevice ( volatile datum base,
size_t  size 
)

Check address bus wiring on a 8 bit databus.

Test the integrity of a physical memory device by performing an increment/decrement test over the entire region. In the process every storage bit in the device is tested as a zero and a one.

The base address and size of the region are selected by the caller.

Parameters:
basememory base address that shall be used for this test
sizesize of the memory region
Returns:
NULL if the test succeeds. Also, in that case, the entire memory region will be filled with zeros.

A non-zero result is the first address at which an incorrect value was read back. By examining the contents of memory, it may be possible to gather additional information about the problem.

References NULL.