LBIST
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.
LBIST is used to test the logic circuitry in an SoC associated with the CPU cores. There are multiple LBIST instances in the SoC, and each has a different processor core associated with it. There are LBIST tests that can be software-initiated. Those are supported by SDL.
Some things to note:
LBIST is expected to be run at startup or once per drive cycle.
LBIST must be initiated from a different core than is being tested, similar to PBIST
Device supports a software-initiated LBIST that can run be initiated at runtime. Note, however, that LBIST is destructive to the core/IP on which it is run. If it 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. Also, it is not supported to run the LBIST test for a core on itself, as it will be self destructive.
The LBIST Module of the SDL supports execution of the software-initiated LBIST for the various supported instances. It provides the following services:
Execution of the LBIST test for a specified instance
Configuration of the LBIST test for an instance
Start of the LBIST test
Checking of the LBIST results
Restore core to system control (LBIST reset and release test mode)
Return the status of the test
Note
Execution of the LBIST 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 LBIST. Additionally, there is an “exit sequence” that is required to bring the cores/IPs back to the system control after the LBIST test is executed. This will also be the responsibility of the application. The LBIST examples provided with SDL will give the necessary sequences, which can be used by the application for implementing the sequence.
SysConfig Features
None
Features NOT Supported
None
Important Usage Guidelines
Call SDL_LBIST_selfTest( ) to start LBIST test on M4F.
Call SDL_LBIST_checkDone( ) to know the if the LBIST test is completed.
Call SDL_LBIST_checkResult( ) to know the if the MISR signatures are matching. This API should be called only after SDL_LBIST_checkDone( ) API returns LBIST_DONE.
Call SDL_LBIST_selfTest( ) to release the LBIST test mode.
Profiling Data
| LBIST Instance | Test Time |
|---|---|
| R5F | 7884 us |
Note
The above numbers were obtained in the r5fss0-0_freertos setting
Example Usage
None
API Reference
Functions
-
int32_t SDL_LBIST_enableIsolation(SDL_lbistRegs *pLBISTRegs)
Enable LBIST Isolation.
This function enables LBIST isolation. Isolation needs to be enabled before. starting LBIST.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_disableIsolation(SDL_lbistRegs *pLBISTRegs)
Disable LBIST Isolation.
This function disables LBIST isolation. This is done after LBIST is complete. NOTE: This should not be called when the LBIST test is running. If called while LBIST test is running, it may lead to undefined behaviour.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_reset(SDL_lbistRegs *pLBISTRegs)
Reset LBIST.
This function resets LBIST module. This is done preparing for a new LBIST execution, as well as exiting an LBIST execution.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_enableRunBISTMode(SDL_lbistRegs *pLBISTRegs)
Enable run BIST mode.
This function enables Run BIST mode. This is needed to be set before starting LBIST.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_clearRunBISTMode(SDL_lbistRegs *pLBISTRegs)
Clear run BIST mode.
This function clears Run BIST mode. This is done after LBIST execution is complete. If called in the middle of the test, the test may terminate prematurely.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_start(SDL_lbistRegs *pLBISTRegs)
LBIST start.
This function starts LBIST execution.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_stop(SDL_lbistRegs *pLBISTRegs)
LBIST stop.
This function stops LBIST execution. This is normally called after checking the signature and clearing the run-BIST mode. But this can also be called asynchronously to stop LBIST in the middle of a test.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
- Returns:
The SDL error code for the API. If pLBISTRegs is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_isRunning(const SDL_lbistRegs *pLBISTRegs, bool *pIsRunning)
LBIST check running.
This function checks if LBIST is running. Note that this is specifically checking if the LBIST is currently running, and this is different from done status.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
pIsRunning – [OUT] Pointer to variable to indicate running status SDL_TRUE : LBIST is running. SDL_FALSE: LBIST is not running.
- Returns:
The SDL error code for the API. If pLBISTRegs or pIsRunning is NULL: SDL_EBADARGS Success: SDL_PASS.
-
int32_t SDL_LBIST_isDone(const SDL_lbistRegs *pLBISTRegs, bool *pIsDone)
LBIST check done.
This function checks if LBIST is complete. Note that this is different from running status, which shows if the LBIST is curently running.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
pIsDone – [OUT] Pointer to variable to indicate done status SDL_TRUE : LBIST is done SDL_FALSE: LBIST is not complete
- Returns:
The SDL error code for the API. If pLBISTRegs or pIsDone is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_programConfig(SDL_lbistRegs *pLBISTRegs, const SDL_LBIST_config_t *pConfig)
LBIST Program config.
This function configures the parameters for LBIST execution.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
pConfig – [IN] Pointer to LBIST program configuration
- Returns:
The SDL error code for the API. If pLBISTRegs or pConfig is NULL: SDL_EBADARGS Success: SDL_PASS
-
int32_t SDL_LBIST_getMISR(SDL_lbistRegs *pLBISTRegs, uint32_t *pMISRValue)
LBIST get MISR.
This function returns the MISR register. This register holds the Multiple Input Signature generated by LBIST test. It should be called after the LBIST execution has completed.
- Parameters:
pLBISTRegs – [IN] Pointer to LBIST register map
pMISRValue – [OUT] Pointer to MISR value return
- Returns:
The SDL error code for the API. If pLBISTRegs or pMISRValue is NULL: SDL_EBADARGS Success: SDL_PASS
-
struct SDL_LBIST_config_t
- #include <sdl_ip_lbist.h>
This structure contains the different configuration used for LBIST Note that the LBIST configuration is SOC and instance specific Check SOC documentation for configuration details.
Public Members
-
uint32_t dc_def
Clock delay after scan_enable switching
-
uint32_t divide_ratio
LBIST clock divide ratio
-
uint32_t static_pc_def
Bitmap of stuck-at patterns to run
-
uint32_t set_pc_def
Bitmap of set patterns to run
-
uint32_t reset_pc_def
Bitmap of reset patterns to run
-
uint32_t scan_pc_def
Bitmap of chain test patterns to run
-
uint64_t prpg_def
Initial seed for Pseudo Random Pattern generator (PRPG)
-
uint32_t dc_def