lib/sw_services/xilsem/examples/xsem_cram_example.c
XStatus Xsem_CfrApiInjctCrcErr()
{
	/* To inject CRC error, the injection has to be done in alternate bit
     * positions of the same qword in 3 or more than 3 positions.
	 * The argument details are
	 * ErrData[0]: Frame Address : 0, Quadword: 0, Bit position: 0, Row: 0
	 * ErrData[1]: Frame Address : 0, Quadword: 0, Bit position: 2, Row: 0
	 * ErrData[2]: Frame Address : 0, Quadword: 0, Bit position: 4, Row: 0
	 * ErrData[3]: Frame Address : 0, Quadword: 0, Bit position: 6, Row: 0
	 */
	XSemCfrErrInjData ErrData[4] = {{0, 0, 0, 0},
					{0, 0, 2, 0},
					{0, 0, 4, 0},
					{0, 0, 6, 0},
					};
	XStatus Status = 0U;
	u32 Index = 0U;

	for(Index = 0U; Index < 4U; Index++){
		Status = XSem_CfrApiErrNjct(&ErrData[Index]);
		if(Status == XST_FAILURE){
			xil_printf("Error injection failed due to" \
				" IPI failure\n\r");
			break;
		}
	}

	return Status;
}
/******************************************************************************
 * @brief	This function is used to inject CRC error. This error is treated as
 * uncorrectable error.
 *
 * @return	Status : Success or Failure
 *****************************************************************************/
@brief       This function is used to inject CRC error. This error is treated as
uncorrectable error.

@return      Status : Success or Failure
@brief This function is used to inject CRC error . This error is treated as uncorrectable error . @return Status : Success or Failure
XStatus Xsem_CfrApiInjctCrcErr()
{
	XSemCfrErrInjData ErrData[4] = {{0, 0, 0, 0},
					{0, 0, 2, 0},
					{0, 0, 4, 0},
					{0, 0, 6, 0},
					};
	XStatus Status = 0U;
	u32 Index = 0U;
	for(Index = 0U; Index < 4U; Index++){
		Status = XSem_CfrApiErrNjct(&ErrData[Index]);
		if(Status == XST_FAILURE){
			xil_printf("Error injection failed due to" \
				" IPI failure\n\r");
			break;
		}
	}
	return Status;
}
XStatus Xsem_CfrApiInjctCrcErr ( ) { XSemCfrErrInjData ErrData [ 4 ] = { { 0 , 0 , 0 , 0 } , { 0 , 0 , 2 , 0 } , { 0 , 0 , 4 , 0 } , { 0 , 0 , 6 , 0 } , } ; XStatus Status = 0U ; u32 Index = 0U ; for ( Index = 0U ; Index < 4U ; Index ++ ) { Status = XSem_CfrApiErrNjct ( & ErrData [ Index ] ) ; if ( Status == XST_FAILURE ) { xil_printf ( " " " \n \r " ) ; break ; } } return Status ; }
@brief       This function is used to inject CRC error.
@brief This function is used to inject CRC error .
/* To inject CRC error, the injection has to be done in alternate bit
     * positions of the same qword in 3 or more than 3 positions.
	 * The argument details are
	 * ErrData[0]: Frame Address : 0, Quadword: 0, Bit position: 0, Row: 0
	 * ErrData[1]: Frame Address : 0, Quadword: 0, Bit position: 2, Row: 0
	 * ErrData[2]: Frame Address : 0, Quadword: 0, Bit position: 4, Row: 0
	 * ErrData[3]: Frame Address : 0, Quadword: 0, Bit position: 6, Row: 0
	 */