ce_stat_desc.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _CE_STAT_DESC_H_
  19. #define _CE_STAT_DESC_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #define NUM_OF_DWORDS_CE_STAT_DESC 4
  23. struct ce_stat_desc {
  24. uint32_t ce_res_5 : 8,
  25. toeplitz_en : 1,
  26. src_swap : 1,
  27. dest_swap : 1,
  28. gather : 1,
  29. ce_res_6 : 4,
  30. length : 16;
  31. uint32_t toeplitz_hash_0 : 32;
  32. uint32_t toeplitz_hash_1 : 32;
  33. uint32_t fw_metadata : 16,
  34. ce_res_7 : 4,
  35. ring_id : 8,
  36. looping_count : 4;
  37. };
  38. #define CE_STAT_DESC_CE_RES_5_OFFSET 0x00000000
  39. #define CE_STAT_DESC_CE_RES_5_LSB 0
  40. #define CE_STAT_DESC_CE_RES_5_MSB 7
  41. #define CE_STAT_DESC_CE_RES_5_MASK 0x000000ff
  42. #define CE_STAT_DESC_TOEPLITZ_EN_OFFSET 0x00000000
  43. #define CE_STAT_DESC_TOEPLITZ_EN_LSB 8
  44. #define CE_STAT_DESC_TOEPLITZ_EN_MSB 8
  45. #define CE_STAT_DESC_TOEPLITZ_EN_MASK 0x00000100
  46. #define CE_STAT_DESC_SRC_SWAP_OFFSET 0x00000000
  47. #define CE_STAT_DESC_SRC_SWAP_LSB 9
  48. #define CE_STAT_DESC_SRC_SWAP_MSB 9
  49. #define CE_STAT_DESC_SRC_SWAP_MASK 0x00000200
  50. #define CE_STAT_DESC_DEST_SWAP_OFFSET 0x00000000
  51. #define CE_STAT_DESC_DEST_SWAP_LSB 10
  52. #define CE_STAT_DESC_DEST_SWAP_MSB 10
  53. #define CE_STAT_DESC_DEST_SWAP_MASK 0x00000400
  54. #define CE_STAT_DESC_GATHER_OFFSET 0x00000000
  55. #define CE_STAT_DESC_GATHER_LSB 11
  56. #define CE_STAT_DESC_GATHER_MSB 11
  57. #define CE_STAT_DESC_GATHER_MASK 0x00000800
  58. #define CE_STAT_DESC_CE_RES_6_OFFSET 0x00000000
  59. #define CE_STAT_DESC_CE_RES_6_LSB 12
  60. #define CE_STAT_DESC_CE_RES_6_MSB 15
  61. #define CE_STAT_DESC_CE_RES_6_MASK 0x0000f000
  62. #define CE_STAT_DESC_LENGTH_OFFSET 0x00000000
  63. #define CE_STAT_DESC_LENGTH_LSB 16
  64. #define CE_STAT_DESC_LENGTH_MSB 31
  65. #define CE_STAT_DESC_LENGTH_MASK 0xffff0000
  66. #define CE_STAT_DESC_TOEPLITZ_HASH_0_OFFSET 0x00000004
  67. #define CE_STAT_DESC_TOEPLITZ_HASH_0_LSB 0
  68. #define CE_STAT_DESC_TOEPLITZ_HASH_0_MSB 31
  69. #define CE_STAT_DESC_TOEPLITZ_HASH_0_MASK 0xffffffff
  70. #define CE_STAT_DESC_TOEPLITZ_HASH_1_OFFSET 0x00000008
  71. #define CE_STAT_DESC_TOEPLITZ_HASH_1_LSB 0
  72. #define CE_STAT_DESC_TOEPLITZ_HASH_1_MSB 31
  73. #define CE_STAT_DESC_TOEPLITZ_HASH_1_MASK 0xffffffff
  74. #define CE_STAT_DESC_FW_METADATA_OFFSET 0x0000000c
  75. #define CE_STAT_DESC_FW_METADATA_LSB 0
  76. #define CE_STAT_DESC_FW_METADATA_MSB 15
  77. #define CE_STAT_DESC_FW_METADATA_MASK 0x0000ffff
  78. #define CE_STAT_DESC_CE_RES_7_OFFSET 0x0000000c
  79. #define CE_STAT_DESC_CE_RES_7_LSB 16
  80. #define CE_STAT_DESC_CE_RES_7_MSB 19
  81. #define CE_STAT_DESC_CE_RES_7_MASK 0x000f0000
  82. #define CE_STAT_DESC_RING_ID_OFFSET 0x0000000c
  83. #define CE_STAT_DESC_RING_ID_LSB 20
  84. #define CE_STAT_DESC_RING_ID_MSB 27
  85. #define CE_STAT_DESC_RING_ID_MASK 0x0ff00000
  86. #define CE_STAT_DESC_LOOPING_COUNT_OFFSET 0x0000000c
  87. #define CE_STAT_DESC_LOOPING_COUNT_LSB 28
  88. #define CE_STAT_DESC_LOOPING_COUNT_MSB 31
  89. #define CE_STAT_DESC_LOOPING_COUNT_MASK 0xf0000000
  90. #endif