Initializing the SEU Mitigation - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

To initialize the SEU mitigation, it is first necessary to successfully initialize the inter-processor interrupt (IPI). The following reference code, which can be part of an RPU or APU application, illustrates how to initialize the IPI:

/* Load Config for Processor IPI Channel */
IpiCfgPtr = XIpiPsu_LookupConfig(TARGET_IPI_INT_DEVICE_ID);
if (NULL == IpiCfgPtr) {
	xil_printf("[%s] ERROR: IPI LookupConfig failed\n\r", \
			__func__, Status);
	goto END;
}

/* Initialize the IPI Instance pointer */
Status = XIpiPsu_CfgInitialize(&IpiInst, IpiCfgPtr,
		IpiCfgPtr->BaseAddress);
if (XST_SUCCESS != Status) {
	xil_printf("[%s] ERROR: IPI instance initialize failed\n\r", \
			__func__, Status);
	goto END;
}

Although Configuration RAM scan can be configured to begin automatically, in XilSEM library configurations where this option is not selected, the user is responsible for manually starting the Configuration RAM scan. The following reference code, which can be part of an RPU or APU application, illustrates how to accomplish Configuration RAM scan start-up.

XStatus Status = XST_FAILURE;
XSemIpiResp IpiResp={0};
Status = XSem_CmdCfrInit(&IpiInst, &IpiResp);
if ((XST_SUCCESS == Status) && (CMD_ACK_CFR_INIT == IpiResp.RespMsg1) && (XST_SUCCESS == IpiResp.RespMsg2)) {
       xil_printf("Success: CRAM Initialization Successful\n\r");
} else {
xil_printf("Failure: CRAM Initialization Failed\n\r");       
Status = XST_FAILURE;
}

Similarly, NPI Register scan can be configured to begin automatically, and in XilSEM library configurations where this option is not selected, you are responsible for manually starting the NPI Register scan. The following reference code, which can be part of an RPU or APU application, illustrates how to accomplish NPI Register scan start-up.

XStatus Status = XST_FAILURE;
XSemIpiResp IpiResp={0};
Status = XSem_CmdNpiStartScan(&IpiInst, &IpiResp);
if ((XST_SUCCESS == Status) && (CMD_ACK_NPI_STARTSCAN == IpiResp.RespMsg1) && (XST_SUCCESS == IpiResp.RespMsg2)) {
       xil_printf("Success: NPI Initialization Successful\n\r");
} else {
       xil_printf("Failure: NPI Initialization Failed\n\r");
       Status = XST_FAILURE;
}