F2837xD_cla.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. //###########################################################################
  2. //
  3. // FILE: F2837xD_cla.h
  4. //
  5. // TITLE: CLA Register Definitions.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //###########################################################################
  42. #ifndef __F2837xD_CLA_H__
  43. #define __F2837xD_CLA_H__
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. //---------------------------------------------------------------------------
  48. // CLA Individual Register Bit Definitions:
  49. struct MCTL_BITS { // bits description
  50. Uint16 HARDRESET:1; // 0 Hard Reset
  51. Uint16 SOFTRESET:1; // 1 Soft Reset
  52. Uint16 IACKE:1; // 2 IACK enable
  53. Uint16 rsvd1:13; // 15:3 Reserved
  54. };
  55. union MCTL_REG {
  56. Uint16 all;
  57. struct MCTL_BITS bit;
  58. };
  59. struct MIFR_BITS { // bits description
  60. Uint16 INT1:1; // 0 Task 1 Interrupt Flag
  61. Uint16 INT2:1; // 1 Task 2 Interrupt Flag
  62. Uint16 INT3:1; // 2 Task 3 Interrupt Flag
  63. Uint16 INT4:1; // 3 Task 4 Interrupt Flag
  64. Uint16 INT5:1; // 4 Task 5 Interrupt Flag
  65. Uint16 INT6:1; // 5 Task 6 Interrupt Flag
  66. Uint16 INT7:1; // 6 Task 7 Interrupt Flag
  67. Uint16 INT8:1; // 7 Task 8 Interrupt Flag
  68. Uint16 rsvd1:8; // 15:8 Reserved
  69. };
  70. union MIFR_REG {
  71. Uint16 all;
  72. struct MIFR_BITS bit;
  73. };
  74. struct MIOVF_BITS { // bits description
  75. Uint16 INT1:1; // 0 Task 1 Interrupt Overflow Flag
  76. Uint16 INT2:1; // 1 Task 2 Interrupt Overflow Flag
  77. Uint16 INT3:1; // 2 Task 3 Interrupt Overflow Flag
  78. Uint16 INT4:1; // 3 Task 4 Interrupt Overflow Flag
  79. Uint16 INT5:1; // 4 Task 5 Interrupt Overflow Flag
  80. Uint16 INT6:1; // 5 Task 6 Interrupt Overflow Flag
  81. Uint16 INT7:1; // 6 Task 7 Interrupt Overflow Flag
  82. Uint16 INT8:1; // 7 Task 8 Interrupt Overflow Flag
  83. Uint16 rsvd1:8; // 15:8 Reserved
  84. };
  85. union MIOVF_REG {
  86. Uint16 all;
  87. struct MIOVF_BITS bit;
  88. };
  89. struct MIFRC_BITS { // bits description
  90. Uint16 INT1:1; // 0 Task 1 Interrupt Force
  91. Uint16 INT2:1; // 1 Task 2 Interrupt Force
  92. Uint16 INT3:1; // 2 Task 3 Interrupt Force
  93. Uint16 INT4:1; // 3 Task 4 Interrupt Force
  94. Uint16 INT5:1; // 4 Task 5 Interrupt Force
  95. Uint16 INT6:1; // 5 Task 6 Interrupt Force
  96. Uint16 INT7:1; // 6 Task 7 Interrupt Force
  97. Uint16 INT8:1; // 7 Task 8 Interrupt Force
  98. Uint16 rsvd1:8; // 15:8 Reserved
  99. };
  100. union MIFRC_REG {
  101. Uint16 all;
  102. struct MIFRC_BITS bit;
  103. };
  104. struct MICLR_BITS { // bits description
  105. Uint16 INT1:1; // 0 Task 1 Interrupt Flag Clear
  106. Uint16 INT2:1; // 1 Task 2 Interrupt Flag Clear
  107. Uint16 INT3:1; // 2 Task 3 Interrupt Flag Clear
  108. Uint16 INT4:1; // 3 Task 4 Interrupt Flag Clear
  109. Uint16 INT5:1; // 4 Task 5 Interrupt Flag Clear
  110. Uint16 INT6:1; // 5 Task 6 Interrupt Flag Clear
  111. Uint16 INT7:1; // 6 Task 7 Interrupt Flag Clear
  112. Uint16 INT8:1; // 7 Task 8 Interrupt Flag Clear
  113. Uint16 rsvd1:8; // 15:8 Reserved
  114. };
  115. union MICLR_REG {
  116. Uint16 all;
  117. struct MICLR_BITS bit;
  118. };
  119. struct MICLROVF_BITS { // bits description
  120. Uint16 INT1:1; // 0 Task 1 Interrupt Overflow Flag Clear
  121. Uint16 INT2:1; // 1 Task 2 Interrupt Overflow Flag Clear
  122. Uint16 INT3:1; // 2 Task 3 Interrupt Overflow Flag Clear
  123. Uint16 INT4:1; // 3 Task 4 Interrupt Overflow Flag Clear
  124. Uint16 INT5:1; // 4 Task 5 Interrupt Overflow Flag Clear
  125. Uint16 INT6:1; // 5 Task 6 Interrupt Overflow Flag Clear
  126. Uint16 INT7:1; // 6 Task 7 Interrupt Overflow Flag Clear
  127. Uint16 INT8:1; // 7 Task 8 Interrupt Overflow Flag Clear
  128. Uint16 rsvd1:8; // 15:8 Reserved
  129. };
  130. union MICLROVF_REG {
  131. Uint16 all;
  132. struct MICLROVF_BITS bit;
  133. };
  134. struct MIER_BITS { // bits description
  135. Uint16 INT1:1; // 0 Task 1 Interrupt Enable
  136. Uint16 INT2:1; // 1 Task 2 Interrupt Enable
  137. Uint16 INT3:1; // 2 Task 3 Interrupt Enable
  138. Uint16 INT4:1; // 3 Task 4 Interrupt Enable
  139. Uint16 INT5:1; // 4 Task 5 Interrupt Enable
  140. Uint16 INT6:1; // 5 Task 6 Interrupt Enable
  141. Uint16 INT7:1; // 6 Task 7 Interrupt Enable
  142. Uint16 INT8:1; // 7 Task 8 Interrupt Enable
  143. Uint16 rsvd1:8; // 15:8 Reserved
  144. };
  145. union MIER_REG {
  146. Uint16 all;
  147. struct MIER_BITS bit;
  148. };
  149. struct MIRUN_BITS { // bits description
  150. Uint16 INT1:1; // 0 Task 1 Run Status
  151. Uint16 INT2:1; // 1 Task 2 Run Status
  152. Uint16 INT3:1; // 2 Task 3 Run Status
  153. Uint16 INT4:1; // 3 Task 4 Run Status
  154. Uint16 INT5:1; // 4 Task 5 Run Status
  155. Uint16 INT6:1; // 5 Task 6 Run Status
  156. Uint16 INT7:1; // 6 Task 7 Run Status
  157. Uint16 INT8:1; // 7 Task 8 Run Status
  158. Uint16 rsvd1:8; // 15:8 Reserved
  159. };
  160. union MIRUN_REG {
  161. Uint16 all;
  162. struct MIRUN_BITS bit;
  163. };
  164. struct _MSTF_BITS { // bits description
  165. Uint16 LVF:1; // 0 Latched Overflow Flag
  166. Uint16 LUF:1; // 1 Latched Underflow Flag
  167. Uint16 NF:1; // 2 Negative Float Flag
  168. Uint16 ZF:1; // 3 Zero Float Flag
  169. Uint16 rsvd1:2; // 5:4 Reserved
  170. Uint16 TF:1; // 6 Test Flag
  171. Uint16 rsvd2:2; // 8:7 Reserved
  172. Uint16 RNDF32:1; // 9 Round 32-bit Floating-Point Mode
  173. Uint16 rsvd3:1; // 10 Reserved
  174. Uint16 MEALLOW:1; // 11 MEALLOW Status
  175. Uint32 _RPC:16; // 27:12 Return PC
  176. Uint16 rsvd4:4; // 31:28 Reserved
  177. };
  178. union _MSTF_REG {
  179. Uint32 all;
  180. struct _MSTF_BITS bit;
  181. };
  182. union MR_REG {
  183. Uint32 i32;
  184. float f32;
  185. };
  186. struct CLA_REGS {
  187. Uint16 MVECT1; // Task Interrupt Vector
  188. Uint16 MVECT2; // Task Interrupt Vector
  189. Uint16 MVECT3; // Task Interrupt Vector
  190. Uint16 MVECT4; // Task Interrupt Vector
  191. Uint16 MVECT5; // Task Interrupt Vector
  192. Uint16 MVECT6; // Task Interrupt Vector
  193. Uint16 MVECT7; // Task Interrupt Vector
  194. Uint16 MVECT8; // Task Interrupt Vector
  195. Uint16 rsvd1[8]; // Reserved
  196. union MCTL_REG MCTL; // Control Register
  197. Uint16 rsvd2[15]; // Reserved
  198. union MIFR_REG MIFR; // Interrupt Flag Register
  199. union MIOVF_REG MIOVF; // Interrupt Overflow Flag Register
  200. union MIFRC_REG MIFRC; // Interrupt Force Register
  201. union MICLR_REG MICLR; // Interrupt Flag Clear Register
  202. union MICLROVF_REG MICLROVF; // Interrupt Overflow Flag Clear Register
  203. union MIER_REG MIER; // Interrupt Enable Register
  204. union MIRUN_REG MIRUN; // Interrupt Run Status Register
  205. Uint16 rsvd3; // Reserved
  206. Uint16 _MPC; // CLA Program Counter
  207. Uint16 rsvd4; // Reserved
  208. Uint16 _MAR0; // CLA Auxiliary Register 0
  209. Uint16 _MAR1; // CLA Auxiliary Register 1
  210. Uint16 rsvd5[2]; // Reserved
  211. union _MSTF_REG _MSTF; // CLA Floating-Point Status Register
  212. union MR_REG _MR0; // CLA Floating-Point Result Register 0
  213. Uint16 rsvd6[2]; // Reserved
  214. union MR_REG _MR1; // CLA Floating-Point Result Register 1
  215. Uint16 rsvd7[2]; // Reserved
  216. union MR_REG _MR2; // CLA Floating-Point Result Register 2
  217. Uint16 rsvd8[2]; // Reserved
  218. union MR_REG _MR3; // CLA Floating-Point Result Register 3
  219. };
  220. struct SOFTINTEN_BITS { // bits description
  221. Uint16 TASK1:1; // 0 Task 1 Software Interrupt Enable
  222. Uint16 TASK2:1; // 1 Task 2 Software Interrupt Enable
  223. Uint16 TASK3:1; // 2 Task 3 Software Interrupt Enable
  224. Uint16 TASK4:1; // 3 Task 4 Software Interrupt Enable
  225. Uint16 TASK5:1; // 4 Task 5 Software Interrupt Enable
  226. Uint16 TASK6:1; // 5 Task 6 Software Interrupt Enable
  227. Uint16 TASK7:1; // 6 Task 7 Software Interrupt Enable
  228. Uint16 TASK8:1; // 7 Task 8 Software Interrupt Enable
  229. Uint16 rsvd1:8; // 15:8 Reserved
  230. Uint16 rsvd2:16; // 31:16 Reserved
  231. };
  232. union SOFTINTEN_REG {
  233. Uint32 all;
  234. struct SOFTINTEN_BITS bit;
  235. };
  236. struct SOFTINTFRC_BITS { // bits description
  237. Uint16 TASK1:1; // 0 Task 1 Software Interrupt Force
  238. Uint16 TASK2:1; // 1 Task 2 Software Interrupt Force
  239. Uint16 TASK3:1; // 2 Task 3 Software Interrupt Force
  240. Uint16 TASK4:1; // 3 Task 4 Software Interrupt Force
  241. Uint16 TASK5:1; // 4 Task 5 Software Interrupt Force
  242. Uint16 TASK6:1; // 5 Task 6 Software Interrupt Force
  243. Uint16 TASK7:1; // 6 Task 7 Software Interrupt Force
  244. Uint16 TASK8:1; // 7 Task 8 Software Interrupt Force
  245. Uint16 rsvd1:8; // 15:8 Reserved
  246. Uint16 rsvd2:16; // 31:16 Reserved
  247. };
  248. union SOFTINTFRC_REG {
  249. Uint32 all;
  250. struct SOFTINTFRC_BITS bit;
  251. };
  252. struct CLA_SOFTINT_REGS {
  253. union SOFTINTEN_REG SOFTINTEN; // CLA Software Interrupt Enable Register
  254. union SOFTINTFRC_REG SOFTINTFRC; // CLA Software Interrupt Force Register
  255. };
  256. //---------------------------------------------------------------------------
  257. // CLA External References & Function Declarations:
  258. //
  259. #ifdef CPU1
  260. extern volatile struct CLA_SOFTINT_REGS Cla1SoftIntRegs;
  261. extern volatile struct CLA_REGS Cla1Regs;
  262. #endif
  263. #ifdef CPU2
  264. extern volatile struct CLA_SOFTINT_REGS Cla1SoftIntRegs;
  265. extern volatile struct CLA_REGS Cla1Regs;
  266. #endif
  267. #ifdef __cplusplus
  268. }
  269. #endif /* extern "C" */
  270. #endif
  271. //===========================================================================
  272. // End of file.
  273. //===========================================================================