pusch.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _PUSCH_H_
  13. #define _PUSCH_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PUSCH_BASE (0x18800000)
  17. typedef volatile struct
  18. {
  19. uint32_t ack_offset; // 0x00000000
  20. uint32_t ri_offset; // 0x00000004
  21. uint32_t cqi_offset; // 0x00000008
  22. uint32_t tbsize_init; // 0x0000000c
  23. uint32_t tbsize; // 0x00000010
  24. uint32_t modulate; // 0x00000014
  25. uint32_t redun_ver; // 0x00000018
  26. uint32_t lcrb; // 0x0000001c
  27. uint32_t symbol_num; // 0x00000020
  28. uint32_t cqi_bit1; // 0x00000024
  29. uint32_t cqi_bit2; // 0x00000028
  30. uint32_t cqi_bit8_bitlen; // 0x0000002c
  31. uint32_t ri_bit_bitlen; // 0x00000030
  32. uint32_t ack_bit_bitlen; // 0x00000034
  33. uint32_t ack_mux_bundling; // 0x00000038
  34. uint32_t pucch_format; // 0x0000003c
  35. uint32_t prach_u; // 0x00000040
  36. uint32_t prach_cv; // 0x00000044
  37. uint32_t gold_init; // 0x00000048
  38. uint32_t pusch_ctrl; // 0x0000004c
  39. uint32_t pusch_irq_flag; // 0x00000050
  40. uint32_t pucch_res; // 0x00000054
  41. uint32_t __88[16362]; // 0x00000058
  42. uint32_t mem1; // 0x00010000
  43. uint32_t __65540[4095]; // 0x00010004
  44. uint32_t mem2; // 0x00014000
  45. uint32_t __81924[4095]; // 0x00014004
  46. uint32_t mem3; // 0x00018000
  47. uint32_t __98308[8191]; // 0x00018004
  48. uint32_t pusch_buf1; // 0x00020000
  49. uint32_t __131076[4095]; // 0x00020004
  50. uint32_t pusch_buf2; // 0x00024000
  51. uint32_t __147460[4095]; // 0x00024004
  52. uint32_t pusch_buf3; // 0x00028000
  53. uint32_t __163844[8191]; // 0x00028004
  54. uint32_t prach_buf; // 0x00030000
  55. } HWP_PUSCH_T;
  56. #define hwp_pusch ((HWP_PUSCH_T *)REG_ACCESS_ADDRESS(REG_PUSCH_BASE))
  57. // ack_offset
  58. typedef union {
  59. uint32_t v;
  60. struct
  61. {
  62. uint32_t ack_offset : 4; // [3:0]
  63. uint32_t __31_4 : 28; // [31:4]
  64. } b;
  65. } REG_PUSCH_ACK_OFFSET_T;
  66. // ri_offset
  67. typedef union {
  68. uint32_t v;
  69. struct
  70. {
  71. uint32_t ri_offset : 4; // [3:0]
  72. uint32_t __31_4 : 28; // [31:4]
  73. } b;
  74. } REG_PUSCH_RI_OFFSET_T;
  75. // cqi_offset
  76. typedef union {
  77. uint32_t v;
  78. struct
  79. {
  80. uint32_t cqi_offset : 4; // [3:0]
  81. uint32_t __31_4 : 28; // [31:4]
  82. } b;
  83. } REG_PUSCH_CQI_OFFSET_T;
  84. // tbsize_init
  85. typedef union {
  86. uint32_t v;
  87. struct
  88. {
  89. uint32_t tbsize_init : 14; // [13:0]
  90. uint32_t __31_14 : 18; // [31:14]
  91. } b;
  92. } REG_PUSCH_TBSIZE_INIT_T;
  93. // tbsize
  94. typedef union {
  95. uint32_t v;
  96. struct
  97. {
  98. uint32_t tbsize : 14; // [13:0]
  99. uint32_t __31_14 : 18; // [31:14]
  100. } b;
  101. } REG_PUSCH_TBSIZE_T;
  102. // modulate
  103. typedef union {
  104. uint32_t v;
  105. struct
  106. {
  107. uint32_t modulate : 2; // [1:0]
  108. uint32_t __31_2 : 30; // [31:2]
  109. } b;
  110. } REG_PUSCH_MODULATE_T;
  111. // redun_ver
  112. typedef union {
  113. uint32_t v;
  114. struct
  115. {
  116. uint32_t redun_ver : 2; // [1:0]
  117. uint32_t __31_2 : 30; // [31:2]
  118. } b;
  119. } REG_PUSCH_REDUN_VER_T;
  120. // lcrb
  121. typedef union {
  122. uint32_t v;
  123. struct
  124. {
  125. uint32_t sub_num : 11; // [10:0]
  126. uint32_t __15_11 : 5; // [15:11]
  127. uint32_t ini_sub_num : 11; // [26:16]
  128. uint32_t __31_27 : 5; // [31:27]
  129. } b;
  130. } REG_PUSCH_LCRB_T;
  131. // symbol_num
  132. typedef union {
  133. uint32_t v;
  134. struct
  135. {
  136. uint32_t sym_num : 4; // [3:0]
  137. uint32_t ini_sym_num : 4; // [7:4]
  138. uint32_t ru_num : 4; // [11:8]
  139. uint32_t __31_12 : 20; // [31:12]
  140. } b;
  141. } REG_PUSCH_SYMBOL_NUM_T;
  142. // cqi_bit8_bitlen
  143. typedef union {
  144. uint32_t v;
  145. struct
  146. {
  147. uint32_t cqi_bit8 : 1; // [0]
  148. uint32_t __7_1 : 7; // [7:1]
  149. uint32_t o_cqi_bitlen : 7; // [14:8]
  150. uint32_t __15_15 : 1; // [15]
  151. uint32_t o_cqi_bitlen_min : 7; // [22:16]
  152. uint32_t __31_23 : 9; // [31:23]
  153. } b;
  154. } REG_PUSCH_CQI_BIT8_BITLEN_T;
  155. // ri_bit_bitlen
  156. typedef union {
  157. uint32_t v;
  158. struct
  159. {
  160. uint32_t ri_bit : 1; // [0]
  161. uint32_t __15_1 : 15; // [15:1]
  162. uint32_t o_ri_bitlen : 1; // [16]
  163. uint32_t __31_17 : 15; // [31:17]
  164. } b;
  165. } REG_PUSCH_RI_BIT_BITLEN_T;
  166. // ack_bit_bitlen
  167. typedef union {
  168. uint32_t v;
  169. struct
  170. {
  171. uint32_t ack_bit : 4; // [3:0]
  172. uint32_t __23_4 : 20; // [23:4]
  173. uint32_t o_ack_bitlen : 3; // [26:24]
  174. uint32_t __31_27 : 5; // [31:27]
  175. } b;
  176. } REG_PUSCH_ACK_BIT_BITLEN_T;
  177. // ack_mux_bundling
  178. typedef union {
  179. uint32_t v;
  180. struct
  181. {
  182. uint32_t bundling_idx : 2; // [1:0]
  183. uint32_t bundling_flag : 1; // [2]
  184. uint32_t __31_3 : 29; // [31:3]
  185. } b;
  186. } REG_PUSCH_ACK_MUX_BUNDLING_T;
  187. // pucch_format
  188. typedef union {
  189. uint32_t v;
  190. struct
  191. {
  192. uint32_t format : 3; // [2:0]
  193. uint32_t __31_3 : 29; // [31:3]
  194. } b;
  195. } REG_PUSCH_PUCCH_FORMAT_T;
  196. // prach_u
  197. typedef union {
  198. uint32_t v;
  199. struct
  200. {
  201. uint32_t u_value : 10; // [9:0]
  202. uint32_t __15_10 : 6; // [15:10]
  203. uint32_t u_inv_value : 10; // [25:16]
  204. uint32_t __31_26 : 6; // [31:26]
  205. } b;
  206. } REG_PUSCH_PRACH_U_T;
  207. // prach_cv
  208. typedef union {
  209. uint32_t v;
  210. struct
  211. {
  212. uint32_t cv_value : 10; // [9:0]
  213. uint32_t __31_10 : 22; // [31:10]
  214. } b;
  215. } REG_PUSCH_PRACH_CV_T;
  216. // gold_init
  217. typedef union {
  218. uint32_t v;
  219. struct
  220. {
  221. uint32_t gold_init : 31; // [30:0]
  222. uint32_t __31_31 : 1; // [31]
  223. } b;
  224. } REG_PUSCH_GOLD_INIT_T;
  225. // pusch_ctrl
  226. typedef union {
  227. uint32_t v;
  228. struct
  229. {
  230. uint32_t fun_en : 1; // [0]
  231. uint32_t crc_en : 1; // [1]
  232. uint32_t tb_rm_en : 1; // [2]
  233. uint32_t int_en : 1; // [3]
  234. uint32_t scr_en : 1; // [4]
  235. uint32_t pusch_irqen : 1; // [5]
  236. uint32_t __6_6 : 1; // [6]
  237. uint32_t inver_en : 1; // [7]
  238. uint32_t __8_8 : 1; // [8]
  239. uint32_t zc_index : 1; // [9]
  240. uint32_t __10_10 : 1; // [10]
  241. uint32_t pusch_buf_en : 1; // [11]
  242. uint32_t buf_index : 2; // [13:12]
  243. uint32_t uci_en : 1; // [14]
  244. uint32_t func_sel : 2; // [16:15]
  245. uint32_t pusch2dft_trig_en : 1; // [17]
  246. uint32_t __31_18 : 14; // [31:18]
  247. } b;
  248. } REG_PUSCH_PUSCH_CTRL_T;
  249. // pusch_irq_flag
  250. typedef union {
  251. uint32_t v;
  252. struct
  253. {
  254. uint32_t irq_flag : 1; // [0], write clear
  255. uint32_t __31_1 : 31; // [31:1]
  256. } b;
  257. } REG_PUSCH_PUSCH_IRQ_FLAG_T;
  258. // pucch_res
  259. typedef union {
  260. uint32_t v;
  261. struct
  262. {
  263. uint32_t res_uci : 22; // [21:0], read only
  264. uint32_t __31_22 : 10; // [31:22]
  265. } b;
  266. } REG_PUSCH_PUCCH_RES_T;
  267. // ack_offset
  268. #define PUSCH_ACK_OFFSET(n) (((n)&0xf) << 0)
  269. // ri_offset
  270. #define PUSCH_RI_OFFSET(n) (((n)&0xf) << 0)
  271. // cqi_offset
  272. #define PUSCH_CQI_OFFSET(n) (((n)&0xf) << 0)
  273. // tbsize_init
  274. #define PUSCH_TBSIZE_INIT(n) (((n)&0x3fff) << 0)
  275. // tbsize
  276. #define PUSCH_TBSIZE(n) (((n)&0x3fff) << 0)
  277. // modulate
  278. #define PUSCH_MODULATE(n) (((n)&0x3) << 0)
  279. // redun_ver
  280. #define PUSCH_REDUN_VER(n) (((n)&0x3) << 0)
  281. // lcrb
  282. #define PUSCH_SUB_NUM(n) (((n)&0x7ff) << 0)
  283. #define PUSCH_INI_SUB_NUM(n) (((n)&0x7ff) << 16)
  284. // symbol_num
  285. #define PUSCH_SYM_NUM(n) (((n)&0xf) << 0)
  286. #define PUSCH_INI_SYM_NUM(n) (((n)&0xf) << 4)
  287. #define PUSCH_RU_NUM(n) (((n)&0xf) << 8)
  288. // cqi_bit8_bitlen
  289. #define PUSCH_CQI_BIT8 (1 << 0)
  290. #define PUSCH_O_CQI_BITLEN(n) (((n)&0x7f) << 8)
  291. #define PUSCH_O_CQI_BITLEN_MIN(n) (((n)&0x7f) << 16)
  292. // ri_bit_bitlen
  293. #define PUSCH_RI_BIT (1 << 0)
  294. #define PUSCH_O_RI_BITLEN (1 << 16)
  295. // ack_bit_bitlen
  296. #define PUSCH_ACK_BIT(n) (((n)&0xf) << 0)
  297. #define PUSCH_O_ACK_BITLEN(n) (((n)&0x7) << 24)
  298. // ack_mux_bundling
  299. #define PUSCH_BUNDLING_IDX(n) (((n)&0x3) << 0)
  300. #define PUSCH_BUNDLING_FLAG (1 << 2)
  301. // pucch_format
  302. #define PUSCH_FORMAT(n) (((n)&0x7) << 0)
  303. // prach_u
  304. #define PUSCH_U_VALUE(n) (((n)&0x3ff) << 0)
  305. #define PUSCH_U_INV_VALUE(n) (((n)&0x3ff) << 16)
  306. // prach_cv
  307. #define PUSCH_CV_VALUE(n) (((n)&0x3ff) << 0)
  308. // gold_init
  309. #define PUSCH_GOLD_INIT(n) (((n)&0x7fffffff) << 0)
  310. // pusch_ctrl
  311. #define PUSCH_FUN_EN (1 << 0)
  312. #define PUSCH_CRC_EN (1 << 1)
  313. #define PUSCH_TB_RM_EN (1 << 2)
  314. #define PUSCH_INT_EN (1 << 3)
  315. #define PUSCH_SCR_EN (1 << 4)
  316. #define PUSCH_PUSCH_IRQEN (1 << 5)
  317. #define PUSCH_INVER_EN (1 << 7)
  318. #define PUSCH_ZC_INDEX (1 << 9)
  319. #define PUSCH_PUSCH_BUF_EN (1 << 11)
  320. #define PUSCH_BUF_INDEX(n) (((n)&0x3) << 12)
  321. #define PUSCH_UCI_EN (1 << 14)
  322. #define PUSCH_FUNC_SEL(n) (((n)&0x3) << 15)
  323. #define PUSCH_PUSCH2DFT_TRIG_EN (1 << 17)
  324. // pusch_irq_flag
  325. #define PUSCH_IRQ_FLAG (1 << 0)
  326. // pucch_res
  327. #define PUSCH_RES_UCI(n) (((n)&0x3fffff) << 0)
  328. #endif // _PUSCH_H_