lib/sw_services/xilsem/examples/xsem_cram_example.c
XStatus XSem_CfrApiErrNjct (XSemCfrErrInjData *ErrData)
{
	XStatus Status = XST_FAILURE;
	XSemIpiResp IpiResp={0};

	Status = XSem_CmdCfrNjctErr(&IpiInst, ErrData, &IpiResp);

	if ((XST_SUCCESS == Status) && \
			(CMD_ACK_CFR_NJCT_ERR == IpiResp.RespMsg1)) {
		if (XST_SUCCESS != IpiResp.RespMsg2) {
			xil_printf("[%s] Error: Injection Failed with 0x%x\n", \
					__func__, IpiResp.RespMsg2);
			Status = (XStatus) IpiResp.RespMsg2;
		} else {
			xil_printf("[%s] Success: Inject\n\r", __func__);
		}
	} else {
		xil_printf("[%s] Error: Njct Status 0x%x Ack 0x%x Ret 0x%x\n", \
				__func__, Status, IpiResp.RespMsg1, \
				IpiResp.RespMsg2);
	}

	return Status;
}
/*****************************************************************************
 *
 * @brief    	Function to inject error in CFRAME using Client IPI interface.
 *
 * @param    	ErrData : Pointer to Error details
 *
 * @return    	XST_SUCCESS : upon successful error injection.
 *   		XST_FAILURE : Any failure IPI interface
 *     		Error Codes : Below error codes upon failure during injection
 *		0x00500000U : If CRAM Scan is not initialized
 * 		0X00002000U : On getting Cframe driver instance as Null
 * 		0x00800000U : If invalid row is passed as input
 * 		0x00E00000U : If invalid block type is passed as input
 * 		0x00A00000U : If invalid bit is passed as input
 * 		0x00B00000U : If invalid frame is passed as input
 * 		0x00900000U : If invalid qword is passed as input
 * 		0x00D00000U : If input bit is masked
 * 		0x00C00000U : If injection is failed
 *****************************************************************************/
@brief       Function to inject error in CFRAME using Client IPI interface.
@param       ErrData : Pointer to Error details

@return      XST_SUCCESS : upon successful error injection.
@brief Function to inject error in CFRAME using Client IPI interface . @param ErrData : Pointer to Error details @return XST_SUCCESS : upon successful error injection .
XStatus XSem_CfrApiErrNjct (XSemCfrErrInjData *ErrData)
{
	XStatus Status = XST_FAILURE;
	XSemIpiResp IpiResp={0};
	Status = XSem_CmdCfrNjctErr(&IpiInst, ErrData, &IpiResp);
	if ((XST_SUCCESS == Status) && \
			(CMD_ACK_CFR_NJCT_ERR == IpiResp.RespMsg1)) {
		if (XST_SUCCESS != IpiResp.RespMsg2) {
			xil_printf("[%s] Error: Injection Failed with 0x%x\n", \
					__func__, IpiResp.RespMsg2);
			Status = (XStatus) IpiResp.RespMsg2;
		} else {
			xil_printf("[%s] Success: Inject\n\r", __func__);
		}
	} else {
		xil_printf("[%s] Error: Njct Status 0x%x Ack 0x%x Ret 0x%x\n", \
				__func__, Status, IpiResp.RespMsg1, \
				IpiResp.RespMsg2);
	}
	return Status;
}
XStatus XSem_CfrApiErrNjct ( XSemCfrErrInjData * ErrData ) { XStatus Status = XST_FAILURE ; XSemIpiResp IpiResp = { 0 } ; Status = XSem_CmdCfrNjctErr ( & IpiInst , ErrData , & IpiResp ) ; if ( ( XST_SUCCESS == Status ) && ( CMD_ACK_CFR_NJCT_ERR == IpiResp . RespMsg1 ) ) { if ( XST_SUCCESS != IpiResp . RespMsg2 ) { xil_printf ( " \n " , __func__ , IpiResp . RespMsg2 ) ; Status = ( XStatus ) IpiResp . RespMsg2 ; } else { xil_printf ( " \n \r " , __func__ ) ; } } else { xil_printf ( " \n " , __func__ , Status , IpiResp . RespMsg1 , IpiResp . RespMsg2 ) ; } return Status ; }
@brief       Function to inject error in CFRAME using Client IPI interface.
@brief Function to inject error in CFRAME using Client IPI interface .