gh_debug_code.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /*!
  2. *******************************************************************************
  3. **
  4. ** \file gh_debug_code.h
  5. **
  6. ** \brief CODE 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_CODE_H
  18. #define _GH_DEBUG_CODE_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_CODE_ENABLE_DEBUG_PRINT 0
  30. #ifdef __LINUX__
  31. #define GH_DEBUG_CODE_DEBUG_PRINT_FUNCTION printk
  32. #else
  33. #define GH_DEBUG_CODE_DEBUG_PRINT_FUNCTION printf
  34. #endif
  35. #ifndef __LINUX__
  36. #if GH_DEBUG_CODE_ENABLE_DEBUG_PRINT
  37. #include <stdio.h>
  38. #endif
  39. #endif
  40. /*----------------------------------------------------------------------------*/
  41. /* registers */
  42. /*----------------------------------------------------------------------------*/
  43. #define REG_DEBUG_CODE_CODE_CR_TRESET_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160000) /* read/write */
  44. #define REG_DEBUG_CODE_CODE_CR_IC_INVLD_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160004) /* write */
  45. #define REG_DEBUG_CODE_CODE_CR_RESET_PC_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160008) /* read/write */
  46. #define REG_DEBUG_CODE_CODE_CR_TS_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160010) /* read */
  47. #define REG_DEBUG_CODE_CODE_CR_PC_T0_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160020) /* read */
  48. #define REG_DEBUG_CODE_CODE_CR_PC_T1_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160024) /* read */
  49. #define REG_DEBUG_CODE_CODE_CR_PC_T2_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160028) /* read */
  50. #define REG_DEBUG_CODE_CODE_CR_PC_T3_ADDR FIO_ADDRESS(DEBUG_CODE,0xa016002C) /* read */
  51. #define REG_DEBUG_CODE_CODE_CR_STALL_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160038) /* read */
  52. #define REG_DEBUG_CODE_CODE_CR_RF_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0160200) /* read */
  53. #define REG_DEBUG_CODE_CODE_CR_DC_ADDR FIO_ADDRESS(DEBUG_CODE,0xa0164000) /* read/write */
  54. /*----------------------------------------------------------------------------*/
  55. /* bit group structures */
  56. /*----------------------------------------------------------------------------*/
  57. typedef union { /* DEBUG_CODE_CODE_CR_IC_INVLD_ADDR */
  58. U32 all;
  59. struct {
  60. U32 invalid_icache : 1;
  61. U32 : 31;
  62. } bitc;
  63. } GH_DEBUG_CODE_CODE_CR_IC_INVLD_ADDR_S;
  64. typedef union { /* DEBUG_CODE_CODE_CR_TS_ADDR */
  65. U32 all;
  66. struct {
  67. U32 ts_t0_run : 1;
  68. U32 ts_t0_restmr : 1;
  69. U32 ts_t0_dmab4 : 1;
  70. U32 ts_t0_codeb4 : 1;
  71. U32 ts_t0_sendb4 : 1;
  72. U32 ts_t0_recb4 : 1;
  73. U32 : 2;
  74. U32 ts_t1_run : 1;
  75. U32 ts_t1_restmr : 1;
  76. U32 ts_t1_dmab4 : 1;
  77. U32 ts_t1_codeb4 : 1;
  78. U32 ts_t1_sendb4 : 1;
  79. U32 ts_t1_recb4 : 1;
  80. U32 : 2;
  81. U32 ts_t2_run : 1;
  82. U32 ts_t2_restmr : 1;
  83. U32 ts_t2_dmab4 : 1;
  84. U32 ts_t2_codeb4 : 1;
  85. U32 ts_t2_sendb4 : 1;
  86. U32 ts_t2_recb4 : 1;
  87. U32 : 2;
  88. U32 ts_t3_run : 1;
  89. U32 ts_t3_restmr : 1;
  90. U32 ts_t3_dmab4 : 1;
  91. U32 ts_t3_codeb4 : 1;
  92. U32 ts_t3_sendb4 : 1;
  93. U32 ts_t3_recb4 : 1;
  94. U32 : 2;
  95. } bitc;
  96. } GH_DEBUG_CODE_CODE_CR_TS_ADDR_S;
  97. /*----------------------------------------------------------------------------*/
  98. /* mirror variables */
  99. /*----------------------------------------------------------------------------*/
  100. extern GH_DEBUG_CODE_CODE_CR_IC_INVLD_ADDR_S m_debug_code_code_cr_ic_invld_addr;
  101. #ifdef __cplusplus
  102. extern "C" {
  103. #endif
  104. /*----------------------------------------------------------------------------*/
  105. /* register DEBUG_CODE_CODE_CR_TRESET_ADDR (read/write) */
  106. /*----------------------------------------------------------------------------*/
  107. /*! \brief Writes the register 'DEBUG_CODE_CODE_CR_TRESET_ADDR'. */
  108. void GH_DEBUG_CODE_set_CODE_CR_TRESET_ADDR(U32 data);
  109. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_TRESET_ADDR'. */
  110. U32 GH_DEBUG_CODE_get_CODE_CR_TRESET_ADDR(void);
  111. /*----------------------------------------------------------------------------*/
  112. /* register DEBUG_CODE_CODE_CR_IC_INVLD_ADDR (write) */
  113. /*----------------------------------------------------------------------------*/
  114. /*! \brief Writes the register 'DEBUG_CODE_CODE_CR_IC_INVLD_ADDR'. */
  115. void GH_DEBUG_CODE_set_CODE_CR_IC_INVLD_ADDR(U32 data);
  116. /*! \brief Reads the mirror variable of the register 'DEBUG_CODE_CODE_CR_IC_INVLD_ADDR'. */
  117. U32 GH_DEBUG_CODE_getm_CODE_CR_IC_INVLD_ADDR(void);
  118. /*! \brief Writes the bit group 'invalid_icache' of register 'DEBUG_CODE_CODE_CR_IC_INVLD_ADDR'. */
  119. void GH_DEBUG_CODE_set_CODE_CR_IC_INVLD_ADDR_invalid_icache(U8 data);
  120. /*! \brief Reads the bit group 'invalid_icache' from the mirror variable of register 'DEBUG_CODE_CODE_CR_IC_INVLD_ADDR'. */
  121. U8 GH_DEBUG_CODE_getm_CODE_CR_IC_INVLD_ADDR_invalid_icache(void);
  122. /*----------------------------------------------------------------------------*/
  123. /* register DEBUG_CODE_CODE_CR_RESET_PC_ADDR (read/write) */
  124. /*----------------------------------------------------------------------------*/
  125. /*! \brief Writes the register 'DEBUG_CODE_CODE_CR_RESET_PC_ADDR'. */
  126. void GH_DEBUG_CODE_set_CODE_CR_RESET_PC_ADDR(U32 data);
  127. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_RESET_PC_ADDR'. */
  128. U32 GH_DEBUG_CODE_get_CODE_CR_RESET_PC_ADDR(void);
  129. /*----------------------------------------------------------------------------*/
  130. /* register DEBUG_CODE_CODE_CR_TS_ADDR (read) */
  131. /*----------------------------------------------------------------------------*/
  132. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  133. U32 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR(void);
  134. /*! \brief Reads the bit group 'ts_t0_run' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  135. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_run(void);
  136. /*! \brief Reads the bit group 'ts_t0_restmr' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  137. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_restmr(void);
  138. /*! \brief Reads the bit group 'ts_t0_dmab4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  139. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_dmab4(void);
  140. /*! \brief Reads the bit group 'ts_t0_codeb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  141. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_codeb4(void);
  142. /*! \brief Reads the bit group 'ts_t0_sendb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  143. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_sendb4(void);
  144. /*! \brief Reads the bit group 'ts_t0_recb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  145. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t0_recb4(void);
  146. /*! \brief Reads the bit group 'ts_t1_run' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  147. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_run(void);
  148. /*! \brief Reads the bit group 'ts_t1_restmr' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  149. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_restmr(void);
  150. /*! \brief Reads the bit group 'ts_t1_dmab4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  151. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_dmab4(void);
  152. /*! \brief Reads the bit group 'ts_t1_codeb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  153. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_codeb4(void);
  154. /*! \brief Reads the bit group 'ts_t1_sendb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  155. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_sendb4(void);
  156. /*! \brief Reads the bit group 'ts_t1_recb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  157. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t1_recb4(void);
  158. /*! \brief Reads the bit group 'ts_t2_run' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  159. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_run(void);
  160. /*! \brief Reads the bit group 'ts_t2_restmr' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  161. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_restmr(void);
  162. /*! \brief Reads the bit group 'ts_t2_dmab4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  163. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_dmab4(void);
  164. /*! \brief Reads the bit group 'ts_t2_codeb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  165. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_codeb4(void);
  166. /*! \brief Reads the bit group 'ts_t2_sendb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  167. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_sendb4(void);
  168. /*! \brief Reads the bit group 'ts_t2_recb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  169. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t2_recb4(void);
  170. /*! \brief Reads the bit group 'ts_t3_run' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  171. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_run(void);
  172. /*! \brief Reads the bit group 'ts_t3_restmr' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  173. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_restmr(void);
  174. /*! \brief Reads the bit group 'ts_t3_dmab4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  175. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_dmab4(void);
  176. /*! \brief Reads the bit group 'ts_t3_codeb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  177. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_codeb4(void);
  178. /*! \brief Reads the bit group 'ts_t3_sendb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  179. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_sendb4(void);
  180. /*! \brief Reads the bit group 'ts_t3_recb4' of register 'DEBUG_CODE_CODE_CR_TS_ADDR'. */
  181. U8 GH_DEBUG_CODE_get_CODE_CR_TS_ADDR_ts_t3_recb4(void);
  182. /*----------------------------------------------------------------------------*/
  183. /* register DEBUG_CODE_CODE_CR_PC_T0_ADDR (read) */
  184. /*----------------------------------------------------------------------------*/
  185. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_PC_T0_ADDR'. */
  186. U32 GH_DEBUG_CODE_get_CODE_CR_PC_T0_ADDR(void);
  187. /*----------------------------------------------------------------------------*/
  188. /* register DEBUG_CODE_CODE_CR_PC_T1_ADDR (read) */
  189. /*----------------------------------------------------------------------------*/
  190. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_PC_T1_ADDR'. */
  191. U32 GH_DEBUG_CODE_get_CODE_CR_PC_T1_ADDR(void);
  192. /*----------------------------------------------------------------------------*/
  193. /* register DEBUG_CODE_CODE_CR_PC_T2_ADDR (read) */
  194. /*----------------------------------------------------------------------------*/
  195. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_PC_T2_ADDR'. */
  196. U32 GH_DEBUG_CODE_get_CODE_CR_PC_T2_ADDR(void);
  197. /*----------------------------------------------------------------------------*/
  198. /* register DEBUG_CODE_CODE_CR_PC_T3_ADDR (read) */
  199. /*----------------------------------------------------------------------------*/
  200. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_PC_T3_ADDR'. */
  201. U32 GH_DEBUG_CODE_get_CODE_CR_PC_T3_ADDR(void);
  202. /*----------------------------------------------------------------------------*/
  203. /* register DEBUG_CODE_CODE_CR_STALL_ADDR (read) */
  204. /*----------------------------------------------------------------------------*/
  205. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_STALL_ADDR'. */
  206. U32 GH_DEBUG_CODE_get_CODE_CR_STALL_ADDR(void);
  207. /*----------------------------------------------------------------------------*/
  208. /* register DEBUG_CODE_CODE_CR_RF_ADDR (read) */
  209. /*----------------------------------------------------------------------------*/
  210. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_RF_ADDR'. */
  211. U32 GH_DEBUG_CODE_get_CODE_CR_RF_ADDR(void);
  212. /*----------------------------------------------------------------------------*/
  213. /* register DEBUG_CODE_CODE_CR_DC_ADDR (read/write) */
  214. /*----------------------------------------------------------------------------*/
  215. /*! \brief Writes the register 'DEBUG_CODE_CODE_CR_DC_ADDR'. */
  216. void GH_DEBUG_CODE_set_CODE_CR_DC_ADDR(U16 index, U32 data);
  217. /*! \brief Reads the register 'DEBUG_CODE_CODE_CR_DC_ADDR'. */
  218. U32 GH_DEBUG_CODE_get_CODE_CR_DC_ADDR(U16 index);
  219. /*----------------------------------------------------------------------------*/
  220. /* init function */
  221. /*----------------------------------------------------------------------------*/
  222. /*! \brief Initialises the registers and mirror variables. */
  223. void GH_DEBUG_CODE_init(void);
  224. #ifdef SRC_INLINE
  225. #define SRC_INC 1
  226. #include "gh_debug_code.c"
  227. #undef SRC_INC
  228. #endif
  229. #ifdef __cplusplus
  230. }
  231. #endif
  232. #endif /* _GH_DEBUG_CODE_H */
  233. /*----------------------------------------------------------------------------*/
  234. /* end of file */
  235. /*----------------------------------------------------------------------------*/