vha_errors.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*!
  2. *****************************************************************************
  3. *
  4. * @File vha_errors.h
  5. * ---------------------------------------------------------------------------
  6. *
  7. * Copyright (c) Imagination Technologies Ltd.
  8. *
  9. * The contents of this file are subject to the MIT license as set out below.
  10. *
  11. * Permission is hereby granted, free of charge, to any person obtaining a
  12. * copy of this software and associated documentation files (the "Software"),
  13. * to deal in the Software without restriction, including without limitation
  14. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  15. * and/or sell copies of the Software, and to permit persons to whom the
  16. * Software is furnished to do so, subject to the following conditions:
  17. *
  18. * The above copyright notice and this permission notice shall be included in
  19. * all copies or substantial portions of the Software.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  27. * THE SOFTWARE.
  28. *
  29. * Alternatively, the contents of this file may be used under the terms of the
  30. * GNU General Public License Version 2 ("GPL")in which case the provisions of
  31. * GPL are applicable instead of those above.
  32. *
  33. * If you wish to allow use of your version of this file only under the terms
  34. * of GPL, and not to allow others to use your version of this file under the
  35. * terms of the MIT license, indicate your decision by deleting the provisions
  36. * above and replace them with the notice and other provisions required by GPL
  37. * as set out in the file called "GPLHEADER" included in this distribution. If
  38. * you do not delete the provisions above, a recipient may use your version of
  39. * this file under the terms of either the MIT license or GPL.
  40. *
  41. * This License is also included in this distribution in the file called
  42. * "MIT_COPYING".
  43. *
  44. *****************************************************************************/
  45. #ifndef _VHA_ERRORS_H
  46. #define _VHA_ERRORS_H
  47. #if defined(__cplusplus)
  48. extern "C" {
  49. #endif
  50. enum {
  51. /* System errors */
  52. VHA_RSP_ERROR_HW_SYS_AXI_ERROR_SHF = 0,
  53. VHA_RSP_ERROR_HW_SYS_MMU_PAGE_FAULT_SHF,
  54. VHA_RSP_ERROR_HW_SYS_SYS_MEM_WDT_SHF,
  55. VHA_RSP_ERROR_HW_SYS_AXI_MEMORY_PARITY_ERROR_SHF,
  56. VHA_RSP_ERROR_HW_SYS_MMU_PARITY_ERROR_SHF,
  57. VHA_RSP_ERROR_HW_SYS_RAM_CORRECTION_SHF,
  58. VHA_RSP_ERROR_HW_SYS_RAM_DETECTION_SHF,
  59. VHA_RSP_ERROR_HW_SYS_LSYNC_INV_REQ_SHF,
  60. VHA_RSP_ERROR_HW_SYS_LOGIC_ERROR_SHF,
  61. VHA_RSP_ERROR_SW_SYS_EVNT_PARITY_ERROR_SHF,
  62. VHA_RSP_ERROR_SW_WDT_EXPIRED_SHF,
  63. /* WM event errors */
  64. VHA_RSP_ERROR_HW_EVNT_WM_WL_WDT_SHF,
  65. VHA_RSP_ERROR_HW_EVNT_WM_WL_IDLE_WDT_SHF,
  66. VHA_RSP_ERROR_HW_EVNT_WM_SOCIF_WDT_SHF,
  67. VHA_RSP_ERROR_HW_EVNT_LOGIC_FAULT_SHF,
  68. VHA_RSP_ERROR_SW_EVNT_WM_PARITY_ERROR_SHF,
  69. /* WM response FIFO errors */
  70. VHA_RSP_ERROR_HW_CORE_IRQ_BEFORE_KICK_SHF,
  71. VHA_RSP_ERROR_HW_INDIRECT_MASK_SET_ERROR_SHF,
  72. VHA_RSP_ERROR_HW_KICK_CORE_ACCESS_ERROR_SHF,
  73. VHA_RSP_ERROR_HW_CNN_CONTROL_START_HIGH_SHF,
  74. VHA_RSP_ERROR_HW_CNN_STATUS_ERROR_SHF,
  75. VHA_RSP_ERROR_HW_INT_CORE_ACCESS_ERROR_SHF,
  76. VHA_RSP_ERROR_HW_CORE_EVENT_ERROR_SHF,
  77. VHA_RSP_ERROR_HW_CORE_EVENT_NOT_CLEARED_SHF,
  78. VHA_RSP_ERROR_HW_CORE_EVENT_IRQ_HIGH_SHF,
  79. VHA_RSP_ERROR_HW_INTERCONNECT_ERROR_SHF,
  80. VHA_RSP_ERROR_SW_WM_PARITY_ERROR_SHF,
  81. VHA_RSP_ERROR_SW_WL_ID_MISMATCH_ERROR_SHF,
  82. VHA_RSP_ERROR_SW_CONF_ERROR_SHF,
  83. VHA_RSP_ERROR_SW_CRC_MISMATCH_ERROR_SHF,
  84. /* CNN core status errors. */
  85. VHA_RSP_ERROR_HW_CORE_LOGIC_ERROR_SHF,
  86. VHA_RSP_ERROR_HW_RAM_CORRECTION_SHF,
  87. VHA_RSP_ERROR_HW_RAM_DETECTION_SHF,
  88. VHA_RSP_ERROR_HW_CORE_SYNC_ERROR_SHF,
  89. VHA_RSP_ERROR_HW_CORE_WDT_SHF,
  90. VHA_RSP_ERROR_HW_CORE_MEM_WDT_SHF,
  91. VHA_RSP_ERROR_HW_CORE_CNN_ERROR_SHF,
  92. /* Interconnect status errors. */
  93. VHA_RSP_ERROR_HW_LOCKSTEP_ERROR_SHF,
  94. VHA_RSP_ERROR_HW_IC_LOGIC_ERROR_SHF,
  95. VHA_RSP_ERROR_HW_SOCIF_READ_MISMATCH_SHF,
  96. VHA_RSP_ERROR_HW_SOCIF_READ_UNRESPONSIVE_SHF,
  97. VHA_RSP_ERROR_SW_IC_PARITY_ERROR_SHF,
  98. /* Workload submit errors. */
  99. VHA_RSP_ERROR_SW_SKIP_CMD_SHF,
  100. VHA_RSP_ERROR_SW_KICK_BIT_READ_BACK_FAILURE_SHF,
  101. VHA_RSP_ERROR_SW_HW_BUSY_SHF,
  102. VHA_RSP_ERROR_SW_INVALID_CMD_INFO_SHF,
  103. VHA_RSP_ERROR_SW_INVALID_CMD_TYPE_SHF,
  104. VHA_RSP_ERROR_SW_MMU_SETUP_FAILURE_SHF
  105. };
  106. #define VHA_RSP_ERROR(err) (1ull << (VHA_RSP_ERROR_##err##_SHF))
  107. #if defined(__cplusplus)
  108. }
  109. #endif
  110. #endif /* _VHA_ERRORS_H */