gh_debug_idsp.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*!
  2. *******************************************************************************
  3. **
  4. ** \file gh_debug_idsp.h
  5. **
  6. ** \brief IDSP Debug Registers.
  7. **
  8. ** Copyright: 2012 - 2016 (C) GoKe Microelectronics
  9. **
  10. ** \attention THIS SAMPLE CODE IS PROVIDED AS IS. GOKE MICROELECTRONICS
  11. ** ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR
  12. ** OMMISSIONS.
  13. **
  14. ** \note Do not modify this file as it is generated automatically.
  15. **
  16. ******************************************************************************/
  17. #ifndef _GH_DEBUG_IDSP_H
  18. #define _GH_DEBUG_IDSP_H
  19. #ifdef __LINUX__
  20. #include "reg4linux.h"
  21. #else
  22. #define FIO_ADDRESS(block,address) (address)
  23. #define FIO_MOFFSET(block,moffset) (moffset)
  24. #endif
  25. #ifndef __LINUX__
  26. #include "gtypes.h" /* global type definitions */
  27. #include "gh_lib_cfg.h" /* configuration */
  28. #endif
  29. #define GH_DEBUG_IDSP_ENABLE_DEBUG_PRINT 0
  30. #ifdef __LINUX__
  31. #define GH_DEBUG_IDSP_DEBUG_PRINT_FUNCTION printk
  32. #else
  33. #define GH_DEBUG_IDSP_DEBUG_PRINT_FUNCTION printf
  34. #endif
  35. #ifndef __LINUX__
  36. #if GH_DEBUG_IDSP_ENABLE_DEBUG_PRINT
  37. #include <stdio.h>
  38. #endif
  39. #endif
  40. /*----------------------------------------------------------------------------*/
  41. /* registers */
  42. /*----------------------------------------------------------------------------*/
  43. #define REG_DEBUG_IDSP_ADDRESS FIO_ADDRESS(DEBUG_IDSP,0xa0118000) /* read/write */
  44. #define REG_DEBUG_IDSP_CONFIG FIO_ADDRESS(DEBUG_IDSP,0xa0118004) /* read */
  45. #define REG_DEBUG_IDSP_SECTION_RESET FIO_ADDRESS(DEBUG_IDSP,0xa011801C) /* write */
  46. #define REG_DEBUG_IDSP_ERROR FIO_ADDRESS(DEBUG_IDSP,0xa0118020) /* read/write */
  47. #define REG_DEBUG_IDSP_CLOCK_GATING_DISABLE FIO_ADDRESS(DEBUG_IDSP,0xa0118024) /* read/write */
  48. #define REG_DEBUG_IDSP_SECTION_COMMAND_START FIO_ADDRESS(DEBUG_IDSP,0xa0118040) /* read */
  49. #define REG_DEBUG_IDSP_SECTION_DEBUG1 FIO_ADDRESS(DEBUG_IDSP,0xa0118078) /* read */
  50. #define REG_DEBUG_IDSP_SECTION_DEBUG2 FIO_ADDRESS(DEBUG_IDSP,0xa011807C) /* read */
  51. #define REG_DEBUG_IDSP_FILTER FIO_ADDRESS(DEBUG_IDSP,0xa0110000) /* read/write */
  52. #define REG_DEBUG_IDSP_SUSPEND_REG1 FIO_ADDRESS(DEBUG_IDSP,0xa0101c00) /* read/write */
  53. #define REG_DEBUG_IDSP_SUSPEND_REG2 FIO_ADDRESS(DEBUG_IDSP,0xa0101c40) /* read/write */
  54. /*----------------------------------------------------------------------------*/
  55. /* bit group structures */
  56. /*----------------------------------------------------------------------------*/
  57. typedef union { /* DEBUG_IDSP_Address */
  58. U32 all;
  59. struct {
  60. U32 filter_address_msb : 3;
  61. U32 : 1;
  62. U32 filter_number : 4;
  63. U32 section_number : 3;
  64. U32 : 21;
  65. } bitc;
  66. } GH_DEBUG_IDSP_ADDRESS_S;
  67. typedef union { /* DEBUG_IDSP_Config */
  68. U32 all;
  69. struct {
  70. U32 write_data : 1;
  71. U32 second_half : 1;
  72. U32 data : 6;
  73. U32 section_id : 3;
  74. U32 : 21;
  75. } bitc;
  76. } GH_DEBUG_IDSP_CONFIG_S;
  77. typedef union { /* DEBUG_IDSP_Section_reset */
  78. U32 all;
  79. struct {
  80. U32 reset : 7;
  81. U32 : 25;
  82. } bitc;
  83. } GH_DEBUG_IDSP_SECTION_RESET_S;
  84. typedef union { /* DEBUG_IDSP_error */
  85. U32 all;
  86. struct {
  87. U32 : 1;
  88. U32 reset : 7;
  89. U32 : 24;
  90. } bitc;
  91. } GH_DEBUG_IDSP_ERROR_S;
  92. typedef union { /* DEBUG_IDSP_clock_gating_disable */
  93. U32 all;
  94. struct {
  95. U32 smem : 1;
  96. U32 section : 7;
  97. U32 smem_tile : 1;
  98. U32 : 23;
  99. } bitc;
  100. } GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_S;
  101. typedef union { /* DEBUG_IDSP_Section_debug1 */
  102. U32 all;
  103. struct {
  104. U32 config_fsm_state : 4;
  105. U32 config_fsm_done : 1;
  106. U32 pending_secondary_stores : 3;
  107. U32 pending_primary_stores : 3;
  108. U32 line_sync_needed : 1;
  109. U32 line_sync_pending : 1;
  110. U32 store_fsm_state : 3;
  111. U32 store_fsm_top_state : 3;
  112. U32 pending_loads : 2;
  113. U32 load_fsm_state : 4;
  114. U32 load_fsm_top_state : 3;
  115. U32 main_fsm_state : 4;
  116. } bitc;
  117. } GH_DEBUG_IDSP_SECTION_DEBUG1_S;
  118. typedef union { /* DEBUG_IDSP_Section_debug2 */
  119. U32 all;
  120. struct {
  121. U32 store_count0 : 8;
  122. U32 store_count1 : 8;
  123. U32 store_count2 : 8;
  124. U32 last_half : 1;
  125. U32 last_word : 1;
  126. U32 more : 1;
  127. U32 filter : 4;
  128. U32 section : 1;
  129. } bitc;
  130. } GH_DEBUG_IDSP_SECTION_DEBUG2_S;
  131. /*----------------------------------------------------------------------------*/
  132. /* mirror variables */
  133. /*----------------------------------------------------------------------------*/
  134. extern GH_DEBUG_IDSP_SECTION_RESET_S m_debug_idsp_section_reset;
  135. #ifdef __cplusplus
  136. extern "C" {
  137. #endif
  138. /*----------------------------------------------------------------------------*/
  139. /* register DEBUG_IDSP_Address (read/write) */
  140. /*----------------------------------------------------------------------------*/
  141. /*! \brief Writes the register 'DEBUG_IDSP_Address'. */
  142. void GH_DEBUG_IDSP_set_Address(U32 data);
  143. /*! \brief Reads the register 'DEBUG_IDSP_Address'. */
  144. U32 GH_DEBUG_IDSP_get_Address(void);
  145. /*! \brief Writes the bit group 'filter_address_MSB' of register 'DEBUG_IDSP_Address'. */
  146. void GH_DEBUG_IDSP_set_Address_filter_address_MSB(U8 data);
  147. /*! \brief Reads the bit group 'filter_address_MSB' of register 'DEBUG_IDSP_Address'. */
  148. U8 GH_DEBUG_IDSP_get_Address_filter_address_MSB(void);
  149. /*! \brief Writes the bit group 'filter_number' of register 'DEBUG_IDSP_Address'. */
  150. void GH_DEBUG_IDSP_set_Address_filter_number(U8 data);
  151. /*! \brief Reads the bit group 'filter_number' of register 'DEBUG_IDSP_Address'. */
  152. U8 GH_DEBUG_IDSP_get_Address_filter_number(void);
  153. /*! \brief Writes the bit group 'section_number' of register 'DEBUG_IDSP_Address'. */
  154. void GH_DEBUG_IDSP_set_Address_section_number(U8 data);
  155. /*! \brief Reads the bit group 'section_number' of register 'DEBUG_IDSP_Address'. */
  156. U8 GH_DEBUG_IDSP_get_Address_section_number(void);
  157. /*----------------------------------------------------------------------------*/
  158. /* register DEBUG_IDSP_Config (read) */
  159. /*----------------------------------------------------------------------------*/
  160. /*! \brief Reads the register 'DEBUG_IDSP_Config'. */
  161. U32 GH_DEBUG_IDSP_get_Config(void);
  162. /*! \brief Reads the bit group 'write_data' of register 'DEBUG_IDSP_Config'. */
  163. U8 GH_DEBUG_IDSP_get_Config_write_data(void);
  164. /*! \brief Reads the bit group 'second_half' of register 'DEBUG_IDSP_Config'. */
  165. U8 GH_DEBUG_IDSP_get_Config_second_half(void);
  166. /*! \brief Reads the bit group 'data' of register 'DEBUG_IDSP_Config'. */
  167. U8 GH_DEBUG_IDSP_get_Config_data(void);
  168. /*! \brief Reads the bit group 'section_ID' of register 'DEBUG_IDSP_Config'. */
  169. U8 GH_DEBUG_IDSP_get_Config_section_ID(void);
  170. /*----------------------------------------------------------------------------*/
  171. /* register DEBUG_IDSP_Section_reset (write) */
  172. /*----------------------------------------------------------------------------*/
  173. /*! \brief Writes the register 'DEBUG_IDSP_Section_reset'. */
  174. void GH_DEBUG_IDSP_set_Section_reset(U32 data);
  175. /*! \brief Reads the mirror variable of the register 'DEBUG_IDSP_Section_reset'. */
  176. U32 GH_DEBUG_IDSP_getm_Section_reset(void);
  177. /*! \brief Writes the bit group 'reset' of register 'DEBUG_IDSP_Section_reset'. */
  178. void GH_DEBUG_IDSP_set_Section_reset_reset(U8 data);
  179. /*! \brief Reads the bit group 'reset' from the mirror variable of register 'DEBUG_IDSP_Section_reset'. */
  180. U8 GH_DEBUG_IDSP_getm_Section_reset_reset(void);
  181. /*----------------------------------------------------------------------------*/
  182. /* register DEBUG_IDSP_error (read/write) */
  183. /*----------------------------------------------------------------------------*/
  184. /*! \brief Writes the register 'DEBUG_IDSP_error'. */
  185. void GH_DEBUG_IDSP_set_error(U32 data);
  186. /*! \brief Reads the register 'DEBUG_IDSP_error'. */
  187. U32 GH_DEBUG_IDSP_get_error(void);
  188. /*! \brief Writes the bit group 'reset' of register 'DEBUG_IDSP_error'. */
  189. void GH_DEBUG_IDSP_set_error_reset(U8 data);
  190. /*! \brief Reads the bit group 'reset' of register 'DEBUG_IDSP_error'. */
  191. U8 GH_DEBUG_IDSP_get_error_reset(void);
  192. /*----------------------------------------------------------------------------*/
  193. /* register DEBUG_IDSP_clock_gating_disable (read/write) */
  194. /*----------------------------------------------------------------------------*/
  195. /*! \brief Writes the register 'DEBUG_IDSP_clock_gating_disable'. */
  196. void GH_DEBUG_IDSP_set_clock_gating_disable(U32 data);
  197. /*! \brief Reads the register 'DEBUG_IDSP_clock_gating_disable'. */
  198. U32 GH_DEBUG_IDSP_get_clock_gating_disable(void);
  199. /*! \brief Writes the bit group 'smem' of register 'DEBUG_IDSP_clock_gating_disable'. */
  200. void GH_DEBUG_IDSP_set_clock_gating_disable_smem(U8 data);
  201. /*! \brief Reads the bit group 'smem' of register 'DEBUG_IDSP_clock_gating_disable'. */
  202. U8 GH_DEBUG_IDSP_get_clock_gating_disable_smem(void);
  203. /*! \brief Writes the bit group 'section' of register 'DEBUG_IDSP_clock_gating_disable'. */
  204. void GH_DEBUG_IDSP_set_clock_gating_disable_section(U8 data);
  205. /*! \brief Reads the bit group 'section' of register 'DEBUG_IDSP_clock_gating_disable'. */
  206. U8 GH_DEBUG_IDSP_get_clock_gating_disable_section(void);
  207. /*! \brief Writes the bit group 'smem_tile' of register 'DEBUG_IDSP_clock_gating_disable'. */
  208. void GH_DEBUG_IDSP_set_clock_gating_disable_smem_tile(U8 data);
  209. /*! \brief Reads the bit group 'smem_tile' of register 'DEBUG_IDSP_clock_gating_disable'. */
  210. U8 GH_DEBUG_IDSP_get_clock_gating_disable_smem_tile(void);
  211. /*----------------------------------------------------------------------------*/
  212. /* register DEBUG_IDSP_Section_command_start (read) */
  213. /*----------------------------------------------------------------------------*/
  214. /*! \brief Reads the register 'DEBUG_IDSP_Section_command_start'. */
  215. U32 GH_DEBUG_IDSP_get_Section_command_start(U8 index);
  216. /*----------------------------------------------------------------------------*/
  217. /* register DEBUG_IDSP_Section_debug1 (read) */
  218. /*----------------------------------------------------------------------------*/
  219. /*! \brief Reads the register 'DEBUG_IDSP_Section_debug1'. */
  220. U32 GH_DEBUG_IDSP_get_Section_debug1(U8 index);
  221. /*! \brief Reads the bit group 'config_FSM_state' of register 'DEBUG_IDSP_Section_debug1'. */
  222. U8 GH_DEBUG_IDSP_get_Section_debug1_config_FSM_state(U8 index);
  223. /*! \brief Reads the bit group 'config_FSM_done' of register 'DEBUG_IDSP_Section_debug1'. */
  224. U8 GH_DEBUG_IDSP_get_Section_debug1_config_FSM_done(U8 index);
  225. /*! \brief Reads the bit group 'pending_secondary_stores' of register 'DEBUG_IDSP_Section_debug1'. */
  226. U8 GH_DEBUG_IDSP_get_Section_debug1_pending_secondary_stores(U8 index);
  227. /*! \brief Reads the bit group 'pending_primary_stores' of register 'DEBUG_IDSP_Section_debug1'. */
  228. U8 GH_DEBUG_IDSP_get_Section_debug1_pending_primary_stores(U8 index);
  229. /*! \brief Reads the bit group 'line_sync_needed' of register 'DEBUG_IDSP_Section_debug1'. */
  230. U8 GH_DEBUG_IDSP_get_Section_debug1_line_sync_needed(U8 index);
  231. /*! \brief Reads the bit group 'line_sync_pending' of register 'DEBUG_IDSP_Section_debug1'. */
  232. U8 GH_DEBUG_IDSP_get_Section_debug1_line_sync_pending(U8 index);
  233. /*! \brief Reads the bit group 'store_FSM_state' of register 'DEBUG_IDSP_Section_debug1'. */
  234. U8 GH_DEBUG_IDSP_get_Section_debug1_store_FSM_state(U8 index);
  235. /*! \brief Reads the bit group 'store_FSM_top_state' of register 'DEBUG_IDSP_Section_debug1'. */
  236. U8 GH_DEBUG_IDSP_get_Section_debug1_store_FSM_top_state(U8 index);
  237. /*! \brief Reads the bit group 'pending_loads' of register 'DEBUG_IDSP_Section_debug1'. */
  238. U8 GH_DEBUG_IDSP_get_Section_debug1_pending_loads(U8 index);
  239. /*! \brief Reads the bit group 'load_FSM_state' of register 'DEBUG_IDSP_Section_debug1'. */
  240. U8 GH_DEBUG_IDSP_get_Section_debug1_load_FSM_state(U8 index);
  241. /*! \brief Reads the bit group 'load_FSM_top_state' of register 'DEBUG_IDSP_Section_debug1'. */
  242. U8 GH_DEBUG_IDSP_get_Section_debug1_load_FSM_top_state(U8 index);
  243. /*! \brief Reads the bit group 'main_FSM_state' of register 'DEBUG_IDSP_Section_debug1'. */
  244. U8 GH_DEBUG_IDSP_get_Section_debug1_main_FSM_state(U8 index);
  245. /*----------------------------------------------------------------------------*/
  246. /* register DEBUG_IDSP_Section_debug2 (read) */
  247. /*----------------------------------------------------------------------------*/
  248. /*! \brief Reads the register 'DEBUG_IDSP_Section_debug2'. */
  249. U32 GH_DEBUG_IDSP_get_Section_debug2(U8 index);
  250. /*! \brief Reads the bit group 'store_count0' of register 'DEBUG_IDSP_Section_debug2'. */
  251. U8 GH_DEBUG_IDSP_get_Section_debug2_store_count0(U8 index);
  252. /*! \brief Reads the bit group 'store_count1' of register 'DEBUG_IDSP_Section_debug2'. */
  253. U8 GH_DEBUG_IDSP_get_Section_debug2_store_count1(U8 index);
  254. /*! \brief Reads the bit group 'store_count2' of register 'DEBUG_IDSP_Section_debug2'. */
  255. U8 GH_DEBUG_IDSP_get_Section_debug2_store_count2(U8 index);
  256. /*! \brief Reads the bit group 'last_half' of register 'DEBUG_IDSP_Section_debug2'. */
  257. U8 GH_DEBUG_IDSP_get_Section_debug2_last_half(U8 index);
  258. /*! \brief Reads the bit group 'last_word' of register 'DEBUG_IDSP_Section_debug2'. */
  259. U8 GH_DEBUG_IDSP_get_Section_debug2_last_word(U8 index);
  260. /*! \brief Reads the bit group 'more' of register 'DEBUG_IDSP_Section_debug2'. */
  261. U8 GH_DEBUG_IDSP_get_Section_debug2_more(U8 index);
  262. /*! \brief Reads the bit group 'filter' of register 'DEBUG_IDSP_Section_debug2'. */
  263. U8 GH_DEBUG_IDSP_get_Section_debug2_filter(U8 index);
  264. /*! \brief Reads the bit group 'section' of register 'DEBUG_IDSP_Section_debug2'. */
  265. U8 GH_DEBUG_IDSP_get_Section_debug2_section(U8 index);
  266. /*----------------------------------------------------------------------------*/
  267. /* register DEBUG_IDSP_Filter (read/write) */
  268. /*----------------------------------------------------------------------------*/
  269. /*! \brief Writes the register 'DEBUG_IDSP_Filter'. */
  270. void GH_DEBUG_IDSP_set_Filter(U32 data);
  271. /*! \brief Reads the register 'DEBUG_IDSP_Filter'. */
  272. U32 GH_DEBUG_IDSP_get_Filter(void);
  273. /*----------------------------------------------------------------------------*/
  274. /* register DEBUG_IDSP_Suspend_reg1 (read/write) */
  275. /*----------------------------------------------------------------------------*/
  276. /*! \brief Writes the register 'DEBUG_IDSP_Suspend_reg1'. */
  277. void GH_DEBUG_IDSP_set_Suspend_reg1(U8 index, U32 data);
  278. /*! \brief Reads the register 'DEBUG_IDSP_Suspend_reg1'. */
  279. U32 GH_DEBUG_IDSP_get_Suspend_reg1(U8 index);
  280. /*----------------------------------------------------------------------------*/
  281. /* register DEBUG_IDSP_Suspend_reg2 (read/write) */
  282. /*----------------------------------------------------------------------------*/
  283. /*! \brief Writes the register 'DEBUG_IDSP_Suspend_reg2'. */
  284. void GH_DEBUG_IDSP_set_Suspend_reg2(U8 index, U32 data);
  285. /*! \brief Reads the register 'DEBUG_IDSP_Suspend_reg2'. */
  286. U32 GH_DEBUG_IDSP_get_Suspend_reg2(U8 index);
  287. /*----------------------------------------------------------------------------*/
  288. /* init function */
  289. /*----------------------------------------------------------------------------*/
  290. /*! \brief Initialises the registers and mirror variables. */
  291. void GH_DEBUG_IDSP_init(void);
  292. #ifdef SRC_INLINE
  293. #define SRC_INC 1
  294. #include "gh_debug_idsp.c"
  295. #undef SRC_INC
  296. #endif
  297. #ifdef __cplusplus
  298. }
  299. #endif
  300. #endif /* _GH_DEBUG_IDSP_H */
  301. /*----------------------------------------------------------------------------*/
  302. /* end of file */
  303. /*----------------------------------------------------------------------------*/