lib/sw_apps/zynqmp_dram_test/src/xmt_main.c
static u64 XMt_GetRefVal(u64 Addr, u64 Index, s32 ModeVal, u64 *Pattern, s64 RandVal)
{
	u64 RefVal;
	u64 Mod128;

	if (ModeVal == 0U) {
		RefVal = ((((Addr + 4) << 32) | Addr) & U64_MASK);
	} else if (ModeVal <= 8U) {
		RefVal = (u64)Pattern[(Index % 32) / 8];
	} else if (ModeVal <= 10U) {
		Mod128 = (Index >> 2) & 0x07f;
		RefVal = (u64)Pattern[Mod128] & U64_MASK;
	} else {
		/* Create a Random Value */
		RefVal = XMT_RANDOM_VALUE(RandVal * Index) & U64_MASK;
	}

	return RefVal;
}
/*****************************************************************************/
/**
 * This function creates a reference value which can be used to write to the
 * address or can be used to compare the data read from the address.
 *
 * @param Addr is the Address for which the RefVal is to be created
 * @param Index is the number indicating the byte number
 * @param ModeVal is the Mode number for the test
 * @param Pattern is the Test Pattern to be written
 *
 * @return Reference Value
 *
 * @note none
 *****************************************************************************/
This function creates a reference value which can be used to write to the
address or can be used to compare the data read from the address.

@param Addr is the Address for which the RefVal is to be created
@param Index is the number indicating the byte number
@param ModeVal is the Mode number for the test
@param Pattern is the Test Pattern to be written

@return Reference Value

@note none
This function creates a reference value which can be used to write to the address or can be used to compare the data read from the address . @param Addr is the Address for which the RefVal is to be created @param Index is the number indicating the byte number @param ModeVal is the Mode number for the test @param Pattern is the Test Pattern to be written @return Reference Value @note none
static u64 XMt_GetRefVal(u64 Addr, u64 Index, s32 ModeVal, u64 *Pattern, s64 RandVal)
{
	u64 RefVal;
	u64 Mod128;
	if (ModeVal == 0U) {
		RefVal = ((((Addr + 4) << 32) | Addr) & U64_MASK);
	} else if (ModeVal <= 8U) {
		RefVal = (u64)Pattern[(Index % 32) / 8];
	} else if (ModeVal <= 10U) {
		Mod128 = (Index >> 2) & 0x07f;
		RefVal = (u64)Pattern[Mod128] & U64_MASK;
	} else {
		RefVal = XMT_RANDOM_VALUE(RandVal * Index) & U64_MASK;
	}
	return RefVal;
}
static u64 XMt_GetRefVal ( u64 Addr , u64 Index , s32 ModeVal , u64 * Pattern , s64 RandVal ) { u64 RefVal ; u64 Mod128 ; if ( ModeVal == 0U ) { RefVal = ( ( ( ( Addr + 4 ) << 32 ) | Addr ) & U64_MASK ) ; } else if ( ModeVal <= 8U ) { RefVal = ( u64 ) Pattern [ ( Index % 32 ) / 8 ] ; } else if ( ModeVal <= 10U ) { Mod128 = ( Index >> 2 ) & 0x07f ; RefVal = ( u64 ) Pattern [ Mod128 ] & U64_MASK ; } else { RefVal = XMT_RANDOM_VALUE ( RandVal * Index ) & U64_MASK ; } return RefVal ; }
This function creates a reference value which can be used to write to the
 address or can be used to compare the data read from the address.
This function creates a reference value which can be used to write to the address or can be used to compare the data read from the address .
/* Create a Random Value */