Clock_Ip_ExtOsc.c.068i.whole-program 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. Marking local functions:
  2. Marking externally visible functions:
  3. Marking externally visible variables: extOscCallbacks
  4. Reclaiming functions:
  5. Reclaiming variables:
  6. Clearing address taken flags:
  7. Symbol table:
  8. ReportClockErrors/14 (ReportClockErrors) @06d96700
  9. Type: function
  10. Visibility: external public
  11. References:
  12. Referring:
  13. Availability: not_available
  14. Function flags:
  15. Called by: CompleteSOSC/7
  16. Calls:
  17. ClockTimeoutExpired/13 (ClockTimeoutExpired) @06d96620
  18. Type: function
  19. Visibility: external public
  20. References:
  21. Referring:
  22. Availability: not_available
  23. Function flags:
  24. Called by: CompleteSOSC/7
  25. Calls:
  26. ClockStartTimeout/12 (ClockStartTimeout) @06d96540
  27. Type: function
  28. Visibility: external public
  29. References:
  30. Referring:
  31. Availability: not_available
  32. Function flags:
  33. Called by: CompleteSOSC/7
  34. Calls:
  35. EnableSOSC/11 (EnableSOSC) @06d90ee0
  36. Type: function definition analyzed
  37. Visibility: force_output no_reorder prevailing_def_ironly
  38. Address is taken.
  39. References:
  40. Referring: extOscCallbacks/0 (addr)
  41. Availability: available
  42. Function flags: body
  43. Called by:
  44. Calls: EnableSOSC_TrustedCall/10
  45. EnableSOSC_TrustedCall/10 (EnableSOSC_TrustedCall) @06d90c40
  46. Type: function definition analyzed
  47. Visibility: force_output no_reorder prevailing_def_ironly
  48. References:
  49. Referring:
  50. Availability: available
  51. Function flags: body
  52. Called by: EnableSOSC/11
  53. Calls:
  54. DisableSOSC/9 (DisableSOSC) @06d909a0
  55. Type: function definition analyzed
  56. Visibility: force_output no_reorder prevailing_def_ironly
  57. Address is taken.
  58. References:
  59. Referring: extOscCallbacks/0 (addr)
  60. Availability: available
  61. Function flags: body
  62. Called by:
  63. Calls: DisableSOSC_TrustedCall/8
  64. DisableSOSC_TrustedCall/8 (DisableSOSC_TrustedCall) @06d90700
  65. Type: function definition analyzed
  66. Visibility: force_output no_reorder prevailing_def_ironly
  67. References:
  68. Referring:
  69. Availability: available
  70. Function flags: body
  71. Called by: DisableSOSC/9
  72. Calls:
  73. CompleteSOSC/7 (CompleteSOSC) @06d90460
  74. Type: function definition analyzed
  75. Visibility: force_output no_reorder prevailing_def_ironly
  76. Address is taken.
  77. References:
  78. Referring: extOscCallbacks/0 (addr)
  79. Availability: available
  80. Function flags: body
  81. Called by:
  82. Calls: ReportClockErrors/14 ClockTimeoutExpired/13 ClockStartTimeout/12
  83. SetSOSC/6 (SetSOSC) @06d901c0
  84. Type: function definition analyzed
  85. Visibility: force_output no_reorder prevailing_def_ironly
  86. Address is taken.
  87. References:
  88. Referring: extOscCallbacks/0 (addr)
  89. Availability: available
  90. Function flags: body
  91. Called by:
  92. Calls: SetSOSC_TrustedCall/5
  93. SetSOSC_TrustedCall/5 (SetSOSC_TrustedCall) @06c6f1c0
  94. Type: function definition analyzed
  95. Visibility: force_output no_reorder prevailing_def_ironly
  96. References:
  97. Referring:
  98. Availability: available
  99. Function flags: body
  100. Called by: SetSOSC/6
  101. Calls:
  102. ResetSOSC/4 (ResetSOSC) @06c6f380
  103. Type: function definition analyzed
  104. Visibility: force_output no_reorder prevailing_def_ironly
  105. Address is taken.
  106. References:
  107. Referring: extOscCallbacks/0 (addr)
  108. Availability: available
  109. Function flags: body
  110. Called by:
  111. Calls: ResetSOSC_TrustedCall/3
  112. ResetSOSC_TrustedCall/3 (ResetSOSC_TrustedCall) @06c6f0e0
  113. Type: function definition analyzed
  114. Visibility: force_output no_reorder prevailing_def_ironly
  115. References:
  116. Referring:
  117. Availability: available
  118. Function flags: body
  119. Called by: ResetSOSC/4
  120. Calls:
  121. DisableExternalOscillatorEmpty/2 (DisableExternalOscillatorEmpty) @06c69c40
  122. Type: function definition analyzed
  123. Visibility: force_output no_reorder prevailing_def_ironly
  124. Address is taken.
  125. References:
  126. Referring: extOscCallbacks/0 (addr)
  127. Availability: available
  128. Function flags: body
  129. Called by:
  130. Calls:
  131. ExternalOscillatorEmpty/1 (ExternalOscillatorEmpty) @06c69e00
  132. Type: function definition analyzed
  133. Visibility: force_output no_reorder prevailing_def_ironly
  134. Address is taken.
  135. References:
  136. Referring: extOscCallbacks/0 (addr)extOscCallbacks/0 (addr)extOscCallbacks/0 (addr)extOscCallbacks/0 (addr)
  137. Availability: available
  138. Function flags: body
  139. Called by:
  140. Calls:
  141. extOscCallbacks/0 (extOscCallbacks) @06c6b678
  142. Type: variable definition analyzed
  143. Visibility: force_output externally_visible no_reorder public
  144. References: ExternalOscillatorEmpty/1 (addr)ExternalOscillatorEmpty/1 (addr)ExternalOscillatorEmpty/1 (addr)DisableExternalOscillatorEmpty/2 (addr)ExternalOscillatorEmpty/1 (addr)ResetSOSC/4 (addr)SetSOSC/6 (addr)CompleteSOSC/7 (addr)DisableSOSC/9 (addr)EnableSOSC/11 (addr)
  145. Referring:
  146. Availability: available
  147. Varpool flags: initialized read-only const-value-known
  148. EnableSOSC (const struct Clock_Ip_XoscConfigType * config)
  149. {
  150. <bb 2> :
  151. EnableSOSC_TrustedCall (config_2(D));
  152. return;
  153. }
  154. EnableSOSC_TrustedCall (const struct Clock_Ip_XoscConfigType * config)
  155. {
  156. short unsigned int _1;
  157. struct SCG_Type * _2;
  158. long unsigned int _3;
  159. struct SCG_Type * _4;
  160. long unsigned int _5;
  161. <bb 2> :
  162. _1 = config_8(D)->enable;
  163. if (_1 == 1)
  164. goto <bb 3>; [INV]
  165. else
  166. goto <bb 4>; [INV]
  167. <bb 3> :
  168. _2 = 1074151424B;
  169. _3 ={v} _2->SOSCCSR;
  170. _4 = 1074151424B;
  171. _5 = _3 | 1;
  172. _4->SOSCCSR ={v} _5;
  173. <bb 4> :
  174. return;
  175. }
  176. DisableSOSC (Clock_Ip_NameType xoscName)
  177. {
  178. <bb 2> :
  179. DisableSOSC_TrustedCall (xoscName_2(D));
  180. return;
  181. }
  182. DisableSOSC_TrustedCall (Clock_Ip_NameType xoscName)
  183. {
  184. struct SCG_Type * _1;
  185. long unsigned int _2;
  186. struct SCG_Type * _3;
  187. long unsigned int _4;
  188. <bb 2> :
  189. _1 = 1074151424B;
  190. _2 ={v} _1->SOSCCSR;
  191. _3 = 1074151424B;
  192. _4 = _2 & 4294967294;
  193. _3->SOSCCSR ={v} _4;
  194. return;
  195. }
  196. CompleteSOSC (const struct Clock_Ip_XoscConfigType * config)
  197. {
  198. uint32 SoscStatus;
  199. uint32 TimeoutTicks;
  200. uint32 ElapsedTime;
  201. uint32 StartTime;
  202. boolean TimeoutOccurred;
  203. struct SCG_Type * _1;
  204. long unsigned int _2;
  205. long unsigned int _3;
  206. struct SCG_Type * _4;
  207. long unsigned int _5;
  208. long unsigned int _6;
  209. long unsigned int TimeoutTicks.0_7;
  210. _Bool _8;
  211. <unnamed type> _9;
  212. <bb 2> :
  213. TimeoutOccurred_12 = 0;
  214. _1 = 1074151424B;
  215. _2 ={v} _1->SOSCCSR;
  216. _3 = _2 & 1;
  217. if (_3 != 0)
  218. goto <bb 3>; [INV]
  219. else
  220. goto <bb 8>; [INV]
  221. <bb 3> :
  222. ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);
  223. <bb 4> :
  224. _4 = 1074151424B;
  225. _5 ={v} _4->SOSCCSR;
  226. _6 = _5 >> 24;
  227. SoscStatus_15 = _6 & 1;
  228. TimeoutTicks.0_7 = TimeoutTicks;
  229. TimeoutOccurred_17 = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.0_7);
  230. if (SoscStatus_15 == 0)
  231. goto <bb 5>; [INV]
  232. else
  233. goto <bb 6>; [INV]
  234. <bb 5> :
  235. _8 = ~TimeoutOccurred_17;
  236. if (_8 != 0)
  237. goto <bb 4>; [INV]
  238. else
  239. goto <bb 6>; [INV]
  240. <bb 6> :
  241. if (TimeoutOccurred_17 != 0)
  242. goto <bb 7>; [INV]
  243. else
  244. goto <bb 8>; [INV]
  245. <bb 7> :
  246. _9 = config_18(D)->name;
  247. ReportClockErrors (1, _9);
  248. <bb 8> :
  249. StartTime ={v} {CLOBBER};
  250. ElapsedTime ={v} {CLOBBER};
  251. TimeoutTicks ={v} {CLOBBER};
  252. return;
  253. }
  254. SetSOSC (const struct Clock_Ip_XoscConfigType * config)
  255. {
  256. <bb 2> :
  257. SetSOSC_TrustedCall (config_2(D));
  258. return;
  259. }
  260. SetSOSC_TrustedCall (const struct Clock_Ip_XoscConfigType * config)
  261. {
  262. short unsigned int _1;
  263. unsigned char _2;
  264. int _3;
  265. struct SCG_Type * _4;
  266. long unsigned int _5;
  267. struct SCG_Type * _6;
  268. long unsigned int _7;
  269. struct SCG_Type * _8;
  270. long unsigned int _9;
  271. struct SCG_Type * _10;
  272. long unsigned int _11;
  273. struct SCG_Type * _12;
  274. long unsigned int _13;
  275. struct SCG_Type * _14;
  276. long unsigned int _15;
  277. long unsigned int _16;
  278. long unsigned int _17;
  279. struct SCG_Type * _18;
  280. long unsigned int _19;
  281. struct SCG_Type * _20;
  282. long unsigned int _21;
  283. struct SCG_Type * _22;
  284. long unsigned int _23;
  285. struct SCG_Type * _24;
  286. long unsigned int _25;
  287. unsigned char _26;
  288. struct SCG_Type * _27;
  289. long unsigned int _28;
  290. struct SCG_Type * _29;
  291. long unsigned int _30;
  292. struct SCG_Type * _31;
  293. long unsigned int _32;
  294. struct SCG_Type * _33;
  295. long unsigned int _34;
  296. unsigned char _35;
  297. int _36;
  298. struct SCG_Type * _37;
  299. struct SCG_Type * _38;
  300. struct SCG_Type * _39;
  301. struct SCG_Type * _40;
  302. long unsigned int _41;
  303. struct SCG_Type * _42;
  304. long unsigned int _43;
  305. <bb 2> :
  306. _1 = config_49(D)->enable;
  307. if (_1 == 1)
  308. goto <bb 3>; [INV]
  309. else
  310. goto <bb 19>; [INV]
  311. <bb 3> :
  312. _2 = config_49(D)->gain;
  313. _3 = (int) _2;
  314. switch (_3) <default: <L3> [INV], case 0: <L1> [INV], case 1: <L2> [INV]>
  315. <bb 4> :
  316. <L1>:
  317. _4 = 1074151424B;
  318. _5 ={v} _4->SOSCCFG;
  319. _6 = 1074151424B;
  320. _7 = _5 & 4294967287;
  321. _6->SOSCCFG ={v} _7;
  322. goto <bb 7>; [INV]
  323. <bb 5> :
  324. <L2>:
  325. _8 = 1074151424B;
  326. _9 ={v} _8->SOSCCFG;
  327. _10 = 1074151424B;
  328. _11 = _9 | 8;
  329. _10->SOSCCFG ={v} _11;
  330. goto <bb 7>; [INV]
  331. <bb 6> :
  332. <L3>:
  333. <bb 7> :
  334. _12 = 1074151424B;
  335. _13 ={v} _12->SOSCCFG;
  336. _14 = 1074151424B;
  337. _15 = _13 & 4294967247;
  338. _14->SOSCCFG ={v} _15;
  339. _16 = config_49(D)->freq;
  340. if (_16 > 3999999)
  341. goto <bb 8>; [INV]
  342. else
  343. goto <bb 10>; [INV]
  344. <bb 8> :
  345. _17 = config_49(D)->freq;
  346. if (_17 <= 7999999)
  347. goto <bb 9>; [INV]
  348. else
  349. goto <bb 10>; [INV]
  350. <bb 9> :
  351. _18 = 1074151424B;
  352. _19 ={v} _18->SOSCCFG;
  353. _20 = 1074151424B;
  354. _21 = _19 | 32;
  355. _20->SOSCCFG ={v} _21;
  356. goto <bb 11>; [INV]
  357. <bb 10> :
  358. _22 = 1074151424B;
  359. _23 ={v} _22->SOSCCFG;
  360. _24 = 1074151424B;
  361. _25 = _23 | 48;
  362. _24->SOSCCFG ={v} _25;
  363. <bb 11> :
  364. _26 = config_49(D)->bypassOption;
  365. if (_26 == 0)
  366. goto <bb 12>; [INV]
  367. else
  368. goto <bb 13>; [INV]
  369. <bb 12> :
  370. _27 = 1074151424B;
  371. _28 ={v} _27->SOSCCFG;
  372. _29 = 1074151424B;
  373. _30 = _28 | 4;
  374. _29->SOSCCFG ={v} _30;
  375. goto <bb 14>; [INV]
  376. <bb 13> :
  377. _31 = 1074151424B;
  378. _32 ={v} _31->SOSCCFG;
  379. _33 = 1074151424B;
  380. _34 = _32 & 4294967291;
  381. _33->SOSCCFG ={v} _34;
  382. <bb 14> :
  383. _35 = config_49(D)->monitor;
  384. _36 = (int) _35;
  385. switch (_36) <default: <L15> [INV], case 0: <L12> [INV], case 1: <L13> [INV], case 2: <L14> [INV]>
  386. <bb 15> :
  387. <L12>:
  388. _37 = 1074151424B;
  389. _37->SOSCCSR ={v} 1;
  390. goto <bb 19>; [INV]
  391. <bb 16> :
  392. <L13>:
  393. _38 = 1074151424B;
  394. _38->SOSCCSR ={v} 65537;
  395. goto <bb 19>; [INV]
  396. <bb 17> :
  397. <L14>:
  398. _39 = 1074151424B;
  399. _39->SOSCCSR ={v} 196609;
  400. goto <bb 19>; [INV]
  401. <bb 18> :
  402. <L15>:
  403. _40 = 1074151424B;
  404. _41 ={v} _40->SOSCCSR;
  405. _42 = 1074151424B;
  406. _43 = _41 | 1;
  407. _42->SOSCCSR ={v} _43;
  408. <bb 19> :
  409. return;
  410. }
  411. ResetSOSC (const struct Clock_Ip_XoscConfigType * config)
  412. {
  413. <bb 2> :
  414. ResetSOSC_TrustedCall (config_2(D));
  415. return;
  416. }
  417. ResetSOSC_TrustedCall (const struct Clock_Ip_XoscConfigType * config)
  418. {
  419. struct SCG_Type * _1;
  420. long unsigned int _2;
  421. struct SCG_Type * _3;
  422. long unsigned int _4;
  423. struct SCG_Type * _5;
  424. long unsigned int _6;
  425. struct SCG_Type * _7;
  426. long unsigned int _8;
  427. <bb 2> :
  428. _1 = 1074151424B;
  429. _2 ={v} _1->SOSCCSR;
  430. _3 = 1074151424B;
  431. _4 = _2 & 4286578687;
  432. _3->SOSCCSR ={v} _4;
  433. _5 = 1074151424B;
  434. _6 ={v} _5->SOSCCSR;
  435. _7 = 1074151424B;
  436. _8 = _6 & 4294967294;
  437. _7->SOSCCSR ={v} _8;
  438. return;
  439. }
  440. DisableExternalOscillatorEmpty (Clock_Ip_NameType xoscName)
  441. {
  442. <bb 2> :
  443. return;
  444. }
  445. ExternalOscillatorEmpty (const struct Clock_Ip_XoscConfigType * config)
  446. {
  447. <bb 2> :
  448. return;
  449. }