CDD_Mcl.c.080i.single-use 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. Mcl_CacheCleanByAddr (Mcl_CacheType CacheType, boolean EnInvalidate, uint32 Addr, uint32 Length)
  2. {
  3. unsigned char _1;
  4. <bb 2> :
  5. if (CacheType_3(D) > 2)
  6. goto <bb 3>; [INV]
  7. else
  8. goto <bb 4>; [INV]
  9. <bb 3> :
  10. _1 = (unsigned char) CacheType_3(D);
  11. Det_ReportError (255, _1, 21, 2);
  12. goto <bb 5>; [INV]
  13. <bb 4> :
  14. Cache_Ip_CleanByAddr (CacheType_3(D), EnInvalidate_5(D), Addr_6(D), Length_7(D));
  15. <bb 5> :
  16. return;
  17. }
  18. Mcl_CacheInvalidateByAddr (Mcl_CacheType CacheType, uint32 Addr, uint32 Length)
  19. {
  20. unsigned char _1;
  21. <bb 2> :
  22. if (CacheType_3(D) > 2)
  23. goto <bb 3>; [INV]
  24. else
  25. goto <bb 4>; [INV]
  26. <bb 3> :
  27. _1 = (unsigned char) CacheType_3(D);
  28. Det_ReportError (255, _1, 20, 2);
  29. goto <bb 5>; [INV]
  30. <bb 4> :
  31. Cache_Ip_InvalidateByAddr (CacheType_3(D), Addr_5(D), Length_6(D));
  32. <bb 5> :
  33. return;
  34. }
  35. Mcl_CacheClean (Mcl_CacheType CacheType, boolean EnInvalidate)
  36. {
  37. unsigned char _1;
  38. <bb 2> :
  39. if (CacheType_3(D) > 2)
  40. goto <bb 3>; [INV]
  41. else
  42. goto <bb 4>; [INV]
  43. <bb 3> :
  44. _1 = (unsigned char) CacheType_3(D);
  45. Det_ReportError (255, _1, 19, 2);
  46. goto <bb 5>; [INV]
  47. <bb 4> :
  48. Cache_Ip_Clean (CacheType_3(D), EnInvalidate_5(D));
  49. <bb 5> :
  50. return;
  51. }
  52. Mcl_CacheInvalidate (Mcl_CacheType CacheType)
  53. {
  54. unsigned char _1;
  55. <bb 2> :
  56. if (CacheType_3(D) > 2)
  57. goto <bb 3>; [INV]
  58. else
  59. goto <bb 4>; [INV]
  60. <bb 3> :
  61. _1 = (unsigned char) CacheType_3(D);
  62. Det_ReportError (255, _1, 18, 2);
  63. goto <bb 5>; [INV]
  64. <bb 4> :
  65. Cache_Ip_Invalidate (CacheType_3(D));
  66. <bb 5> :
  67. return;
  68. }
  69. Mcl_CacheDisable (Mcl_CacheType CacheType)
  70. {
  71. unsigned char _1;
  72. <bb 2> :
  73. if (CacheType_3(D) > 2)
  74. goto <bb 3>; [INV]
  75. else
  76. goto <bb 4>; [INV]
  77. <bb 3> :
  78. _1 = (unsigned char) CacheType_3(D);
  79. Det_ReportError (255, _1, 17, 2);
  80. goto <bb 5>; [INV]
  81. <bb 4> :
  82. Cache_Ip_Disable (CacheType_3(D));
  83. <bb 5> :
  84. return;
  85. }
  86. Mcl_CacheEnable (Mcl_CacheType CacheType)
  87. {
  88. unsigned char _1;
  89. <bb 2> :
  90. if (CacheType_3(D) > 2)
  91. goto <bb 3>; [INV]
  92. else
  93. goto <bb 4>; [INV]
  94. <bb 3> :
  95. _1 = (unsigned char) CacheType_3(D);
  96. Det_ReportError (255, _1, 16, 2);
  97. goto <bb 5>; [INV]
  98. <bb 4> :
  99. Cache_Ip_Enable (CacheType_3(D));
  100. <bb 5> :
  101. return;
  102. }
  103. Mcl_SetDmaChannelScatterGatherConfig (const uint32 Channel, const uint32 Element)
  104. {
  105. Dma_Ip_ReturnType RetStatus;
  106. unsigned char _1;
  107. unsigned char _2;
  108. <bb 2> :
  109. if (Channel_4(D) > 6)
  110. goto <bb 3>; [INV]
  111. else
  112. goto <bb 4>; [INV]
  113. <bb 3> :
  114. _1 = (unsigned char) Channel_4(D);
  115. Det_ReportError (255, _1, 9, 3);
  116. goto <bb 5>; [INV]
  117. <bb 4> :
  118. RetStatus_8 = Dma_Ip_SetLogicChannelScatterGatherConfig (Channel_4(D), Element_6(D));
  119. _2 = (unsigned char) Channel_4(D);
  120. Mcl_DmaReturnCheck (_2, 9, RetStatus_8);
  121. <bb 5> :
  122. return;
  123. }
  124. Mcl_GetDmaChannelParam (const uint32 Channel, const Mcl_DmaChannelInfoParamType Param, uint32 * const Value)
  125. {
  126. Dma_Ip_ReturnType RetStatus;
  127. unsigned char _1;
  128. unsigned char _2;
  129. unsigned char _3;
  130. <bb 2> :
  131. if (Channel_5(D) > 6)
  132. goto <bb 3>; [INV]
  133. else
  134. goto <bb 4>; [INV]
  135. <bb 3> :
  136. _1 = (unsigned char) Channel_5(D);
  137. Det_ReportError (255, _1, 8, 3);
  138. goto <bb 7>; [INV]
  139. <bb 4> :
  140. if (Param_6(D) > 7)
  141. goto <bb 5>; [INV]
  142. else
  143. goto <bb 6>; [INV]
  144. <bb 5> :
  145. _2 = (unsigned char) Channel_5(D);
  146. Det_ReportError (255, _2, 8, 5);
  147. goto <bb 7>; [INV]
  148. <bb 6> :
  149. RetStatus_10 = Dma_Ip_GetLogicChannelParam (Channel_5(D), Param_6(D), Value_8(D));
  150. _3 = (unsigned char) Channel_5(D);
  151. Mcl_DmaReturnCheck (_3, 8, RetStatus_10);
  152. <bb 7> :
  153. return;
  154. }
  155. Mcl_SetDmaChannelScatterGatherList (const uint32 Channel, const uint32 Element, const struct Mcl_DmaChannelScatterGatherListType * List, const uint32 ListDimension)
  156. {
  157. boolean DetErrorCheck;
  158. uint8 Idx;
  159. Dma_Ip_ReturnType RetStatus;
  160. unsigned char _1;
  161. unsigned char _2;
  162. unsigned int _3;
  163. unsigned int _4;
  164. const struct Mcl_DmaChannelScatterGatherListType * _5;
  165. <unnamed type> _6;
  166. unsigned char _7;
  167. unsigned char Idx.12_8;
  168. long unsigned int _9;
  169. _Bool _10;
  170. unsigned char _11;
  171. <bb 2> :
  172. DetErrorCheck_20 = 0;
  173. if (Channel_21(D) > 6)
  174. goto <bb 3>; [INV]
  175. else
  176. goto <bb 4>; [INV]
  177. <bb 3> :
  178. _1 = (unsigned char) Channel_21(D);
  179. Det_ReportError (255, _1, 7, 3);
  180. DetErrorCheck_24 = 1;
  181. <bb 4> :
  182. # DetErrorCheck_13 = PHI <DetErrorCheck_20(2), DetErrorCheck_24(3)>
  183. if (ListDimension_25(D) > 26)
  184. goto <bb 5>; [INV]
  185. else
  186. goto <bb 6>; [INV]
  187. <bb 5> :
  188. _2 = (unsigned char) Channel_21(D);
  189. Det_ReportError (255, _2, 7, 5);
  190. DetErrorCheck_27 = 1;
  191. <bb 6> :
  192. # DetErrorCheck_14 = PHI <DetErrorCheck_13(4), DetErrorCheck_27(5)>
  193. Idx_28 = 0;
  194. goto <bb 10>; [INV]
  195. <bb 7> :
  196. _3 = (unsigned int) Idx_12;
  197. _4 = _3 * 8;
  198. _5 = List_29(D) + _4;
  199. _6 = _5->Param;
  200. if (_6 > 25)
  201. goto <bb 8>; [INV]
  202. else
  203. goto <bb 9>; [INV]
  204. <bb 8> :
  205. _7 = (unsigned char) Channel_21(D);
  206. Det_ReportError (255, _7, 7, 5);
  207. DetErrorCheck_32 = 1;
  208. goto <bb 11>; [INV]
  209. <bb 9> :
  210. Idx.12_8 = Idx_12;
  211. Idx_30 = Idx.12_8 + 1;
  212. <bb 10> :
  213. # Idx_12 = PHI <Idx_28(6), Idx_30(9)>
  214. _9 = (long unsigned int) Idx_12;
  215. if (ListDimension_25(D) > _9)
  216. goto <bb 7>; [INV]
  217. else
  218. goto <bb 11>; [INV]
  219. <bb 11> :
  220. # DetErrorCheck_15 = PHI <DetErrorCheck_32(8), DetErrorCheck_14(10)>
  221. _10 = ~DetErrorCheck_15;
  222. if (_10 != 0)
  223. goto <bb 12>; [INV]
  224. else
  225. goto <bb 13>; [INV]
  226. <bb 12> :
  227. RetStatus_35 = Dma_Ip_SetLogicChannelScatterGatherList (Channel_21(D), Element_33(D), List_29(D), ListDimension_25(D));
  228. _11 = (unsigned char) Channel_21(D);
  229. Mcl_DmaReturnCheck (_11, 7, RetStatus_35);
  230. <bb 13> :
  231. return;
  232. }
  233. Mcl_SetDmaChannelTransferList (const uint32 Channel, const struct Mcl_DmaChannelTransferListType * List, const uint32 ListDimension)
  234. {
  235. boolean DetErrorCheck;
  236. uint8 Idx;
  237. Dma_Ip_ReturnType RetStatus;
  238. unsigned char _1;
  239. unsigned char _2;
  240. unsigned int _3;
  241. unsigned int _4;
  242. const struct Mcl_DmaChannelTransferListType * _5;
  243. <unnamed type> _6;
  244. unsigned char _7;
  245. unsigned char Idx.11_8;
  246. long unsigned int _9;
  247. _Bool _10;
  248. unsigned char _11;
  249. <bb 2> :
  250. DetErrorCheck_20 = 0;
  251. if (Channel_21(D) > 6)
  252. goto <bb 3>; [INV]
  253. else
  254. goto <bb 4>; [INV]
  255. <bb 3> :
  256. _1 = (unsigned char) Channel_21(D);
  257. Det_ReportError (255, _1, 6, 3);
  258. DetErrorCheck_24 = 1;
  259. <bb 4> :
  260. # DetErrorCheck_13 = PHI <DetErrorCheck_20(2), DetErrorCheck_24(3)>
  261. if (ListDimension_25(D) > 26)
  262. goto <bb 5>; [INV]
  263. else
  264. goto <bb 6>; [INV]
  265. <bb 5> :
  266. _2 = (unsigned char) Channel_21(D);
  267. Det_ReportError (255, _2, 6, 5);
  268. DetErrorCheck_27 = 1;
  269. <bb 6> :
  270. # DetErrorCheck_14 = PHI <DetErrorCheck_13(4), DetErrorCheck_27(5)>
  271. Idx_28 = 0;
  272. goto <bb 10>; [INV]
  273. <bb 7> :
  274. _3 = (unsigned int) Idx_12;
  275. _4 = _3 * 8;
  276. _5 = List_29(D) + _4;
  277. _6 = _5->Param;
  278. if (_6 > 25)
  279. goto <bb 8>; [INV]
  280. else
  281. goto <bb 9>; [INV]
  282. <bb 8> :
  283. _7 = (unsigned char) Channel_21(D);
  284. Det_ReportError (255, _7, 6, 5);
  285. DetErrorCheck_32 = 1;
  286. goto <bb 11>; [INV]
  287. <bb 9> :
  288. Idx.11_8 = Idx_12;
  289. Idx_30 = Idx.11_8 + 1;
  290. <bb 10> :
  291. # Idx_12 = PHI <Idx_28(6), Idx_30(9)>
  292. _9 = (long unsigned int) Idx_12;
  293. if (ListDimension_25(D) > _9)
  294. goto <bb 7>; [INV]
  295. else
  296. goto <bb 11>; [INV]
  297. <bb 11> :
  298. # DetErrorCheck_15 = PHI <DetErrorCheck_32(8), DetErrorCheck_14(10)>
  299. _10 = ~DetErrorCheck_15;
  300. if (_10 != 0)
  301. goto <bb 12>; [INV]
  302. else
  303. goto <bb 13>; [INV]
  304. <bb 12> :
  305. RetStatus_34 = Dma_Ip_SetLogicChannelTransferList (Channel_21(D), List_29(D), ListDimension_25(D));
  306. _11 = (unsigned char) Channel_21(D);
  307. Mcl_DmaReturnCheck (_11, 6, RetStatus_34);
  308. <bb 13> :
  309. return;
  310. }
  311. Mcl_SetDmaChannelGlobalList (const uint32 Channel, const struct Mcl_DmaChannelGlobalListType * List, const uint32 ListDimension)
  312. {
  313. boolean DetErrorCheck;
  314. uint8 Idx;
  315. Dma_Ip_ReturnType RetStatus;
  316. unsigned char _1;
  317. unsigned char _2;
  318. unsigned int _3;
  319. unsigned int _4;
  320. const struct Mcl_DmaChannelGlobalListType * _5;
  321. <unnamed type> _6;
  322. unsigned char _7;
  323. unsigned char Idx.10_8;
  324. long unsigned int _9;
  325. _Bool _10;
  326. unsigned char _11;
  327. <bb 2> :
  328. DetErrorCheck_20 = 0;
  329. if (Channel_21(D) > 6)
  330. goto <bb 3>; [INV]
  331. else
  332. goto <bb 4>; [INV]
  333. <bb 3> :
  334. _1 = (unsigned char) Channel_21(D);
  335. Det_ReportError (255, _1, 5, 3);
  336. DetErrorCheck_24 = 1;
  337. <bb 4> :
  338. # DetErrorCheck_13 = PHI <DetErrorCheck_20(2), DetErrorCheck_24(3)>
  339. if (ListDimension_25(D) > 11)
  340. goto <bb 5>; [INV]
  341. else
  342. goto <bb 6>; [INV]
  343. <bb 5> :
  344. _2 = (unsigned char) Channel_21(D);
  345. Det_ReportError (255, _2, 5, 5);
  346. DetErrorCheck_27 = 1;
  347. <bb 6> :
  348. # DetErrorCheck_14 = PHI <DetErrorCheck_13(4), DetErrorCheck_27(5)>
  349. Idx_28 = 0;
  350. goto <bb 10>; [INV]
  351. <bb 7> :
  352. _3 = (unsigned int) Idx_12;
  353. _4 = _3 * 8;
  354. _5 = List_29(D) + _4;
  355. _6 = _5->Param;
  356. if (_6 > 10)
  357. goto <bb 8>; [INV]
  358. else
  359. goto <bb 9>; [INV]
  360. <bb 8> :
  361. _7 = (unsigned char) Channel_21(D);
  362. Det_ReportError (255, _7, 5, 5);
  363. DetErrorCheck_32 = 1;
  364. goto <bb 11>; [INV]
  365. <bb 9> :
  366. Idx.10_8 = Idx_12;
  367. Idx_30 = Idx.10_8 + 1;
  368. <bb 10> :
  369. # Idx_12 = PHI <Idx_28(6), Idx_30(9)>
  370. _9 = (long unsigned int) Idx_12;
  371. if (ListDimension_25(D) > _9)
  372. goto <bb 7>; [INV]
  373. else
  374. goto <bb 11>; [INV]
  375. <bb 11> :
  376. # DetErrorCheck_15 = PHI <DetErrorCheck_32(8), DetErrorCheck_14(10)>
  377. _10 = ~DetErrorCheck_15;
  378. if (_10 != 0)
  379. goto <bb 12>; [INV]
  380. else
  381. goto <bb 13>; [INV]
  382. <bb 12> :
  383. RetStatus_34 = Dma_Ip_SetLogicChannelGlobalList (Channel_21(D), List_29(D), ListDimension_25(D));
  384. _11 = (unsigned char) Channel_21(D);
  385. Mcl_DmaReturnCheck (_11, 5, RetStatus_34);
  386. <bb 13> :
  387. return;
  388. }
  389. Mcl_GetDmaChannelStatus (const uint32 Channel, struct Mcl_DmaChannelStatusType * const Status)
  390. {
  391. struct Dma_Ip_LogicChannelStatusType LocChStatus;
  392. Dma_Ip_ReturnType RetStatus;
  393. unsigned char _1;
  394. unsigned char _2;
  395. <unnamed type> _3;
  396. long unsigned int _4;
  397. _Bool _5;
  398. _Bool _6;
  399. unsigned char _7;
  400. <bb 2> :
  401. if (Channel_9(D) > 6)
  402. goto <bb 3>; [INV]
  403. else
  404. goto <bb 4>; [INV]
  405. <bb 3> :
  406. _1 = (unsigned char) Channel_9(D);
  407. Det_ReportError (255, _1, 4, 3);
  408. goto <bb 7>; [INV]
  409. <bb 4> :
  410. if (Status_10(D) == 0B)
  411. goto <bb 5>; [INV]
  412. else
  413. goto <bb 6>; [INV]
  414. <bb 5> :
  415. _2 = (unsigned char) Channel_9(D);
  416. Det_ReportError (255, _2, 4, 1);
  417. goto <bb 7>; [INV]
  418. <bb 6> :
  419. RetStatus_13 = Dma_Ip_GetLogicChannelStatus (Channel_9(D), &LocChStatus);
  420. _3 = LocChStatus.ChStateValue;
  421. Status_10(D)->ChannelState = _3;
  422. _4 = LocChStatus.Errors;
  423. Status_10(D)->Errors = _4;
  424. _5 = LocChStatus.Active;
  425. Status_10(D)->Active = _5;
  426. _6 = LocChStatus.Done;
  427. Status_10(D)->Done = _6;
  428. _7 = (unsigned char) Channel_9(D);
  429. Mcl_DmaReturnCheck (_7, 4, RetStatus_13);
  430. <bb 7> :
  431. LocChStatus ={v} {CLOBBER};
  432. return;
  433. }
  434. Mcl_SetDmaChannelCommand (const uint32 Channel, const Mcl_DmaChannelCmdType Command)
  435. {
  436. Dma_Ip_ReturnType RetStatus;
  437. unsigned char _1;
  438. unsigned char _2;
  439. unsigned char _3;
  440. <bb 2> :
  441. if (Channel_5(D) > 6)
  442. goto <bb 3>; [INV]
  443. else
  444. goto <bb 4>; [INV]
  445. <bb 3> :
  446. _1 = (unsigned char) Channel_5(D);
  447. Det_ReportError (255, _1, 3, 3);
  448. goto <bb 7>; [INV]
  449. <bb 4> :
  450. if (Command_6(D) > 4)
  451. goto <bb 5>; [INV]
  452. else
  453. goto <bb 6>; [INV]
  454. <bb 5> :
  455. _2 = (unsigned char) Channel_5(D);
  456. Det_ReportError (255, _2, 3, 4);
  457. goto <bb 7>; [INV]
  458. <bb 6> :
  459. RetStatus_9 = Dma_Ip_SetLogicChannelCommand (Channel_5(D), Command_6(D));
  460. _3 = (unsigned char) Channel_5(D);
  461. Mcl_DmaReturnCheck (_3, 3, RetStatus_9);
  462. <bb 7> :
  463. return;
  464. }
  465. Mcl_GetDmaInstanceStatus (const uint32 Instance, struct Mcl_DmaInstanceStatusType * const Status)
  466. {
  467. struct Dma_Ip_LogicInstanceStatusType LocInstStatus;
  468. Dma_Ip_ReturnType RetStatus;
  469. unsigned char _1;
  470. unsigned char _2;
  471. long unsigned int _3;
  472. unsigned char _4;
  473. _Bool _5;
  474. unsigned char _6;
  475. <bb 2> :
  476. LocInstStatus.Errors = 0;
  477. LocInstStatus.ActiveId = 0;
  478. LocInstStatus.Active = 0;
  479. if (Instance_12(D) > 1)
  480. goto <bb 3>; [INV]
  481. else
  482. goto <bb 4>; [INV]
  483. <bb 3> :
  484. _1 = (unsigned char) Instance_12(D);
  485. Det_ReportError (255, _1, 2, 2);
  486. goto <bb 7>; [INV]
  487. <bb 4> :
  488. if (Status_13(D) == 0B)
  489. goto <bb 5>; [INV]
  490. else
  491. goto <bb 6>; [INV]
  492. <bb 5> :
  493. _2 = (unsigned char) Instance_12(D);
  494. Det_ReportError (255, _2, 2, 1);
  495. goto <bb 7>; [INV]
  496. <bb 6> :
  497. RetStatus_15 = Dma_Ip_GetLogicInstanceStatus (Instance_12(D), &LocInstStatus);
  498. _3 = LocInstStatus.Errors;
  499. Status_13(D)->Errors = _3;
  500. _4 = LocInstStatus.ActiveId;
  501. Status_13(D)->ActiveId = _4;
  502. _5 = LocInstStatus.Active;
  503. Status_13(D)->Active = _5;
  504. _6 = (unsigned char) Instance_12(D);
  505. Mcl_DmaReturnCheck (_6, 2, RetStatus_15);
  506. <bb 7> :
  507. LocInstStatus ={v} {CLOBBER};
  508. return;
  509. }
  510. Mcl_SetDmaInstanceCommand (const uint32 Instance, const Mcl_DmaInstanceCmdType Command)
  511. {
  512. Dma_Ip_ReturnType RetStatus;
  513. unsigned char _1;
  514. unsigned char _2;
  515. unsigned char _3;
  516. <bb 2> :
  517. if (Instance_5(D) > 1)
  518. goto <bb 3>; [INV]
  519. else
  520. goto <bb 4>; [INV]
  521. <bb 3> :
  522. _1 = (unsigned char) Instance_5(D);
  523. Det_ReportError (255, _1, 1, 2);
  524. goto <bb 7>; [INV]
  525. <bb 4> :
  526. if (Command_6(D) > 3)
  527. goto <bb 5>; [INV]
  528. else
  529. goto <bb 6>; [INV]
  530. <bb 5> :
  531. _2 = (unsigned char) Instance_5(D);
  532. Det_ReportError (255, _2, 1, 4);
  533. goto <bb 7>; [INV]
  534. <bb 6> :
  535. RetStatus_9 = Dma_Ip_SetLogicInstanceCommand (Instance_5(D), Command_6(D));
  536. _3 = (unsigned char) Instance_5(D);
  537. Mcl_DmaReturnCheck (_3, 1, RetStatus_9);
  538. <bb 7> :
  539. return;
  540. }
  541. Mcl_DeInit ()
  542. {
  543. Dma_Ip_ReturnType RetStatus;
  544. const struct Mcl_ConfigType * Mcl_pConfig.6_1;
  545. const struct Mcl_ConfigType * Mcl_pConfig.7_2;
  546. const struct Dma_Ip_InitType * _3;
  547. const struct Mcl_ConfigType * Mcl_pConfig.8_4;
  548. const struct Flexio_Ip_InstanceConfigType * _5;
  549. const struct Mcl_ConfigType * Mcl_pConfig.9_6;
  550. const struct Flexio_Ip_InstanceConfigType * _7;
  551. unsigned char _8;
  552. long unsigned int _9;
  553. <bb 2> :
  554. Mcl_pConfig.6_1 = Mcl_pConfig;
  555. if (Mcl_pConfig.6_1 != 0B)
  556. goto <bb 3>; [INV]
  557. else
  558. goto <bb 8>; [INV]
  559. <bb 3> :
  560. Mcl_pConfig.7_2 = Mcl_pConfig;
  561. _3 = Mcl_pConfig.7_2->pxDmaInitType;
  562. if (_3 != 0B)
  563. goto <bb 4>; [INV]
  564. else
  565. goto <bb 5>; [INV]
  566. <bb 4> :
  567. RetStatus_16 = Dma_Ip_Deinit ();
  568. Mcl_DmaReturnCheck (0, 11, RetStatus_16);
  569. <bb 5> :
  570. Mcl_pConfig.8_4 = Mcl_pConfig;
  571. _5 = Mcl_pConfig.8_4->pFlexioInitType;
  572. if (_5 != 0B)
  573. goto <bb 6>; [INV]
  574. else
  575. goto <bb 7>; [INV]
  576. <bb 6> :
  577. Mcl_pConfig.9_6 = Mcl_pConfig;
  578. _7 = Mcl_pConfig.9_6->pFlexioInitType;
  579. _8 = _7->instance;
  580. _9 = (long unsigned int) _8;
  581. Flexio_Mcl_Ip_DeinitDevice (_9);
  582. <bb 7> :
  583. Mcl_pConfig = 0B;
  584. goto <bb 9>; [INV]
  585. <bb 8> :
  586. Det_ReportError (255, 0, 11, 0);
  587. <bb 9> :
  588. return;
  589. }
  590. Mcl_Init (const struct Mcl_ConfigType * const ConfigPtr)
  591. {
  592. Mcl_ReturnType ValidPtr;
  593. Dma_Ip_ReturnType DmaIpStatus;
  594. const struct Mcl_ConfigType * Mcl_pConfig.0_1;
  595. const struct Mcl_ConfigType * Mcl_pConfig.1_2;
  596. const struct Mcl_ConfigType * Mcl_pConfig.2_3;
  597. const struct Dma_Ip_InitType * _4;
  598. const struct Mcl_ConfigType * Mcl_pConfig.3_5;
  599. const struct Dma_Ip_InitType * _6;
  600. const struct Mcl_ConfigType * Mcl_pConfig.4_7;
  601. const struct Flexio_Ip_InstanceConfigType * _8;
  602. const struct Mcl_ConfigType * Mcl_pConfig.5_9;
  603. const struct Flexio_Ip_InstanceConfigType * _10;
  604. <bb 2> :
  605. ValidPtr_16 = Mcl_ValidatePtrInit (ConfigPtr_14(D));
  606. if (ValidPtr_16 == 0)
  607. goto <bb 3>; [INV]
  608. else
  609. goto <bb 11>; [INV]
  610. <bb 3> :
  611. Mcl_pConfig.0_1 = Mcl_pConfig;
  612. if (Mcl_pConfig.0_1 == 0B)
  613. goto <bb 4>; [INV]
  614. else
  615. goto <bb 10>; [INV]
  616. <bb 4> :
  617. Mcl_pConfig = &Mcl_Config;
  618. Mcl_pConfig.1_2 = Mcl_pConfig;
  619. if (Mcl_pConfig.1_2 != 0B)
  620. goto <bb 5>; [INV]
  621. else
  622. goto <bb 11>; [INV]
  623. <bb 5> :
  624. Mcl_pConfig.2_3 = Mcl_pConfig;
  625. _4 = Mcl_pConfig.2_3->pxDmaInitType;
  626. if (_4 != 0B)
  627. goto <bb 6>; [INV]
  628. else
  629. goto <bb 8>; [INV]
  630. <bb 6> :
  631. Mcl_pConfig.3_5 = Mcl_pConfig;
  632. _6 = Mcl_pConfig.3_5->pxDmaInitType;
  633. DmaIpStatus_20 = Dma_Ip_Init (_6);
  634. if (DmaIpStatus_20 != 0)
  635. goto <bb 7>; [INV]
  636. else
  637. goto <bb 8>; [INV]
  638. <bb 7> :
  639. Det_ReportError (255, 0, 0, 0);
  640. <bb 8> :
  641. Mcl_pConfig.4_7 = Mcl_pConfig;
  642. _8 = Mcl_pConfig.4_7->pFlexioInitType;
  643. if (_8 != 0B)
  644. goto <bb 9>; [INV]
  645. else
  646. goto <bb 11>; [INV]
  647. <bb 9> :
  648. Mcl_pConfig.5_9 = Mcl_pConfig;
  649. _10 = Mcl_pConfig.5_9->pFlexioInitType;
  650. Flexio_Mcl_Ip_InitDevice (_10);
  651. goto <bb 11>; [INV]
  652. <bb 10> :
  653. Det_ReportError (255, 0, 0, 0);
  654. <bb 11> :
  655. return;
  656. }
  657. Mcl_DmaReturnCheck (const uint8 Channel, const uint8 Function, const Dma_Ip_ReturnType RetStatus)
  658. {
  659. <bb 2> :
  660. switch (RetStatus_2(D)) <default: <L4> [INV], case 0: <L3> [INV], case 1: <L0> [INV], case 2: <L1> [INV], case 3: <L2> [INV]>
  661. <bb 3> :
  662. <L0>:
  663. Det_ReportError (255, Channel_4(D), Function_5(D), 7);
  664. goto <bb 8>; [INV]
  665. <bb 4> :
  666. <L1>:
  667. Det_ReportError (255, Channel_4(D), Function_5(D), 6);
  668. goto <bb 8>; [INV]
  669. <bb 5> :
  670. <L2>:
  671. Det_ReportError (255, Channel_4(D), Function_5(D), 5);
  672. goto <bb 8>; [INV]
  673. <bb 6> :
  674. <L3>:
  675. goto <bb 8>; [INV]
  676. <bb 7> :
  677. <L4>:
  678. <bb 8> :
  679. return;
  680. }
  681. Mcl_ValidatePtrInit (const struct Mcl_ConfigType * const ConfigPtr)
  682. {
  683. Mcl_ReturnType Valid;
  684. Mcl_ReturnType D.6535;
  685. Mcl_ReturnType _8;
  686. <bb 2> :
  687. Valid_3 = 0;
  688. if (ConfigPtr_4(D) != 0B)
  689. goto <bb 3>; [INV]
  690. else
  691. goto <bb 4>; [INV]
  692. <bb 3> :
  693. Valid_6 = 1;
  694. Det_ReportError (255, 0, 0, 11);
  695. <bb 4> :
  696. # Valid_1 = PHI <Valid_3(2), Valid_6(3)>
  697. _8 = Valid_1;
  698. <bb 5> :
  699. <L3>:
  700. return _8;
  701. }