am_reg_cachectrl.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. //*****************************************************************************
  2. //
  3. // am_reg_cachectrl.h
  4. //! @file
  5. //!
  6. //! @brief Register macros for the CACHECTRL module
  7. //
  8. //*****************************************************************************
  9. //*****************************************************************************
  10. //
  11. // Copyright (c) 2017, Ambiq Micro
  12. // All rights reserved.
  13. //
  14. // Redistribution and use in source and binary forms, with or without
  15. // modification, are permitted provided that the following conditions are met:
  16. //
  17. // 1. Redistributions of source code must retain the above copyright notice,
  18. // this list of conditions and the following disclaimer.
  19. //
  20. // 2. Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the distribution.
  23. //
  24. // 3. Neither the name of the copyright holder nor the names of its
  25. // contributors may be used to endorse or promote products derived from this
  26. // software without specific prior written permission.
  27. //
  28. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  29. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31. // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  32. // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  34. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  35. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  36. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  37. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  38. // POSSIBILITY OF SUCH DAMAGE.
  39. //
  40. // This is part of revision 1.2.11 of the AmbiqSuite Development Package.
  41. //
  42. //*****************************************************************************
  43. #ifndef AM_REG_CACHECTRL_H
  44. #define AM_REG_CACHECTRL_H
  45. //*****************************************************************************
  46. //
  47. // Instance finder. (1 instance(s) available)
  48. //
  49. //*****************************************************************************
  50. #define AM_REG_CACHECTRL_NUM_MODULES 1
  51. #define AM_REG_CACHECTRLn(n) \
  52. (REG_CACHECTRL_BASEADDR + 0x00001000 * n)
  53. //*****************************************************************************
  54. //
  55. // Register offsets.
  56. //
  57. //*****************************************************************************
  58. #define AM_REG_CACHECTRL_CACHECFG_O 0x00000000
  59. #define AM_REG_CACHECTRL_FLASHCFG_O 0x00000004
  60. #define AM_REG_CACHECTRL_CACHECTRL_O 0x00000008
  61. #define AM_REG_CACHECTRL_NCR0START_O 0x00000010
  62. #define AM_REG_CACHECTRL_NCR0END_O 0x00000014
  63. #define AM_REG_CACHECTRL_NCR1START_O 0x00000018
  64. #define AM_REG_CACHECTRL_NCR1END_O 0x0000001C
  65. #define AM_REG_CACHECTRL_CACHEMODE_O 0x00000030
  66. #define AM_REG_CACHECTRL_DMON0_O 0x00000040
  67. #define AM_REG_CACHECTRL_DMON1_O 0x00000044
  68. #define AM_REG_CACHECTRL_DMON2_O 0x00000048
  69. #define AM_REG_CACHECTRL_DMON3_O 0x0000004C
  70. #define AM_REG_CACHECTRL_IMON0_O 0x00000050
  71. #define AM_REG_CACHECTRL_IMON1_O 0x00000054
  72. #define AM_REG_CACHECTRL_IMON2_O 0x00000058
  73. #define AM_REG_CACHECTRL_IMON3_O 0x0000005C
  74. //*****************************************************************************
  75. //
  76. // CACHECTRL_CACHECFG - Flash Cache Control Register
  77. //
  78. //*****************************************************************************
  79. // Enable Cache Monitoring Stats. Only enable this for debug/performance
  80. // analysis since it will consume additional power. See IMON/DMON registers for
  81. // data.
  82. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_MONITOR_S 24
  83. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_MONITOR_M 0x01000000
  84. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_MONITOR(n) (((uint32_t)(n) << 24) & 0x01000000)
  85. // Enable clock gating of entire cache data array subsystem. This should be
  86. // enabled for normal operation.
  87. #define AM_REG_CACHECTRL_CACHECFG_DATA_CLKGATE_S 20
  88. #define AM_REG_CACHECTRL_CACHECFG_DATA_CLKGATE_M 0x00100000
  89. #define AM_REG_CACHECTRL_CACHECFG_DATA_CLKGATE(n) (((uint32_t)(n) << 20) & 0x00100000)
  90. // Unused. Should be left at default value.
  91. #define AM_REG_CACHECTRL_CACHECFG_SMDLY_S 16
  92. #define AM_REG_CACHECTRL_CACHECFG_SMDLY_M 0x000F0000
  93. #define AM_REG_CACHECTRL_CACHECFG_SMDLY(n) (((uint32_t)(n) << 16) & 0x000F0000)
  94. // Unused. Should be left at default value.
  95. #define AM_REG_CACHECTRL_CACHECFG_DLY_S 12
  96. #define AM_REG_CACHECTRL_CACHECFG_DLY_M 0x0000F000
  97. #define AM_REG_CACHECTRL_CACHECFG_DLY(n) (((uint32_t)(n) << 12) & 0x0000F000)
  98. // Enable LS (light sleep) of cache RAMs. This should not be enabled for normal
  99. // operation. When this bit is set, the cache's RAMS will be put into light
  100. // sleep mode while inactive. NOTE: if the cache is actively used, this may
  101. // have an adverse affect on power since entering/exiting LS mode may consume
  102. // more power than would be saved.
  103. #define AM_REG_CACHECTRL_CACHECFG_CACHE_LS_S 11
  104. #define AM_REG_CACHECTRL_CACHECFG_CACHE_LS_M 0x00000800
  105. #define AM_REG_CACHECTRL_CACHECFG_CACHE_LS(n) (((uint32_t)(n) << 11) & 0x00000800)
  106. // Enable clock gating of individual cache RAMs. This bit should be enabled for
  107. // normal operation for lowest power consumption.
  108. #define AM_REG_CACHECTRL_CACHECFG_CACHE_CLKGATE_S 10
  109. #define AM_REG_CACHECTRL_CACHECFG_CACHE_CLKGATE_M 0x00000400
  110. #define AM_REG_CACHECTRL_CACHECFG_CACHE_CLKGATE(n) (((uint32_t)(n) << 10) & 0x00000400)
  111. // Enable Flash Data Caching. When set to 1, all instruction accesses to flash
  112. // will be cached.
  113. #define AM_REG_CACHECTRL_CACHECFG_DCACHE_ENABLE_S 9
  114. #define AM_REG_CACHECTRL_CACHECFG_DCACHE_ENABLE_M 0x00000200
  115. #define AM_REG_CACHECTRL_CACHECFG_DCACHE_ENABLE(n) (((uint32_t)(n) << 9) & 0x00000200)
  116. // Enable Flash Instruction Caching. When set to 1, all instruction accesses to
  117. // flash will be cached.
  118. #define AM_REG_CACHECTRL_CACHECFG_ICACHE_ENABLE_S 8
  119. #define AM_REG_CACHECTRL_CACHECFG_ICACHE_ENABLE_M 0x00000100
  120. #define AM_REG_CACHECTRL_CACHECFG_ICACHE_ENABLE(n) (((uint32_t)(n) << 8) & 0x00000100)
  121. // Bitfield should always be programmed to 0.
  122. #define AM_REG_CACHECTRL_CACHECFG_SERIAL_S 7
  123. #define AM_REG_CACHECTRL_CACHECFG_SERIAL_M 0x00000080
  124. #define AM_REG_CACHECTRL_CACHECFG_SERIAL(n) (((uint32_t)(n) << 7) & 0x00000080)
  125. // Sets the cache configuration. Only a single configuration of 0x5 is valid.
  126. #define AM_REG_CACHECTRL_CACHECFG_CONFIG_S 4
  127. #define AM_REG_CACHECTRL_CACHECFG_CONFIG_M 0x00000070
  128. #define AM_REG_CACHECTRL_CACHECFG_CONFIG(n) (((uint32_t)(n) << 4) & 0x00000070)
  129. #define AM_REG_CACHECTRL_CACHECFG_CONFIG_W2_128B_512E 0x00000050
  130. // Enable Non-cacheable region 1. See the NCR1 registers to set the region
  131. // boundaries and size.
  132. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC1_S 3
  133. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC1_M 0x00000008
  134. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC1(n) (((uint32_t)(n) << 3) & 0x00000008)
  135. // Enable Non-cacheable region 0. See the NCR0 registers to set the region
  136. // boundaries and size.
  137. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC0_S 2
  138. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC0_M 0x00000004
  139. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_NC0(n) (((uint32_t)(n) << 2) & 0x00000004)
  140. // Sets the cache replacement policy. 0=LRR (least recently replaced), 1=LRU
  141. // (least recently used). LRR minimizes writes to the TAG SRAM and is
  142. // recommended.
  143. #define AM_REG_CACHECTRL_CACHECFG_LRU_S 1
  144. #define AM_REG_CACHECTRL_CACHECFG_LRU_M 0x00000002
  145. #define AM_REG_CACHECTRL_CACHECFG_LRU(n) (((uint32_t)(n) << 1) & 0x00000002)
  146. // Enables the main flash cache controller logic and enables power to the cache
  147. // RAMs. Instruction and Data caching need to be enabled independently using
  148. // the ICACHE_ENABLE and DCACHE_ENABLE bits.
  149. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_S 0
  150. #define AM_REG_CACHECTRL_CACHECFG_ENABLE_M 0x00000001
  151. #define AM_REG_CACHECTRL_CACHECFG_ENABLE(n) (((uint32_t)(n) << 0) & 0x00000001)
  152. //*****************************************************************************
  153. //
  154. // CACHECTRL_FLASHCFG - Flash Control Register
  155. //
  156. //*****************************************************************************
  157. // Sets read waitstates for flash accesses (in clock cycles). This should be
  158. // left at the default value for normal flash operation.
  159. #define AM_REG_CACHECTRL_FLASHCFG_RD_WAIT_S 0
  160. #define AM_REG_CACHECTRL_FLASHCFG_RD_WAIT_M 0x00000007
  161. #define AM_REG_CACHECTRL_FLASHCFG_RD_WAIT(n) (((uint32_t)(n) << 0) & 0x00000007)
  162. //*****************************************************************************
  163. //
  164. // CACHECTRL_CACHECTRL - Cache Control
  165. //
  166. //*****************************************************************************
  167. // Enable Flash Sleep Mode. After writing this bit, the flash instance 1 will
  168. // enter a low-power mode until the CPU writes the SLM_DISABLE bit or a flash
  169. // access occurs. Wake from SLM requires ~5us, so this should only be set if
  170. // the flash will not be accessed for reasonably long time.
  171. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_ENABLE_S 10
  172. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_ENABLE_M 0x00000400
  173. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_ENABLE(n) (((uint32_t)(n) << 10) & 0x00000400)
  174. // Disable Flash Sleep Mode. Allows CPU to manually disable SLM mode.
  175. // Performing a flash read will also wake the array.
  176. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_DISABLE_S 9
  177. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_DISABLE_M 0x00000200
  178. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_DISABLE(n) (((uint32_t)(n) << 9) & 0x00000200)
  179. // Flash Sleep Mode Status. When 1, flash instance 1 is asleep.
  180. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_STATUS_S 8
  181. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_STATUS_M 0x00000100
  182. #define AM_REG_CACHECTRL_CACHECTRL_FLASH1_SLM_STATUS(n) (((uint32_t)(n) << 8) & 0x00000100)
  183. // Enable Flash Sleep Mode. After writing this bit, the flash instance 0 will
  184. // enter a low-power mode until the CPU writes the SLM_DISABLE bit or a flash
  185. // access occurs. Wake from SLM requires ~5us, so this should only be set if
  186. // the flash will not be accessed for reasonably long time.
  187. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_ENABLE_S 6
  188. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_ENABLE_M 0x00000040
  189. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_ENABLE(n) (((uint32_t)(n) << 6) & 0x00000040)
  190. // Disable Flash Sleep Mode. Allows CPU to manually disable SLM mode.
  191. // Performing a flash read will also wake the array.
  192. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_DISABLE_S 5
  193. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_DISABLE_M 0x00000020
  194. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_DISABLE(n) (((uint32_t)(n) << 5) & 0x00000020)
  195. // Flash Sleep Mode Status. When 1, flash instance 0 is asleep.
  196. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_STATUS_S 4
  197. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_STATUS_M 0x00000010
  198. #define AM_REG_CACHECTRL_CACHECTRL_FLASH0_SLM_STATUS(n) (((uint32_t)(n) << 4) & 0x00000010)
  199. // Cache Ready Status. A value of 1 indicates the cache is enabled and not
  200. // processing an invalidate operation.
  201. #define AM_REG_CACHECTRL_CACHECTRL_CACHE_READY_S 2
  202. #define AM_REG_CACHECTRL_CACHECTRL_CACHE_READY_M 0x00000004
  203. #define AM_REG_CACHECTRL_CACHECTRL_CACHE_READY(n) (((uint32_t)(n) << 2) & 0x00000004)
  204. // Writing a 1 to this bitfield will reset the cache monitor statistics
  205. // (DMON0-3, IMON0-3). Statistic gathering can be paused/stopped by disabling
  206. // the MONITOR_ENABLE bit in CACHECFG, which will maintain the count values
  207. // until the stats are reset by writing this bitfield.
  208. #define AM_REG_CACHECTRL_CACHECTRL_RESET_STAT_S 1
  209. #define AM_REG_CACHECTRL_CACHECTRL_RESET_STAT_M 0x00000002
  210. #define AM_REG_CACHECTRL_CACHECTRL_RESET_STAT(n) (((uint32_t)(n) << 1) & 0x00000002)
  211. #define AM_REG_CACHECTRL_CACHECTRL_RESET_STAT_CLEAR 0x00000002
  212. // Writing a 1 to this bitfield invalidates the flash cache contents.
  213. #define AM_REG_CACHECTRL_CACHECTRL_INVALIDATE_S 0
  214. #define AM_REG_CACHECTRL_CACHECTRL_INVALIDATE_M 0x00000001
  215. #define AM_REG_CACHECTRL_CACHECTRL_INVALIDATE(n) (((uint32_t)(n) << 0) & 0x00000001)
  216. #define AM_REG_CACHECTRL_CACHECTRL_INVALIDATE_GO 0x00000001
  217. //*****************************************************************************
  218. //
  219. // CACHECTRL_NCR0START - Flash Cache Noncachable Region 0 Start Address.
  220. //
  221. //*****************************************************************************
  222. // Start address for non-cacheable region 0. The physical address of the start
  223. // of this region should be programmed to this register and must be aligned to a
  224. // 16-byte boundary (thus the lower 4 address bits are unused).
  225. #define AM_REG_CACHECTRL_NCR0START_ADDR_S 4
  226. #define AM_REG_CACHECTRL_NCR0START_ADDR_M 0x000FFFF0
  227. #define AM_REG_CACHECTRL_NCR0START_ADDR(n) (((uint32_t)(n) << 4) & 0x000FFFF0)
  228. //*****************************************************************************
  229. //
  230. // CACHECTRL_NCR0END - Flash Cache Noncachable Region 0 End
  231. //
  232. //*****************************************************************************
  233. // End address for non-cacheable region 0. The physical address of the end of
  234. // this region should be programmed to this register and must be aligned to a
  235. // 16-byte boundary (thus the lower 4 address bits are unused).
  236. #define AM_REG_CACHECTRL_NCR0END_ADDR_S 4
  237. #define AM_REG_CACHECTRL_NCR0END_ADDR_M 0x000FFFF0
  238. #define AM_REG_CACHECTRL_NCR0END_ADDR(n) (((uint32_t)(n) << 4) & 0x000FFFF0)
  239. //*****************************************************************************
  240. //
  241. // CACHECTRL_NCR1START - Flash Cache Noncachable Region 1 Start
  242. //
  243. //*****************************************************************************
  244. // Start address for non-cacheable region 1. The physical address of the start
  245. // of this region should be programmed to this register and must be aligned to a
  246. // 16-byte boundary (thus the lower 4 address bits are unused).
  247. #define AM_REG_CACHECTRL_NCR1START_ADDR_S 4
  248. #define AM_REG_CACHECTRL_NCR1START_ADDR_M 0x000FFFF0
  249. #define AM_REG_CACHECTRL_NCR1START_ADDR(n) (((uint32_t)(n) << 4) & 0x000FFFF0)
  250. //*****************************************************************************
  251. //
  252. // CACHECTRL_NCR1END - Flash Cache Noncachable Region 1 End
  253. //
  254. //*****************************************************************************
  255. // End address for non-cacheable region 1. The physical address of the end of
  256. // this region should be programmed to this register and must be aligned to a
  257. // 16-byte boundary (thus the lower 4 address bits are unused).
  258. #define AM_REG_CACHECTRL_NCR1END_ADDR_S 4
  259. #define AM_REG_CACHECTRL_NCR1END_ADDR_M 0x000FFFF0
  260. #define AM_REG_CACHECTRL_NCR1END_ADDR(n) (((uint32_t)(n) << 4) & 0x000FFFF0)
  261. //*****************************************************************************
  262. //
  263. // CACHECTRL_CACHEMODE - Flash Cache Mode Register. Used to trim
  264. // performance/power.
  265. //
  266. //*****************************************************************************
  267. // Disallow Simultaneous Data RAM reads (from 2 line hits on each bus). Value
  268. // should be left at zero for optimal performance.
  269. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE6_S 5
  270. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE6_M 0x00000020
  271. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE6(n) (((uint32_t)(n) << 5) & 0x00000020)
  272. // Disallow Data RAM reads (from line hits) during lookup read ops. Value
  273. // should be left at zero for optimal performance.
  274. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE5_S 4
  275. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE5_M 0x00000010
  276. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE5(n) (((uint32_t)(n) << 4) & 0x00000010)
  277. // Disallow Data RAM reads (from line hits) on tag RAM fill cycles. Value should
  278. // be left at zero for optimal performance.
  279. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE4_S 3
  280. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE4_M 0x00000008
  281. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE4(n) (((uint32_t)(n) << 3) & 0x00000008)
  282. // Disallow cache data RAM writes on data RAM read cycles. Value should be left
  283. // at zero for optimal performance.
  284. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE3_S 2
  285. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE3_M 0x00000004
  286. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE3(n) (((uint32_t)(n) << 2) & 0x00000004)
  287. // Disallow cache data RAM writes on tag RAM read cycles. Value should be left
  288. // at zero for optimal performance.
  289. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE2_S 1
  290. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE2_M 0x00000002
  291. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE2(n) (((uint32_t)(n) << 1) & 0x00000002)
  292. // Disallow cache data RAM writes on tag RAM fill cycles. Value should be left
  293. // at zero for optimal performance.
  294. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE1_S 0
  295. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE1_M 0x00000001
  296. #define AM_REG_CACHECTRL_CACHEMODE_THROTTLE1(n) (((uint32_t)(n) << 0) & 0x00000001)
  297. //*****************************************************************************
  298. //
  299. // CACHECTRL_DMON0 - Data Cache Total Accesses
  300. //
  301. //*****************************************************************************
  302. // Total accesses to data cache
  303. #define AM_REG_CACHECTRL_DMON0_DACCESS_COUNT_S 0
  304. #define AM_REG_CACHECTRL_DMON0_DACCESS_COUNT_M 0xFFFFFFFF
  305. #define AM_REG_CACHECTRL_DMON0_DACCESS_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  306. //*****************************************************************************
  307. //
  308. // CACHECTRL_DMON1 - Data Cache Tag Lookups
  309. //
  310. //*****************************************************************************
  311. // Total tag lookups from data cache
  312. #define AM_REG_CACHECTRL_DMON1_DLOOKUP_COUNT_S 0
  313. #define AM_REG_CACHECTRL_DMON1_DLOOKUP_COUNT_M 0xFFFFFFFF
  314. #define AM_REG_CACHECTRL_DMON1_DLOOKUP_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  315. //*****************************************************************************
  316. //
  317. // CACHECTRL_DMON2 - Data Cache Hits
  318. //
  319. //*****************************************************************************
  320. // Cache hits from lookup operations
  321. #define AM_REG_CACHECTRL_DMON2_DHIT_COUNT_S 0
  322. #define AM_REG_CACHECTRL_DMON2_DHIT_COUNT_M 0xFFFFFFFF
  323. #define AM_REG_CACHECTRL_DMON2_DHIT_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  324. //*****************************************************************************
  325. //
  326. // CACHECTRL_DMON3 - Data Cache Line Hits
  327. //
  328. //*****************************************************************************
  329. // Cache hits from line cache
  330. #define AM_REG_CACHECTRL_DMON3_DLINE_COUNT_S 0
  331. #define AM_REG_CACHECTRL_DMON3_DLINE_COUNT_M 0xFFFFFFFF
  332. #define AM_REG_CACHECTRL_DMON3_DLINE_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  333. //*****************************************************************************
  334. //
  335. // CACHECTRL_IMON0 - Instruction Cache Total Accesses
  336. //
  337. //*****************************************************************************
  338. // Total accesses to Instruction cache
  339. #define AM_REG_CACHECTRL_IMON0_IACCESS_COUNT_S 0
  340. #define AM_REG_CACHECTRL_IMON0_IACCESS_COUNT_M 0xFFFFFFFF
  341. #define AM_REG_CACHECTRL_IMON0_IACCESS_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  342. //*****************************************************************************
  343. //
  344. // CACHECTRL_IMON1 - Instruction Cache Tag Lookups
  345. //
  346. //*****************************************************************************
  347. // Total tag lookups from Instruction cache
  348. #define AM_REG_CACHECTRL_IMON1_ILOOKUP_COUNT_S 0
  349. #define AM_REG_CACHECTRL_IMON1_ILOOKUP_COUNT_M 0xFFFFFFFF
  350. #define AM_REG_CACHECTRL_IMON1_ILOOKUP_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  351. //*****************************************************************************
  352. //
  353. // CACHECTRL_IMON2 - Instruction Cache Hits
  354. //
  355. //*****************************************************************************
  356. // Cache hits from lookup operations
  357. #define AM_REG_CACHECTRL_IMON2_IHIT_COUNT_S 0
  358. #define AM_REG_CACHECTRL_IMON2_IHIT_COUNT_M 0xFFFFFFFF
  359. #define AM_REG_CACHECTRL_IMON2_IHIT_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  360. //*****************************************************************************
  361. //
  362. // CACHECTRL_IMON3 - Instruction Cache Line Hits
  363. //
  364. //*****************************************************************************
  365. // Cache hits from line cache
  366. #define AM_REG_CACHECTRL_IMON3_ILINE_COUNT_S 0
  367. #define AM_REG_CACHECTRL_IMON3_ILINE_COUNT_M 0xFFFFFFFF
  368. #define AM_REG_CACHECTRL_IMON3_ILINE_COUNT(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
  369. #endif // AM_REG_CACHECTRL_H