corr.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 _CORR_H_
  13. #define _CORR_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_CORR_BASE (0x19000800)
  17. typedef volatile struct
  18. {
  19. uint32_t corr_para; // 0x00000000
  20. uint32_t corr_start; // 0x00000004
  21. uint32_t corr_out; // 0x00000008
  22. uint32_t corr_max; // 0x0000000c
  23. uint32_t corr_sum; // 0x00000010
  24. uint32_t corr_int_en; // 0x00000014
  25. uint32_t int_flag; // 0x00000018
  26. } HWP_CORR_T;
  27. #define hwp_corr ((HWP_CORR_T *)REG_ACCESS_ADDRESS(REG_CORR_BASE))
  28. // corr_para
  29. typedef union {
  30. uint32_t v;
  31. struct
  32. {
  33. uint32_t corr_idnum : 4; // [3:0]
  34. uint32_t corr_reclen : 12; // [15:4]
  35. uint32_t corr_loclen : 9; // [24:16]
  36. uint32_t __31_25 : 7; // [31:25]
  37. } b;
  38. } REG_CORR_CORR_PARA_T;
  39. // corr_start
  40. typedef union {
  41. uint32_t v;
  42. struct
  43. {
  44. uint32_t corr_start : 1; // [0]
  45. uint32_t __31_1 : 31; // [31:1]
  46. } b;
  47. } REG_CORR_CORR_START_T;
  48. // corr_out
  49. typedef union {
  50. uint32_t v;
  51. struct
  52. {
  53. uint32_t corr_id : 4; // [3:0], read only
  54. uint32_t corr_pos : 12; // [15:4], read only
  55. uint32_t corr_pp : 1; // [16], read only
  56. uint32_t __31_17 : 15; // [31:17]
  57. } b;
  58. } REG_CORR_CORR_OUT_T;
  59. // corr_max
  60. typedef union {
  61. uint32_t v;
  62. struct
  63. {
  64. uint32_t corr_max : 24; // [23:0], read only
  65. uint32_t __31_24 : 8; // [31:24]
  66. } b;
  67. } REG_CORR_CORR_MAX_T;
  68. // corr_int_en
  69. typedef union {
  70. uint32_t v;
  71. struct
  72. {
  73. uint32_t corr_int_en : 1; // [0]
  74. uint32_t __31_1 : 31; // [31:1]
  75. } b;
  76. } REG_CORR_CORR_INT_EN_T;
  77. // int_flag
  78. typedef union {
  79. uint32_t v;
  80. struct
  81. {
  82. uint32_t int_flag : 1; // [0], write clear
  83. uint32_t __31_1 : 31; // [31:1]
  84. } b;
  85. } REG_CORR_INT_FLAG_T;
  86. // corr_para
  87. #define CORR_CORR_IDNUM(n) (((n)&0xf) << 0)
  88. #define CORR_CORR_RECLEN(n) (((n)&0xfff) << 4)
  89. #define CORR_CORR_LOCLEN(n) (((n)&0x1ff) << 16)
  90. // corr_start
  91. #define CORR_CORR_START (1 << 0)
  92. // corr_out
  93. #define CORR_CORR_ID(n) (((n)&0xf) << 0)
  94. #define CORR_CORR_POS(n) (((n)&0xfff) << 4)
  95. #define CORR_CORR_PP (1 << 16)
  96. // corr_max
  97. #define CORR_CORR_MAX(n) (((n)&0xffffff) << 0)
  98. // corr_int_en
  99. #define CORR_CORR_INT_EN (1 << 0)
  100. // int_flag
  101. #define CORR_INT_FLAG (1 << 0)
  102. #endif // _CORR_H_