PBIST
Built-in Self-test (BIST) is a feature that allows self testing of the memory areas and logic circuitry in an Integrated Circuit (IC) without any external test equipment. In an embedded system, these tests are typically used during boot time or shutdown of the system to check the health of an SoC.
PBIST is used to test the memory regions in the SoC and provides detection for permanent faults. The primary use case for PBIST is when it is invoked at start-up providing valuable information on any stuck-at bits in the memory.
There can be multiple instances of PBIST in the SoC, and each has a number of memory regions associated with it. SDL provides support for PBIST features such as execution of PBIST test-for-diagnostic to test the PBIST logic and execution of PBIST. The same API is used with different configuration parameters to execute each instance. Checking of the status of HW POST PBIST execution is also supported.
Some things to note:
PBIST is expected to be run at boot-time or once per drive cycle.
PBIST must be run from a different core than is being tested. This is because the test is destructive in nature. For this reason also, after BIST test it is necessary to reset the module.
If SW-initiated PBIST is executed after the IP under test is already in use in the system, it is the application’s responsibility to perform any necessary context save/restore necessary for the core/IP.
Features Supported
The PBIST Module of the SDL supports execution of the software-initiated PBIST for the various supported instances. It provides the following services:
Execution of the PBIST test for a specified instance
Checking of the PBIST results
Restore core to system control (PBIST reset and release test mode)
Return the status of the test
SysConfig Features
None
Features NOT Supported
None
Important Usage Guidelines
Execution of the PBIST tests requires preparation of the IPs under test by bringing them to a certain power and reset state before executing the test. It will be required that the application bring the cores/IPs to the proper state before executing the PBIST. Additionally, there is an “exit sequence” that is required to bring the cores/IPs back to the system control after the PBIST test is executed. This will also be the responsibility of the application. The PBIST examples provided with SDL will give the necessary sequences, which can be used by the application for implementing the sequence.
The PBIST module uses ESM events to detect completion of the test. The application should not enable these events through SDL_ESM_init in order to prevent interference with the test execution.
Profiling Data
| PBIST Instance | Negative Test Time | Positive Test Time | Total Test Time |
|---|---|---|---|
| A53 MPU CLUSTER0 | 339 us | 35129 us | 35468 us |
| C7X256V0 PBIST | 220 us | 12454 us | 12674 us |
| MAIN PBIST0 | 1039 us | 15890 us | 16929 us |
| All instances | 1598 us | 63473 us | 65071 us |
Note
The above numbers were obtained in the mcu-r5fss0-0_nortos setting
Example Usage
The following shows an example of SDL PBIST API usage by the application to execute the PBIST test and test-for-diagnostic.
Include the below file to access the APIs
#include <sdl/sdl_pbist.h>
Note: Do not initialize the ESM to detect PBIST completion events
Before executing the following PBIST tests, the IP under test must be brought to a certain power and reset state. The included PBIST example shows the sequence needed for each of the PBIST instances.
Once the core(s) are brought to the required state, the following APIs can be run.
Run the PBIST test-for-diagnostic:
bool PBISTResult;
status = SDL_PBIST_selfTest(SDL_PBIST_INST_MPU, SDL_PBIST_NEG_TEST, timeoutVal, &PBISTResult);
if ((status != SDL_PASS) || (PBISTResult == false))
{
// test failed
}
Perform the PBIST test
bool PBISTResult;
status = SDL_PBIST_selfTest(SDL_PBIST_INST_MPU, SDL_PBIST_TEST, timeoutVal, &PBISTResult);
if ((status != SDL_PASS) || (PBISTResult == false))
{
// test failed
}
API Reference
This file contains the SDL PBIST API’s.
Enums
-
enum SDL_PBIST_testType
PBIST self test type.
This enum defines the test types supported by the SDL_PBIST_selfTest API.
Values:
-
enumerator SDL_PBIST_TEST
PBIST Test Performs the PBIST test for a the instance specified. When a valid pConfig is passed, those values will be used to execute the test. If pConfig is NULL (recommended), then the default “golden vectors” will be used to execute the test.
-
enumerator SDL_PBIST_NEG_TEST
PBIST Negative Test Performs the PBIST negative test to verify the PBIST logic for the instance specified
-
enumerator SDL_PBIST_TEST
Functions
-
int32_t SDL_PBIST_selfTest(SDL_PBIST_inst instance, SDL_PBIST_testType testType, uint32_t timeout, bool *pResult)
PBIST self test.
This function executes a PBIST self test of the specified type for a specific PBIST instance. The test types supported are defined in SDL_PBIST_testType. PBIST is a feature that is used for self test of the memory regions in the SoC. Multiple instances may be supported. Note: The PBIST test is destructive to the cores/IP which are being tested. Therefore it should be executed from a different core than the one under test. It is important to note that execution of PBIST self-tests require preparation of the IPS under test by bringing them to a certain power and reset state before executing the test. The application must take care of this sequence before executing the self-test. The SDL examples give a reference for the necessary sequences. The PBIST instances supported are specific to the SoC, and are defined in the soc-specific header file.
- Parameters:
instance – [IN] PBIST instance
testType – [IN] PBIST test type to run.
timeout – [IN] Max number of times to check for PBIST done
pResult – [OUT] Pointer to variable to indicate result
- Returns:
The SDL error code for the API. If pResult is NULL: SDL_EBADARGS If testType is invalid: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS
-
int32_t SDL_SBL_PBIST_selfTest(SDL_PBIST_inst instance, SDL_PBIST_testType testType)
PBIST self test for MCU only.
This function executes a PBIST self test of the specified type for a MCU PBIST instance. The test types supported are defined in SDL_PBIST_testType. PBIST is a feature that is used for self test of the memory regions in the SoC. Multiple instances may be supported. Note: The PBIST test is destructive to the cores/IP which are being tested. Therefore it should be executed from a different core than the one under test. It is important to note that execution of PBIST self-tests require preparation of the IPS under test by bringing them to a certain power and reset state before executing the test. The application must take care of this sequence before executing the self-test. The SDL examples give a reference for the necessary sequences. The PBIST instances supported are specific to the SoC, and are defined in the soc-specific header file.
- Parameters:
instance – [IN] PBIST instance
testType – [IN] PBIST test type to run.
- Returns:
The SDL error code for the API. If pResult is NULL: SDL_EBADARGS If testType is invalid: SDL_EBADARGS If other error happened: SDL_EFAIL Success: SDL_PASS
-
uint32_t SDL_SBL_PBIST_checkDone(SDL_PBIST_inst instance)
PBIST API to check if the test is complete.
This function checks if the PBIST test is complete.
- Parameters:
instance – [IN] PBIST instance
- Returns:
The SDL error code for the API. Success:PBIST_DONE Fail:PBIST_NOT_DONE
-
int32_t SDL_SBL_PBIST_checkResult(SDL_PBIST_inst instance)
PBIST API to check if PBIST test is executed successfully.
This function checks if the PBIST test is executed successfully..
- Parameters:
instance – [IN] PBIST instance
- Returns:
The SDL error code for the API. Success:SDL_PASS Fail:SDL_EFAIL