lib/sw_services/xilplmi/src/xplmi_event_logging.c
void XPlmi_StoreTraceLog(u32 *TraceData, u32 Len)
{
	u32 Index;
	XPlmi_PerfTime PerfTime;

	/* Get time stamp of PLM */
	XPlmi_MeasurePerfTime((XPLMI_PIT1_CYCLE_VALUE << 32U) |
		XPLMI_PIT2_CYCLE_VALUE, &PerfTime);

	TraceData[0U] = TraceData[0U] | (Len << XPLMI_TRACE_LOG_LEN_SHIFT);
	TraceData[1U] = (u32)PerfTime.TPerfMs;
	TraceData[2U] = (u32)PerfTime.TPerfMsFrac;

	for (Index = 0U; Index < Len; Index++) {
		if (TraceLog.Offset >= TraceLog.Len) {
			TraceLog.Offset = 0x0U;
			TraceLog.IsBufferFull = (u32)TRUE;
		}

		XPlmi_Out64((TraceLog.StartAddr + TraceLog.Offset), TraceData[Index]);
		TraceLog.Offset += XPLMI_WORD_LEN;
	}
}
/*****************************************************************************/
/**
 * @brief	This function stores the trace events to the Trace Log buffer.
 *
 * @param	TraceData to be stored to buffer
 * @param	Len is number of words in TraceData
 *
 * @return	None
 *
 *****************************************************************************/
@brief       This function stores the trace events to the Trace Log buffer.
@param       TraceData to be stored to buffer
@param       Len is number of words in TraceData

@return      None
@brief This function stores the trace events to the Trace Log buffer . @param TraceData to be stored to buffer @param Len is number of words in TraceData @return None
void XPlmi_StoreTraceLog(u32 *TraceData, u32 Len)
{
	u32 Index;
	XPlmi_PerfTime PerfTime;
	XPlmi_MeasurePerfTime((XPLMI_PIT1_CYCLE_VALUE << 32U) |
		XPLMI_PIT2_CYCLE_VALUE, &PerfTime);
	TraceData[0U] = TraceData[0U] | (Len << XPLMI_TRACE_LOG_LEN_SHIFT);
	TraceData[1U] = (u32)PerfTime.TPerfMs;
	TraceData[2U] = (u32)PerfTime.TPerfMsFrac;
	for (Index = 0U; Index < Len; Index++) {
		if (TraceLog.Offset >= TraceLog.Len) {
			TraceLog.Offset = 0x0U;
			TraceLog.IsBufferFull = (u32)TRUE;
		}
		XPlmi_Out64((TraceLog.StartAddr + TraceLog.Offset), TraceData[Index]);
		TraceLog.Offset += XPLMI_WORD_LEN;
	}
}
void XPlmi_StoreTraceLog ( u32 * TraceData , u32 Len ) { u32 Index ; XPlmi_PerfTime PerfTime ; XPlmi_MeasurePerfTime ( ( XPLMI_PIT1_CYCLE_VALUE << 32U ) | XPLMI_PIT2_CYCLE_VALUE , & PerfTime ) ; TraceData [ 0U ] = TraceData [ 0U ] | ( Len << XPLMI_TRACE_LOG_LEN_SHIFT ) ; TraceData [ 1U ] = ( u32 ) PerfTime . TPerfMs ; TraceData [ 2U ] = ( u32 ) PerfTime . TPerfMsFrac ; for ( Index = 0U ; Index < Len ; Index ++ ) { if ( TraceLog . Offset >= TraceLog . Len ) { TraceLog . Offset = 0x0U ; TraceLog . IsBufferFull = ( u32 ) TRUE ; } XPlmi_Out64 ( ( TraceLog . StartAddr + TraceLog . Offset ) , TraceData [ Index ] ) ; TraceLog . Offset += XPLMI_WORD_LEN ; } }
@brief       This function stores the trace events to the Trace Log buffer.
@brief This function stores the trace events to the Trace Log buffer .
/* Get time stamp of PLM */