ADM/GW/Debug_RAM/RTD/src/Pit_Ip.c.080i.single-use
2024-08-08 10:00:15 +09:00

706 lines
15 KiB
Plaintext

Variable CSWTCH.22/38 is used by single function
Variable CSWTCH.21/37 is used by single function
PIT_0_ISR ()
{
uint32 temp;
uint8 channel;
<bb 2> [local count: 178992762]:
# DEBUG BEGIN_STMT
# DEBUG instance => 0
# DEBUG BEGIN_STMT
# DEBUG BEGIN_STMT
# DEBUG temp => 0
# DEBUG BEGIN_STMT
# DEBUG channel => 0
goto <bb 6>; [100.00%]
<bb 3> [local count: 894749063]:
# DEBUG BEGIN_STMT
temp_6 = Pit_Ip_GetInterruptFlags (0, channel_1);
# DEBUG temp => temp_6
# DEBUG BEGIN_STMT
if (temp_6 == 1)
goto <bb 4>; [20.24%]
else
goto <bb 5>; [79.76%]
<bb 4> [local count: 181097210]:
# DEBUG BEGIN_STMT
Pit_Ip_ProcessCommonInterrupt (0, channel_1);
<bb 5> [local count: 894749063]:
# DEBUG BEGIN_STMT
channel_8 = channel_1 + 1;
# DEBUG channel => channel_8
<bb 6> [local count: 1073741824]:
# channel_1 = PHI <0(2), channel_8(5)>
# DEBUG channel => channel_1
# DEBUG BEGIN_STMT
if (channel_1 != 5)
goto <bb 3>; [83.33%]
else
goto <bb 7>; [16.67%]
<bb 7> [local count: 178992762]:
return;
}
Pit_Ip_GetLifetimeTimer (uint8 instance)
{
uint32 upperValue;
uint32 lowerValue;
uint64 lifeTimeValue;
long long unsigned int _1;
long long unsigned int _2;
long long unsigned int _3;
int _8;
struct PIT_Type * _9;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG lifeTimeValue => 0
# DEBUG BEGIN_STMT
# DEBUG valueH => 0
# DEBUG BEGIN_STMT
# DEBUG valueL => 0
# DEBUG BEGIN_STMT
# DEBUG instance => instance_5(D)
# DEBUG INLINE_ENTRY Pit_Ip_GetUpperLifetimerValue
# DEBUG BEGIN_STMT
# DEBUG upperValue => 0
# DEBUG BEGIN_STMT
_8 = (int) instance_5(D);
_9 = pitBase[_8];
upperValue_10 ={v} _9->LTMR64H;
# DEBUG upperValue => upperValue_10
# DEBUG BEGIN_STMT
# DEBUG instance => NULL
# DEBUG upperValue => NULL
# DEBUG valueH => upperValue_10
# DEBUG BEGIN_STMT
# DEBUG instance => instance_5(D)
# DEBUG INLINE_ENTRY Pit_Ip_GetLowerLifetimerValue
# DEBUG BEGIN_STMT
# DEBUG lowerValue => 0
# DEBUG BEGIN_STMT
lowerValue_7 ={v} _9->LTMR64L;
# DEBUG lowerValue => lowerValue_7
# DEBUG BEGIN_STMT
# DEBUG instance => NULL
# DEBUG lowerValue => NULL
# DEBUG valueL => lowerValue_7
# DEBUG BEGIN_STMT
_1 = (long long unsigned int) upperValue_10;
_2 = _1 << 32;
_3 = (long long unsigned int) lowerValue_7;
lifeTimeValue_6 = _2 + _3;
# DEBUG lifeTimeValue => lifeTimeValue_6
# DEBUG BEGIN_STMT
return lifeTimeValue_6;
}
Pit_Ip_SetLifetimeTimerCount (uint8 instance)
{
int _7;
struct PIT_Type * _8;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG instance => instance_2(D)
# DEBUG channel => 1
# DEBUG value => 4294967295
# DEBUG INLINE_ENTRY Pit_Ip_SetCounterValue
# DEBUG BEGIN_STMT
_7 = (int) instance_2(D);
_8 = pitBase[_7];
_8->TIMER[1].LDVAL ={v} 4294967295;
# DEBUG instance => NULL
# DEBUG channel => NULL
# DEBUG value => NULL
# DEBUG BEGIN_STMT
Pit_Ip_EnableInterrupt (instance_2(D), 1, 0);
# DEBUG BEGIN_STMT
Pit_Ip_SetChainMode (instance_2(D), 1, 1);
# DEBUG BEGIN_STMT
Pit_Ip_EnableTimer (instance_2(D), 1, 1);
# DEBUG BEGIN_STMT
# DEBUG instance => instance_2(D)
# DEBUG channel => 0
# DEBUG value => 4294967295
# DEBUG INLINE_ENTRY Pit_Ip_SetCounterValue
# DEBUG BEGIN_STMT
_8->TIMER[0].LDVAL ={v} 4294967295;
# DEBUG instance => NULL
# DEBUG channel => NULL
# DEBUG value => NULL
# DEBUG BEGIN_STMT
Pit_Ip_EnableTimer (instance_2(D), 0, 1);
return;
}
Pit_Ip_DisableChannelInterrupt (uint8 instance, uint8 channel)
{
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
Pit_Ip_EnableInterrupt (instance_2(D), channel_3(D), 0);
# DEBUG BEGIN_STMT
Pit_Ip_ClearInterruptFlag (instance_2(D), channel_3(D));
return;
}
Pit_Ip_EnableChannelInterrupt (uint8 instance, uint8 channel)
{
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
Pit_Ip_ClearInterruptFlag (instance_2(D), channel_3(D));
# DEBUG BEGIN_STMT
Pit_Ip_EnableInterrupt (instance_2(D), channel_3(D), 1);
return;
}
Pit_Ip_GetCurrentTimer (uint8 instance, uint8 channel)
{
uint32 counterValue;
uint64 counterValue;
int _5;
struct PIT_Type * _6;
int _7;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG counterValue => 0
# DEBUG BEGIN_STMT
# DEBUG instance => instance_2(D)
# DEBUG channel => channel_3(D)
# DEBUG INLINE_ENTRY Pit_Ip_GetCounterValue
# DEBUG BEGIN_STMT
# DEBUG counterValue => 0
# DEBUG BEGIN_STMT
_5 = (int) instance_2(D);
_6 = pitBase[_5];
_7 = (int) channel_3(D);
counterValue_8 ={v} _6->TIMER[_7].CVAL;
# DEBUG counterValue => counterValue_8
# DEBUG BEGIN_STMT
# DEBUG instance => NULL
# DEBUG channel => NULL
# DEBUG counterValue => NULL
counterValue_4 = (uint64) counterValue_8;
# DEBUG counterValue => counterValue_4
# DEBUG BEGIN_STMT
return counterValue_4;
}
Pit_Ip_StopChannel (uint8 instance, uint8 channel)
{
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
Pit_Ip_EnableTimer (instance_2(D), channel_3(D), 0);
# DEBUG BEGIN_STMT
Pit_Ip_ClearInterruptFlag (instance_2(D), channel_3(D));
return;
}
Pit_Ip_StartChannel (uint8 instance, uint8 channel, uint32 countValue)
{
boolean isRunning;
long unsigned int _1;
int _8;
struct PIT_Type * _9;
int _10;
long unsigned int _11;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG isRunning => 0
# DEBUG BEGIN_STMT
# DEBUG instance => instance_4(D)
# DEBUG channel => channel_5(D)
# DEBUG INLINE_ENTRY Pit_Ip_IsChannelRunning
# DEBUG BEGIN_STMT
# DEBUG isRunning => 0
# DEBUG BEGIN_STMT
_8 = (int) instance_4(D);
_9 = pitBase[_8];
_10 = (int) channel_5(D);
_11 ={v} _9->TIMER[_10].TCTRL;
isRunning_12 = (boolean) _11;
# DEBUG isRunning => isRunning_12
# DEBUG BEGIN_STMT
# DEBUG instance => NULL
# DEBUG channel => NULL
# DEBUG isRunning => NULL
# DEBUG isRunning => isRunning_12
# DEBUG BEGIN_STMT
if (isRunning_12 != 0)
goto <bb 4>; [67.00%]
else
goto <bb 3>; [33.00%]
<bb 3> [local count: 354334802]:
# DEBUG BEGIN_STMT
_1 = countValue_6(D) + 4294967295;
# DEBUG instance => instance_4(D)
# DEBUG channel => channel_5(D)
# DEBUG value => _1
# DEBUG INLINE_ENTRY Pit_Ip_SetCounterValue
# DEBUG BEGIN_STMT
_9->TIMER[_10].LDVAL ={v} _1;
# DEBUG instance => NULL
# DEBUG channel => NULL
# DEBUG value => NULL
# DEBUG BEGIN_STMT
Pit_Ip_EnableTimer (instance_4(D), channel_5(D), 1);
<bb 4> [local count: 1073741824]:
return;
}
Pit_Ip_Deinit (uint8 instance)
{
boolean rtiChannelExists;
uint8 channelNum;
unsigned char _1;
unsigned char _5;
_Bool _8;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG channelNum => 0
# DEBUG BEGIN_STMT
# DEBUG rtiChannelExists => 0
# DEBUG BEGIN_STMT
_1 = instance_6(D);
if (_1 <= 2)
goto <bb 4>; [50.00%]
else
goto <bb 3>; [50.00%]
<bb 3> [local count: 536870913]:
<L6>:
channelNum_9 = 0;
rtiChannelExists_10 = 0;
goto <bb 5>; [100.00%]
<bb 4> [local count: 536870913]:
<L7>:
_5 = CSWTCH.21[_1];
channelNum_4 = _5;
_8 = CSWTCH.22[_1];
rtiChannelExists_7 = _8;
<bb 5> [local count: 1073741824]:
# channelNum_2 = PHI <channelNum_4(4), channelNum_9(3)>
# rtiChannelExists_3 = PHI <rtiChannelExists_7(4), rtiChannelExists_10(3)>
<L8>:
<L5>:
# DEBUG rtiChannelExists => rtiChannelExists_3
# DEBUG channelNum => channelNum_2
# DEBUG BEGIN_STMT
Pit_Ip_Reset (instance_6(D), channelNum_2, rtiChannelExists_3);
return;
}
Pit_Ip_InitChannel (uint8 instance, const struct Pit_Ip_ChannelConfigType * chnlConfig)
{
unsigned char _1;
unsigned char _2;
unsigned char _3;
int _4;
unsigned char _5;
int _6;
void (*<T2d2>) (uint8) _7;
unsigned char _8;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
_1 = chnlConfig_10(D)->hwChannel;
Pit_Ip_EnableTimer (instance_11(D), _1, 0);
# DEBUG BEGIN_STMT
_2 = chnlConfig_10(D)->hwChannel;
Pit_Ip_EnableInterrupt (instance_11(D), _2, 0);
# DEBUG BEGIN_STMT
_3 = chnlConfig_10(D)->hwChannel;
Pit_Ip_ClearInterruptFlag (instance_11(D), _3);
# DEBUG BEGIN_STMT
_4 = (int) instance_11(D);
_5 = chnlConfig_10(D)->hwChannel;
_6 = (int) _5;
Pit_Ip_u32ChState[_4][_6].chInit = 1;
# DEBUG BEGIN_STMT
_7 = chnlConfig_10(D)->callback;
Pit_Ip_u32ChState[_4][_6].callback = _7;
# DEBUG BEGIN_STMT
_8 = chnlConfig_10(D)->callbackParam;
Pit_Ip_u32ChState[_4][_6].callbackParam = _8;
return;
}
Pit_Ip_Init (uint8 instance, const struct Pit_Ip_InstanceConfigType * config)
{
_Bool _1;
_Bool _2;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG BEGIN_STMT
_1 = config_5(D)->enableStandardTimers;
if (_1 != 0)
goto <bb 3>; [33.00%]
else
goto <bb 4>; [67.00%]
<bb 3> [local count: 354334802]:
# DEBUG BEGIN_STMT
Pit_Ip_EnableModule (instance_6(D), 0);
<bb 4> [local count: 1073741824]:
# DEBUG BEGIN_STMT
_2 = config_5(D)->stopRunInDebug;
Pit_Ip_SetDebugMode (instance_6(D), _2);
return;
}
Pit_Ip_ClearInterruptFlag (uint8 instance, uint8 channel)
{
int _1;
struct PIT_Type * _2;
int _3;
long unsigned int _4;
long unsigned int _5;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
SchM_Enter_Gpt_GPT_EXCLUSIVE_AREA_03 ();
# DEBUG BEGIN_STMT
_1 = (int) instance_8(D);
_2 = pitBase[_1];
_3 = (int) channel_9(D);
_4 ={v} _2->TIMER[_3].TFLG;
_5 = _4 | 1;
_2->TIMER[_3].TFLG ={v} _5;
# DEBUG BEGIN_STMT
SchM_Exit_Gpt_GPT_EXCLUSIVE_AREA_03 ();
return;
}
Pit_Ip_EnableInterrupt (uint8 instance, uint8 channel, boolean enable)
{
int _1;
struct PIT_Type * _2;
int _3;
long unsigned int _4;
long unsigned int _5;
int _6;
struct PIT_Type * _7;
int _8;
long unsigned int _9;
long unsigned int _10;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
SchM_Enter_Gpt_GPT_EXCLUSIVE_AREA_02 ();
# DEBUG BEGIN_STMT
if (enable_14(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870913]:
# DEBUG BEGIN_STMT
_1 = (int) instance_15(D);
_2 = pitBase[_1];
_3 = (int) channel_16(D);
_4 ={v} _2->TIMER[_3].TCTRL;
_5 = _4 | 2;
_2->TIMER[_3].TCTRL ={v} _5;
goto <bb 5>; [100.00%]
<bb 4> [local count: 536870913]:
# DEBUG BEGIN_STMT
_6 = (int) instance_15(D);
_7 = pitBase[_6];
_8 = (int) channel_16(D);
_9 ={v} _7->TIMER[_8].TCTRL;
_10 = _9 & 4294967293;
_7->TIMER[_8].TCTRL ={v} _10;
<bb 5> [local count: 1073741824]:
# DEBUG BEGIN_STMT
SchM_Exit_Gpt_GPT_EXCLUSIVE_AREA_02 ();
return;
}
Pit_Ip_Reset (uint8 instance, uint8 channelNum, boolean available)
{
uint8 i;
uint32 channelIndex;
uint32 mask;
int _1;
struct PIT_Type * _2;
int _3;
struct PIT_Type * _4;
int _5;
long unsigned int _6;
int _7;
struct PIT_Type * _8;
<bb 2> [local count: 118111600]:
# DEBUG BEGIN_STMT
# DEBUG mask => 0
# DEBUG BEGIN_STMT
channelIndex_15 = (uint32) channelNum_14(D);
# DEBUG channelIndex => channelIndex_15
# DEBUG BEGIN_STMT
if (available_16(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 59055800]:
# DEBUG BEGIN_STMT
channelIndex_18 = channelIndex_15 + 4294967295;
# DEBUG channelIndex => channelIndex_18
# DEBUG BEGIN_STMT
_1 = (int) instance_19(D);
_2 = pitBase[_1];
_2->RTI_TCTRL ={v} 0;
# DEBUG BEGIN_STMT
_2->RTI_LDVAL ={v} 0;
# DEBUG BEGIN_STMT
_2->RTI_TFLG ={v} 1;
# DEBUG BEGIN_STMT
# DEBUG mask => 6
<bb 4> [local count: 118111600]:
# mask_9 = PHI <6(3), 2(2)>
# channelIndex_10 = PHI <channelIndex_18(3), channelIndex_15(2)>
# DEBUG channelIndex => channelIndex_10
# DEBUG mask => mask_9
# DEBUG BEGIN_STMT
# DEBUG BEGIN_STMT
# DEBUG i => 0
goto <bb 6>; [100.00%]
<bb 5> [local count: 955630223]:
# DEBUG BEGIN_STMT
_3 = (int) instance_19(D);
_4 = pitBase[_3];
_5 = (int) i_11;
_4->TIMER[_5].TCTRL ={v} 0;
# DEBUG BEGIN_STMT
_4->TIMER[_5].LDVAL ={v} 0;
# DEBUG BEGIN_STMT
_4->TIMER[_5].TFLG ={v} 1;
# DEBUG BEGIN_STMT
i_27 = i_11 + 1;
# DEBUG i => i_27
<bb 6> [local count: 1073741824]:
# i_11 = PHI <0(4), i_27(5)>
# DEBUG i => i_11
# DEBUG BEGIN_STMT
_6 = (long unsigned int) i_11;
if (_6 < channelIndex_10)
goto <bb 5>; [89.00%]
else
goto <bb 7>; [11.00%]
<bb 7> [local count: 118111601]:
# DEBUG BEGIN_STMT
_7 = (int) instance_19(D);
_8 = pitBase[_7];
_8->MCR ={v} mask_9;
return;
}
Pit_Ip_SetDebugMode (uint8 instance, boolean stopRun)
{
int _1;
struct PIT_Type * _2;
long unsigned int _3;
long unsigned int _4;
int _5;
struct PIT_Type * _6;
long unsigned int _7;
long unsigned int _8;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
if (stopRun_10(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870913]:
# DEBUG BEGIN_STMT
_1 = (int) instance_11(D);
_2 = pitBase[_1];
_3 ={v} _2->MCR;
_4 = _3 | 1;
_2->MCR ={v} _4;
goto <bb 5>; [100.00%]
<bb 4> [local count: 536870913]:
# DEBUG BEGIN_STMT
_5 = (int) instance_11(D);
_6 = pitBase[_5];
_7 ={v} _6->MCR;
_8 = _7 & 4294967294;
_6->MCR ={v} _8;
<bb 5> [local count: 1073741824]:
return;
}
Pit_Ip_EnableTimer (uint8 instance, uint8 channel, boolean enable)
{
int _1;
struct PIT_Type * _2;
int _3;
long unsigned int _4;
long unsigned int _5;
int _6;
struct PIT_Type * _7;
int _8;
long unsigned int _9;
long unsigned int _10;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
SchM_Enter_Gpt_GPT_EXCLUSIVE_AREA_00 ();
# DEBUG BEGIN_STMT
if (enable_14(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870913]:
# DEBUG BEGIN_STMT
_1 = (int) instance_15(D);
_2 = pitBase[_1];
_3 = (int) channel_16(D);
_4 ={v} _2->TIMER[_3].TCTRL;
_5 = _4 | 1;
_2->TIMER[_3].TCTRL ={v} _5;
goto <bb 5>; [100.00%]
<bb 4> [local count: 536870913]:
# DEBUG BEGIN_STMT
_6 = (int) instance_15(D);
_7 = pitBase[_6];
_8 = (int) channel_16(D);
_9 ={v} _7->TIMER[_8].TCTRL;
_10 = _9 & 4294967294;
_7->TIMER[_8].TCTRL ={v} _10;
<bb 5> [local count: 1073741824]:
# DEBUG BEGIN_STMT
SchM_Exit_Gpt_GPT_EXCLUSIVE_AREA_00 ();
return;
}
Pit_Ip_GetInterruptFlags (uint8 instance, uint8 channel)
{
uint32 returnFlag;
int _1;
struct PIT_Type * _2;
long unsigned int _3;
int _4;
struct PIT_Type * _5;
int _6;
long unsigned int _7;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG returnFlag => 0
# DEBUG BEGIN_STMT
if (channel_9(D) == 4)
goto <bb 3>; [34.00%]
else
goto <bb 4>; [66.00%]
<bb 3> [local count: 365072220]:
# DEBUG BEGIN_STMT
_1 = (int) instance_10(D);
_2 = pitBase[_1];
_3 ={v} _2->RTI_TFLG;
returnFlag_13 = _3 & 1;
# DEBUG returnFlag => returnFlag_13
goto <bb 5>; [100.00%]
<bb 4> [local count: 708669605]:
# DEBUG BEGIN_STMT
_4 = (int) instance_10(D);
_5 = pitBase[_4];
_6 = (int) channel_9(D);
_7 ={v} _5->TIMER[_6].TFLG;
returnFlag_12 = _7 & 1;
# DEBUG returnFlag => returnFlag_12
<bb 5> [local count: 1073741824]:
# returnFlag_8 = PHI <returnFlag_13(3), returnFlag_12(4)>
# DEBUG returnFlag => returnFlag_8
# DEBUG BEGIN_STMT
return returnFlag_8;
}
Pit_Ip_GetLoadValue (uint8 instance, uint8 channel)
{
uint32 periodValue;
int _1;
struct PIT_Type * _2;
int _3;
<bb 2> [local count: 1073741824]:
# DEBUG BEGIN_STMT
# DEBUG periodValue => 0
# DEBUG BEGIN_STMT
_1 = (int) instance_4(D);
_2 = pitBase[_1];
_3 = (int) channel_6(D);
periodValue_7 ={v} _2->TIMER[_3].LDVAL;
# DEBUG periodValue => periodValue_7
# DEBUG BEGIN_STMT
return periodValue_7;
}