XilinxProcessorIPLib/drivers/aiengine/src/tile/xaietile_timer.c
static u32 XAieTile_SetTimerResetEvent(XAieGbl_Tile *TileInstPtr, u32 Event,
					u8 Reset, u32 ModuleType)
{
	u64 RegAddr;
	u32 RegVal, Mask, Lsb;

	XAie_AssertNonvoid(Reset == XAIE_RESETENABLE ||
			   Reset == XAIE_RESETDISABLE);
	Mask = TimerReg[ModuleType].CtrlResetEvent.Mask;
	Lsb = TimerReg[ModuleType].CtrlResetEvent.Lsb;
	RegVal = XAie_SetField(Event, Lsb, Mask);
	XAie_AssertNonvoid((RegVal >> Lsb) == Event);

	if (Reset == XAIE_RESETENABLE) {
		Mask = TimerReg[ModuleType].CtrlReset.Mask;
		Lsb = TimerReg[ModuleType].CtrlReset.Lsb;
		RegVal |= XAie_SetField(XAIE_RESETENABLE, Lsb, Mask);
	}
	RegAddr = TileInstPtr->TileAddr + TimerReg[ModuleType].CtrlOff;
	XAieGbl_Write32(RegAddr, RegVal);
	return XAIE_SUCCESS;
}
/*****************************************************************************/
/**
*
* This API sets the timer reset event. The timer will reset when the event
* is raised.
*
* @param	TileInstPtr - Pointer to the tile instance.
* @param	Event - Reset event ID (0 - 127)
* @param	Reset - Indicate if reset is also required in this call.
*                       (XAIE_RESETENABLE, XAIE_RESETDISABLE)
* @param	ModuleType - Type of the module
*
* @return	XAIE_SUCCESS
*
* @note		Used only within this file.
*
*******************************************************************************/
This API sets the timer reset event. The timer will reset when the event
is raised.
This API sets the timer reset event . The timer will reset when the event is raised .
static u32 XAieTile_SetTimerResetEvent(XAieGbl_Tile *TileInstPtr, u32 Event,
					u8 Reset, u32 ModuleType)
{
	u64 RegAddr;
	u32 RegVal, Mask, Lsb;
	XAie_AssertNonvoid(Reset == XAIE_RESETENABLE ||
			   Reset == XAIE_RESETDISABLE);
	Mask = TimerReg[ModuleType].CtrlResetEvent.Mask;
	Lsb = TimerReg[ModuleType].CtrlResetEvent.Lsb;
	RegVal = XAie_SetField(Event, Lsb, Mask);
	XAie_AssertNonvoid((RegVal >> Lsb) == Event);
	if (Reset == XAIE_RESETENABLE) {
		Mask = TimerReg[ModuleType].CtrlReset.Mask;
		Lsb = TimerReg[ModuleType].CtrlReset.Lsb;
		RegVal |= XAie_SetField(XAIE_RESETENABLE, Lsb, Mask);
	}
	RegAddr = TileInstPtr->TileAddr + TimerReg[ModuleType].CtrlOff;
	XAieGbl_Write32(RegAddr, RegVal);
	return XAIE_SUCCESS;
}
static u32 XAieTile_SetTimerResetEvent ( XAieGbl_Tile * TileInstPtr , u32 Event , u8 Reset , u32 ModuleType ) { u64 RegAddr ; u32 RegVal , Mask , Lsb ; XAie_AssertNonvoid ( Reset == XAIE_RESETENABLE || Reset == XAIE_RESETDISABLE ) ; Mask = TimerReg [ ModuleType ] . CtrlResetEvent . Mask ; Lsb = TimerReg [ ModuleType ] . CtrlResetEvent . Lsb ; RegVal = XAie_SetField ( Event , Lsb , Mask ) ; XAie_AssertNonvoid ( ( RegVal >> Lsb ) == Event ) ; if ( Reset == XAIE_RESETENABLE ) { Mask = TimerReg [ ModuleType ] . CtrlReset . Mask ; Lsb = TimerReg [ ModuleType ] . CtrlReset . Lsb ; RegVal |= XAie_SetField ( XAIE_RESETENABLE , Lsb , Mask ) ; } RegAddr = TileInstPtr -> TileAddr + TimerReg [ ModuleType ] . CtrlOff ; XAieGbl_Write32 ( RegAddr , RegVal ) ; return XAIE_SUCCESS ; }
This API sets the timer reset event.
This API sets the timer reset event .