Microchip® Advanced Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Common EBI test functions

This module contains common functions for testing of External Bus Interface (EBI) and the setup of external RAM devices.

The functions tests for:

The test functions are meant for use with Test Suite Framework and require that the test data has been set to an initialized ebi_test_params struct.

Modules

 

Data Structures

struct  ebi_test_params
 EBI test parameters. More...
 

Functions

void run_address_bus_test (const struct test_case *test)
 Test the address bus. More...
 
void run_data_bus_test (const struct test_case *test)
 Test the data bus. More...
 
void run_data_integrity_test (const struct test_case *test)
 Test the data integrity. More...
 

Variables

hugemem_ptr_t ebi_test_params::base
 
uint32_t ebi_test_params::size
 

void run_address_bus_test ( const struct test_case test)

Test the address bus.

Tests the address bus for stuck and coupled lines.

The bytes at base and all power-of-two locations are initialized with the value 0x55 before any testing of the address bus is done.

The first test of the address bus is for lines that are stuck high. This is done by writing the value 0xAA to the base, then verifying that all power-of-two locations still contain 0x55.

The address bus is then checked for lines that are stuck low or coupled. The base location is reinitialized with the value 0x55 before this test. The value 0xAA is then temporarily written to the individual power-of-two locations while the content of the others (base and power-of-two) are verified to still contain 0x55.

Parameters
testCurrent test case.

References ebi_test_params::base, hugemem_read8(), hugemem_write8(), params, ebi_test_params::size, test_assert_true, and test_get_data().

Referenced by main().

void run_data_bus_test ( const struct test_case test)

Test the data bus.

Tests the data bus for stuck and coupled lines by writing and verifying bit patterns in RAM.

First, unique 32-bit patterns with a single set bit are written to successive locations in memory. These patterns are referred to as a walking 1 since the bit pattern is shifted by 1 position for each new memory location.

The patterns are then read back for verification, inverted and written back to the memory location – the memory locations now contain a walking 0. These patterns are read back again for verification.

Parameters
testCurrent test case.

References ebi_test_params::base, hugemem_read32(), hugemem_write32(), params, test_assert_true, and test_get_data().

Referenced by main().

void run_data_integrity_test ( const struct test_case test)

Test the data integrity.

Tests the integrity of the entire SDRAM by filling it a sequence of incrementing 32-bit values and then verifying its content. This is done in two passes, with an inversion of the content after the first pass of verification.

Note
This test does not give 100% coverage for possible faults in SDRAM. For exhaustive testing of memory, you may refer to literature on MARCH test algorithms.
Parameters
testCurrent test case.

References ebi_test_params::base, hugemem_read32(), hugemem_write32(), params, ebi_test_params::size, test_assert_true, and test_get_data().

Referenced by main().

uint32_t ebi_test_params::size