IxNpeDlNpeMgrEcRegisters_p.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. /**
  2. * @file IxNpeDlNpeMgrEcRegisters_p.h
  3. *
  4. * @author Intel Corporation
  5. * @date 14 December 2001
  6. *
  7. * @par
  8. * IXP400 SW Release version 2.0
  9. *
  10. * -- Copyright Notice --
  11. *
  12. * @par
  13. * Copyright 2001-2005, Intel Corporation.
  14. * All rights reserved.
  15. *
  16. * @par
  17. * Redistribution and use in source and binary forms, with or without
  18. * modification, are permitted provided that the following conditions
  19. * are met:
  20. * 1. Redistributions of source code must retain the above copyright
  21. * notice, this list of conditions and the following disclaimer.
  22. * 2. Redistributions in binary form must reproduce the above copyright
  23. * notice, this list of conditions and the following disclaimer in the
  24. * documentation and/or other materials provided with the distribution.
  25. * 3. Neither the name of the Intel Corporation nor the names of its contributors
  26. * may be used to endorse or promote products derived from this software
  27. * without specific prior written permission.
  28. *
  29. * @par
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
  31. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  32. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  33. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  34. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  38. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  39. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  40. * SUCH DAMAGE.
  41. *
  42. * @par
  43. * -- End of Copyright Notice --
  44. */
  45. #ifndef IXNPEDLNPEMGRECREGISTERS_P_H
  46. #define IXNPEDLNPEMGRECREGISTERS_P_H
  47. #include "IxOsal.h"
  48. /*
  49. * Base Memory Addresses for accessing NPE registers
  50. */
  51. #define IX_NPEDL_NPE_BASE (IX_OSAL_IXP400_PERIPHERAL_PHYS_BASE)
  52. #define IX_NPEDL_NPEA_OFFSET (0x6000) /**< NPE-A register base offset */
  53. #define IX_NPEDL_NPEB_OFFSET (0x7000) /**< NPE-B register base offset */
  54. #define IX_NPEDL_NPEC_OFFSET (0x8000) /**< NPE-C register base offset */
  55. /**
  56. * @def IX_NPEDL_NPEBASEADDRESS_NPEA
  57. * @brief Base Memory Address of NPE-A Configuration Bus registers
  58. */
  59. #define IX_NPEDL_NPEBASEADDRESS_NPEA (IX_NPEDL_NPE_BASE + IX_NPEDL_NPEA_OFFSET)
  60. /**
  61. * @def IX_NPEDL_NPEBASEADDRESS_NPEB
  62. * @brief Base Memory Address of NPE-B Configuration Bus registers
  63. */
  64. #define IX_NPEDL_NPEBASEADDRESS_NPEB (IX_NPEDL_NPE_BASE + IX_NPEDL_NPEB_OFFSET)
  65. /**
  66. * @def IX_NPEDL_NPEBASEADDRESS_NPEC
  67. * @brief Base Memory Address of NPE-C Configuration Bus registers
  68. */
  69. #define IX_NPEDL_NPEBASEADDRESS_NPEC (IX_NPEDL_NPE_BASE + IX_NPEDL_NPEC_OFFSET)
  70. /*
  71. * Instruction Memory Size (in words) for each NPE
  72. */
  73. /**
  74. * @def IX_NPEDL_INS_MEMSIZE_WORDS_NPEA
  75. * @brief Size (in words) of NPE-A Instruction Memory
  76. */
  77. #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEA 4096
  78. /**
  79. * @def IX_NPEDL_INS_MEMSIZE_WORDS_NPEB
  80. * @brief Size (in words) of NPE-B Instruction Memory
  81. */
  82. #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEB 2048
  83. /**
  84. * @def IX_NPEDL_INS_MEMSIZE_WORDS_NPEC
  85. * @brief Size (in words) of NPE-B Instruction Memory
  86. */
  87. #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEC 2048
  88. /*
  89. * Data Memory Size (in words) for each NPE
  90. */
  91. /**
  92. * @def IX_NPEDL_DATA_MEMSIZE_WORDS_NPEA
  93. * @brief Size (in words) of NPE-A Data Memory
  94. */
  95. #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEA 2048
  96. /**
  97. * @def IX_NPEDL_DATA_MEMSIZE_WORDS_NPEB
  98. * @brief Size (in words) of NPE-B Data Memory
  99. */
  100. #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEB 2048
  101. /**
  102. * @def IX_NPEDL_DATA_MEMSIZE_WORDS_NPEC
  103. * @brief Size (in words) of NPE-C Data Memory
  104. */
  105. #define IX_NPEDL_DATA_MEMSIZE_WORDS_NPEC 2048
  106. /*
  107. * Configuration Bus Register offsets (in bytes) from NPE Base Address
  108. */
  109. /**
  110. * @def IX_NPEDL_REG_OFFSET_EXAD
  111. * @brief Offset (in bytes) of EXAD (Execution Address) register from NPE Base
  112. * Address
  113. */
  114. #define IX_NPEDL_REG_OFFSET_EXAD 0x00000000
  115. /**
  116. * @def IX_NPEDL_REG_OFFSET_EXDATA
  117. * @brief Offset (in bytes) of EXDATA (Execution Data) register from NPE Base
  118. * Address
  119. */
  120. #define IX_NPEDL_REG_OFFSET_EXDATA 0x00000004
  121. /**
  122. * @def IX_NPEDL_REG_OFFSET_EXCTL
  123. * @brief Offset (in bytes) of EXCTL (Execution Control) register from NPE Base
  124. * Address
  125. */
  126. #define IX_NPEDL_REG_OFFSET_EXCTL 0x00000008
  127. /**
  128. * @def IX_NPEDL_REG_OFFSET_EXCT
  129. * @brief Offset (in bytes) of EXCT (Execution Count) register from NPE Base
  130. * Address
  131. */
  132. #define IX_NPEDL_REG_OFFSET_EXCT 0x0000000C
  133. /**
  134. * @def IX_NPEDL_REG_OFFSET_AP0
  135. * @brief Offset (in bytes) of AP0 (Action Point 0) register from NPE Base
  136. * Address
  137. */
  138. #define IX_NPEDL_REG_OFFSET_AP0 0x00000010
  139. /**
  140. * @def IX_NPEDL_REG_OFFSET_AP1
  141. * @brief Offset (in bytes) of AP1 (Action Point 1) register from NPE Base
  142. * Address
  143. */
  144. #define IX_NPEDL_REG_OFFSET_AP1 0x00000014
  145. /**
  146. * @def IX_NPEDL_REG_OFFSET_AP2
  147. * @brief Offset (in bytes) of AP2 (Action Point 2) register from NPE Base
  148. * Address
  149. */
  150. #define IX_NPEDL_REG_OFFSET_AP2 0x00000018
  151. /**
  152. * @def IX_NPEDL_REG_OFFSET_AP3
  153. * @brief Offset (in bytes) of AP3 (Action Point 3) register from NPE Base
  154. * Address
  155. */
  156. #define IX_NPEDL_REG_OFFSET_AP3 0x0000001C
  157. /**
  158. * @def IX_NPEDL_REG_OFFSET_WFIFO
  159. * @brief Offset (in bytes) of WFIFO (Watchpoint FIFO) register from NPE Base
  160. * Address
  161. */
  162. #define IX_NPEDL_REG_OFFSET_WFIFO 0x00000020
  163. /**
  164. * @def IX_NPEDL_REG_OFFSET_WC
  165. * @brief Offset (in bytes) of WC (Watch Count) register from NPE Base
  166. * Address
  167. */
  168. #define IX_NPEDL_REG_OFFSET_WC 0x00000024
  169. /**
  170. * @def IX_NPEDL_REG_OFFSET_PROFCT
  171. * @brief Offset (in bytes) of PROFCT (Profile Count) register from NPE Base
  172. * Address
  173. */
  174. #define IX_NPEDL_REG_OFFSET_PROFCT 0x00000028
  175. /**
  176. * @def IX_NPEDL_REG_OFFSET_STAT
  177. * @brief Offset (in bytes) of STAT (Messaging Status) register from NPE Base
  178. * Address
  179. */
  180. #define IX_NPEDL_REG_OFFSET_STAT 0x0000002C
  181. /**
  182. * @def IX_NPEDL_REG_OFFSET_CTL
  183. * @brief Offset (in bytes) of CTL (Messaging Control) register from NPE Base
  184. * Address
  185. */
  186. #define IX_NPEDL_REG_OFFSET_CTL 0x00000030
  187. /**
  188. * @def IX_NPEDL_REG_OFFSET_MBST
  189. * @brief Offset (in bytes) of MBST (Mailbox Status) register from NPE Base
  190. * Address
  191. */
  192. #define IX_NPEDL_REG_OFFSET_MBST 0x00000034
  193. /**
  194. * @def IX_NPEDL_REG_OFFSET_FIFO
  195. * @brief Offset (in bytes) of FIFO (messaging in/out FIFO) register from NPE
  196. * Base Address
  197. */
  198. #define IX_NPEDL_REG_OFFSET_FIFO 0x00000038
  199. /*
  200. * Non-zero reset values for the Configuration Bus registers
  201. */
  202. /**
  203. * @def IX_NPEDL_REG_RESET_FIFO
  204. * @brief Reset value for Mailbox (MBST) register
  205. * NOTE that if used, it should be complemented with an NPE intruction
  206. * to clear the Mailbox at the NPE side as well
  207. */
  208. #define IX_NPEDL_REG_RESET_MBST 0x0000F0F0
  209. /*
  210. * Bit-masks used to read/write particular bits in Configuration Bus registers
  211. */
  212. /**
  213. * @def IX_NPEDL_MASK_WFIFO_VALID
  214. * @brief Masks the VALID bit in the WFIFO register
  215. */
  216. #define IX_NPEDL_MASK_WFIFO_VALID 0x80000000
  217. /**
  218. * @def IX_NPEDL_MASK_STAT_OFNE
  219. * @brief Masks the OFNE bit in the STAT register
  220. */
  221. #define IX_NPEDL_MASK_STAT_OFNE 0x00010000
  222. /**
  223. * @def IX_NPEDL_MASK_STAT_IFNE
  224. * @brief Masks the IFNE bit in the STAT register
  225. */
  226. #define IX_NPEDL_MASK_STAT_IFNE 0x00080000
  227. /*
  228. * EXCTL (Execution Control) Register commands
  229. */
  230. /**
  231. * @def IX_NPEDL_EXCTL_CMD_NPE_STEP
  232. * @brief EXCTL Command to Step execution of an NPE Instruction
  233. */
  234. #define IX_NPEDL_EXCTL_CMD_NPE_STEP 0x01
  235. /**
  236. * @def IX_NPEDL_EXCTL_CMD_NPE_START
  237. * @brief EXCTL Command to Start NPE execution
  238. */
  239. #define IX_NPEDL_EXCTL_CMD_NPE_START 0x02
  240. /**
  241. * @def IX_NPEDL_EXCTL_CMD_NPE_STOP
  242. * @brief EXCTL Command to Stop NPE execution
  243. */
  244. #define IX_NPEDL_EXCTL_CMD_NPE_STOP 0x03
  245. /**
  246. * @def IX_NPEDL_EXCTL_CMD_NPE_CLR_PIPE
  247. * @brief EXCTL Command to Clear NPE instruction pipeline
  248. */
  249. #define IX_NPEDL_EXCTL_CMD_NPE_CLR_PIPE 0x04
  250. /**
  251. * @def IX_NPEDL_EXCTL_CMD_RD_INS_MEM
  252. * @brief EXCTL Command to read NPE instruction memory at address in EXAD
  253. * register and return value in EXDATA register
  254. */
  255. #define IX_NPEDL_EXCTL_CMD_RD_INS_MEM 0x10
  256. /**
  257. * @def IX_NPEDL_EXCTL_CMD_WR_INS_MEM
  258. * @brief EXCTL Command to write NPE instruction memory at address in EXAD
  259. * register with data in EXDATA register
  260. */
  261. #define IX_NPEDL_EXCTL_CMD_WR_INS_MEM 0x11
  262. /**
  263. * @def IX_NPEDL_EXCTL_CMD_RD_DATA_MEM
  264. * @brief EXCTL Command to read NPE data memory at address in EXAD
  265. * register and return value in EXDATA register
  266. */
  267. #define IX_NPEDL_EXCTL_CMD_RD_DATA_MEM 0x12
  268. /**
  269. * @def IX_NPEDL_EXCTL_CMD_WR_DATA_MEM
  270. * @brief EXCTL Command to write NPE data memory at address in EXAD
  271. * register with data in EXDATA register
  272. */
  273. #define IX_NPEDL_EXCTL_CMD_WR_DATA_MEM 0x13
  274. /**
  275. * @def IX_NPEDL_EXCTL_CMD_RD_ECS_REG
  276. * @brief EXCTL Command to read Execution Access register at address in EXAD
  277. * register and return value in EXDATA register
  278. */
  279. #define IX_NPEDL_EXCTL_CMD_RD_ECS_REG 0x14
  280. /**
  281. * @def IX_NPEDL_EXCTL_CMD_WR_ECS_REG
  282. * @brief EXCTL Command to write Execution Access register at address in EXAD
  283. * register with data in EXDATA register
  284. */
  285. #define IX_NPEDL_EXCTL_CMD_WR_ECS_REG 0x15
  286. /**
  287. * @def IX_NPEDL_EXCTL_CMD_CLR_PROFILE_CNT
  288. * @brief EXCTL Command to clear Profile Count register
  289. */
  290. #define IX_NPEDL_EXCTL_CMD_CLR_PROFILE_CNT 0x0C
  291. /*
  292. * EXCTL (Execution Control) Register status bit masks
  293. */
  294. /**
  295. * @def IX_NPEDL_EXCTL_STATUS_RUN
  296. * @brief Masks the RUN status bit in the EXCTL register
  297. */
  298. #define IX_NPEDL_EXCTL_STATUS_RUN 0x80000000
  299. /**
  300. * @def IX_NPEDL_EXCTL_STATUS_STOP
  301. * @brief Masks the STOP status bit in the EXCTL register
  302. */
  303. #define IX_NPEDL_EXCTL_STATUS_STOP 0x40000000
  304. /**
  305. * @def IX_NPEDL_EXCTL_STATUS_CLEAR
  306. * @brief Masks the CLEAR status bit in the EXCTL register
  307. */
  308. #define IX_NPEDL_EXCTL_STATUS_CLEAR 0x20000000
  309. /**
  310. * @def IX_NPEDL_EXCTL_STATUS_ECS_K
  311. * @brief Masks the K (pipeline Klean) status bit in the EXCTL register
  312. */
  313. #define IX_NPEDL_EXCTL_STATUS_ECS_K 0x00800000
  314. /*
  315. * Executing Context Stack (ECS) level registers
  316. */
  317. /**
  318. * @def IX_NPEDL_ECS_BG_CTXT_REG_0
  319. * @brief Execution Access register address for register 0 at Backgound
  320. * Executing Context Stack level
  321. */
  322. #define IX_NPEDL_ECS_BG_CTXT_REG_0 0x00
  323. /**
  324. * @def IX_NPEDL_ECS_BG_CTXT_REG_1
  325. * @brief Execution Access register address for register 1 at Backgound
  326. * Executing Context Stack level
  327. */
  328. #define IX_NPEDL_ECS_BG_CTXT_REG_1 0x01
  329. /**
  330. * @def IX_NPEDL_ECS_BG_CTXT_REG_2
  331. * @brief Execution Access register address for register 2 at Backgound
  332. * Executing Context Stack level
  333. */
  334. #define IX_NPEDL_ECS_BG_CTXT_REG_2 0x02
  335. /**
  336. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_0
  337. * @brief Execution Access register address for register 0 at Priority 1
  338. * Executing Context Stack level
  339. */
  340. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_0 0x04
  341. /**
  342. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_1
  343. * @brief Execution Access register address for register 1 at Priority 1
  344. * Executing Context Stack level
  345. */
  346. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_1 0x05
  347. /**
  348. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_2
  349. * @brief Execution Access register address for register 2 at Priority 1
  350. * Executing Context Stack level
  351. */
  352. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_2 0x06
  353. /**
  354. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_0
  355. * @brief Execution Access register address for register 0 at Priority 2
  356. * Executing Context Stack level
  357. */
  358. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_0 0x08
  359. /**
  360. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_1
  361. * @brief Execution Access register address for register 1 at Priority 2
  362. * Executing Context Stack level
  363. */
  364. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_1 0x09
  365. /**
  366. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_2
  367. * @brief Execution Access register address for register 2 at Priority 2
  368. * Executing Context Stack level
  369. */
  370. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_2 0x0A
  371. /**
  372. * @def IX_NPEDL_ECS_DBG_CTXT_REG_0
  373. * @brief Execution Access register address for register 0 at Debug
  374. * Executing Context Stack level
  375. */
  376. #define IX_NPEDL_ECS_DBG_CTXT_REG_0 0x0C
  377. /**
  378. * @def IX_NPEDL_ECS_DBG_CTXT_REG_1
  379. * @brief Execution Access register address for register 1 at Debug
  380. * Executing Context Stack level
  381. */
  382. #define IX_NPEDL_ECS_DBG_CTXT_REG_1 0x0D
  383. /**
  384. * @def IX_NPEDL_ECS_DBG_CTXT_REG_2
  385. * @brief Execution Access register address for register 2 at Debug
  386. * Executing Context Stack level
  387. */
  388. #define IX_NPEDL_ECS_DBG_CTXT_REG_2 0x0E
  389. /**
  390. * @def IX_NPEDL_ECS_INSTRUCT_REG
  391. * @brief Execution Access register address for NPE Instruction Register
  392. */
  393. #define IX_NPEDL_ECS_INSTRUCT_REG 0x11
  394. /*
  395. * Execution Access register reset values
  396. */
  397. /**
  398. * @def IX_NPEDL_ECS_BG_CTXT_REG_0_RESET
  399. * @brief Reset value for Execution Access Background ECS level register 0
  400. */
  401. #define IX_NPEDL_ECS_BG_CTXT_REG_0_RESET 0xA0000000
  402. /**
  403. * @def IX_NPEDL_ECS_BG_CTXT_REG_1_RESET
  404. * @brief Reset value for Execution Access Background ECS level register 1
  405. */
  406. #define IX_NPEDL_ECS_BG_CTXT_REG_1_RESET 0x01000000
  407. /**
  408. * @def IX_NPEDL_ECS_BG_CTXT_REG_2_RESET
  409. * @brief Reset value for Execution Access Background ECS level register 2
  410. */
  411. #define IX_NPEDL_ECS_BG_CTXT_REG_2_RESET 0x00008000
  412. /**
  413. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_0_RESET
  414. * @brief Reset value for Execution Access Priority 1 ECS level register 0
  415. */
  416. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_0_RESET 0x20000080
  417. /**
  418. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_1_RESET
  419. * @brief Reset value for Execution Access Priority 1 ECS level register 1
  420. */
  421. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_1_RESET 0x01000000
  422. /**
  423. * @def IX_NPEDL_ECS_PRI_1_CTXT_REG_2_RESET
  424. * @brief Reset value for Execution Access Priority 1 ECS level register 2
  425. */
  426. #define IX_NPEDL_ECS_PRI_1_CTXT_REG_2_RESET 0x00008000
  427. /**
  428. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_0_RESET
  429. * @brief Reset value for Execution Access Priority 2 ECS level register 0
  430. */
  431. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_0_RESET 0x20000080
  432. /**
  433. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_1_RESET
  434. * @brief Reset value for Execution Access Priority 2 ECS level register 1
  435. */
  436. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_1_RESET 0x01000000
  437. /**
  438. * @def IX_NPEDL_ECS_PRI_2_CTXT_REG_2_RESET
  439. * @brief Reset value for Execution Access Priority 2 ECS level register 2
  440. */
  441. #define IX_NPEDL_ECS_PRI_2_CTXT_REG_2_RESET 0x00008000
  442. /**
  443. * @def IX_NPEDL_ECS_DBG_CTXT_REG_0_RESET
  444. * @brief Reset value for Execution Access Debug ECS level register 0
  445. */
  446. #define IX_NPEDL_ECS_DBG_CTXT_REG_0_RESET 0x20000000
  447. /**
  448. * @def IX_NPEDL_ECS_DBG_CTXT_REG_1_RESET
  449. * @brief Reset value for Execution Access Debug ECS level register 1
  450. */
  451. #define IX_NPEDL_ECS_DBG_CTXT_REG_1_RESET 0x00000000
  452. /**
  453. * @def IX_NPEDL_ECS_DBG_CTXT_REG_2_RESET
  454. * @brief Reset value for Execution Access Debug ECS level register 2
  455. */
  456. #define IX_NPEDL_ECS_DBG_CTXT_REG_2_RESET 0x001E0000
  457. /**
  458. * @def IX_NPEDL_ECS_INSTRUCT_REG_RESET
  459. * @brief Reset value for Execution Access NPE Instruction Register
  460. */
  461. #define IX_NPEDL_ECS_INSTRUCT_REG_RESET 0x1003C00F
  462. /*
  463. * masks used to read/write particular bits in Execution Access registers
  464. */
  465. /**
  466. * @def IX_NPEDL_MASK_ECS_REG_0_ACTIVE
  467. * @brief Mask the A (Active) bit in Execution Access Register 0 of all ECS
  468. * levels
  469. */
  470. #define IX_NPEDL_MASK_ECS_REG_0_ACTIVE 0x80000000
  471. /**
  472. * @def IX_NPEDL_MASK_ECS_REG_0_NEXTPC
  473. * @brief Mask the NextPC bits in Execution Access Register 0 of all ECS
  474. * levels (except Debug ECS level)
  475. */
  476. #define IX_NPEDL_MASK_ECS_REG_0_NEXTPC 0x1FFF0000
  477. /**
  478. * @def IX_NPEDL_MASK_ECS_REG_0_LDUR
  479. * @brief Mask the LDUR bits in Execution Access Register 0 of all ECS levels
  480. */
  481. #define IX_NPEDL_MASK_ECS_REG_0_LDUR 0x00000700
  482. /**
  483. * @def IX_NPEDL_MASK_ECS_REG_1_CCTXT
  484. * @brief Mask the NextPC bits in Execution Access Register 1 of all ECS levels
  485. */
  486. #define IX_NPEDL_MASK_ECS_REG_1_CCTXT 0x000F0000
  487. /**
  488. * @def IX_NPEDL_MASK_ECS_REG_1_SELCTXT
  489. * @brief Mask the NextPC bits in Execution Access Register 1 of all ECS levels
  490. */
  491. #define IX_NPEDL_MASK_ECS_REG_1_SELCTXT 0x0000000F
  492. /**
  493. * @def IX_NPEDL_MASK_ECS_DBG_REG_2_IF
  494. * @brief Mask the IF bit in Execution Access Register 2 of Debug ECS level
  495. */
  496. #define IX_NPEDL_MASK_ECS_DBG_REG_2_IF 0x00100000
  497. /**
  498. * @def IX_NPEDL_MASK_ECS_DBG_REG_2_IE
  499. * @brief Mask the IE bit in Execution Access Register 2 of Debug ECS level
  500. */
  501. #define IX_NPEDL_MASK_ECS_DBG_REG_2_IE 0x00080000
  502. /*
  503. * Bit-Offsets from LSB of particular bit-fields in Execution Access registers
  504. */
  505. /**
  506. * @def IX_NPEDL_OFFSET_ECS_REG_0_NEXTPC
  507. * @brief LSB-offset of NextPC field in Execution Access Register 0 of all ECS
  508. * levels (except Debug ECS level)
  509. */
  510. #define IX_NPEDL_OFFSET_ECS_REG_0_NEXTPC 16
  511. /**
  512. * @def IX_NPEDL_OFFSET_ECS_REG_0_LDUR
  513. * @brief LSB-offset of LDUR field in Execution Access Register 0 of all ECS
  514. * levels
  515. */
  516. #define IX_NPEDL_OFFSET_ECS_REG_0_LDUR 8
  517. /**
  518. * @def IX_NPEDL_OFFSET_ECS_REG_1_CCTXT
  519. * @brief LSB-offset of CCTXT field in Execution Access Register 1 of all ECS
  520. * levels
  521. */
  522. #define IX_NPEDL_OFFSET_ECS_REG_1_CCTXT 16
  523. /**
  524. * @def IX_NPEDL_OFFSET_ECS_REG_1_SELCTXT
  525. * @brief LSB-offset of SELCTXT field in Execution Access Register 1 of all ECS
  526. * levels
  527. */
  528. #define IX_NPEDL_OFFSET_ECS_REG_1_SELCTXT 0
  529. /*
  530. * NPE core & co-processor instruction templates to load into NPE Instruction
  531. * Register, for read/write of NPE register file registers
  532. */
  533. /**
  534. * @def IX_NPEDL_INSTR_RD_REG_BYTE
  535. * @brief NPE Instruction, used to read an 8-bit NPE internal logical register
  536. * and return the value in the EXDATA register (aligned to MSB).
  537. * NPE Assembler instruction: "mov8 d0, d0 &&& DBG_WrExec"
  538. */
  539. #define IX_NPEDL_INSTR_RD_REG_BYTE 0x0FC00000
  540. /**
  541. * @def IX_NPEDL_INSTR_RD_REG_SHORT
  542. * @brief NPE Instruction, used to read a 16-bit NPE internal logical register
  543. * and return the value in the EXDATA register (aligned to MSB).
  544. * NPE Assembler instruction: "mov16 d0, d0 &&& DBG_WrExec"
  545. */
  546. #define IX_NPEDL_INSTR_RD_REG_SHORT 0x0FC08010
  547. /**
  548. * @def IX_NPEDL_INSTR_RD_REG_WORD
  549. * @brief NPE Instruction, used to read a 16-bit NPE internal logical register
  550. * and return the value in the EXDATA register.
  551. * NPE Assembler instruction: "mov32 d0, d0 &&& DBG_WrExec"
  552. */
  553. #define IX_NPEDL_INSTR_RD_REG_WORD 0x0FC08210
  554. /**
  555. * @def IX_NPEDL_INSTR_WR_REG_BYTE
  556. * @brief NPE Immediate-Mode Instruction, used to write an 8-bit NPE internal
  557. * logical register.
  558. * NPE Assembler instruction: "mov8 d0, #0"
  559. */
  560. #define IX_NPEDL_INSTR_WR_REG_BYTE 0x00004000
  561. /**
  562. * @def IX_NPEDL_INSTR_WR_REG_SHORT
  563. * @brief NPE Immediate-Mode Instruction, used to write a 16-bit NPE internal
  564. * logical register.
  565. * NPE Assembler instruction: "mov16 d0, #0"
  566. */
  567. #define IX_NPEDL_INSTR_WR_REG_SHORT 0x0000C000
  568. /**
  569. * @def IX_NPEDL_INSTR_RD_FIFO
  570. * @brief NPE Immediate-Mode Instruction, used to write a 16-bit NPE internal
  571. * logical register.
  572. * NPE Assembler instruction: "cprd32 d0 &&& DBG_RdInFIFO"
  573. */
  574. #define IX_NPEDL_INSTR_RD_FIFO 0x0F888220
  575. /**
  576. * @def IX_NPEDL_INSTR_RESET_MBOX
  577. * @brief NPE Instruction, used to reset Mailbox (MBST) register
  578. * NPE Assembler instruction: "mov32 d0, d0 &&& DBG_ClearM"
  579. */
  580. #define IX_NPEDL_INSTR_RESET_MBOX 0x0FAC8210
  581. /*
  582. * Bit-offsets from LSB, of particular bit-fields in an NPE instruction
  583. */
  584. /**
  585. * @def IX_NPEDL_OFFSET_INSTR_SRC
  586. * @brief LSB-offset to SRC (source operand) field of an NPE Instruction
  587. */
  588. #define IX_NPEDL_OFFSET_INSTR_SRC 4
  589. /**
  590. * @def IX_NPEDL_OFFSET_INSTR_DEST
  591. * @brief LSB-offset to DEST (destination operand) field of an NPE Instruction
  592. */
  593. #define IX_NPEDL_OFFSET_INSTR_DEST 9
  594. /**
  595. * @def IX_NPEDL_OFFSET_INSTR_COPROC
  596. * @brief LSB-offset to COPROC (coprocessor instruction) field of an NPE
  597. * Instruction
  598. */
  599. #define IX_NPEDL_OFFSET_INSTR_COPROC 18
  600. /*
  601. * masks used to read/write particular bits of an NPE Instruction
  602. */
  603. /**
  604. * @def IX_NPEDL_MASK_IMMED_INSTR_SRC_DATA
  605. * @brief Mask the bits of 16-bit data value (least-sig 5 bits) to be used in
  606. * SRC field of immediate-mode NPE instruction
  607. */
  608. #define IX_NPEDL_MASK_IMMED_INSTR_SRC_DATA 0x1F
  609. /**
  610. * @def IX_NPEDL_MASK_IMMED_INSTR_COPROC_DATA
  611. * @brief Mask the bits of 16-bit data value (most-sig 11 bits) to be used in
  612. * COPROC field of immediate-mode NPE instruction
  613. */
  614. #define IX_NPEDL_MASK_IMMED_INSTR_COPROC_DATA 0xFFE0
  615. /**
  616. * @def IX_NPEDL_OFFSET_IMMED_INSTR_COPROC_DATA
  617. * @brief LSB offset of the bit-field of 16-bit data value (most-sig 11 bits)
  618. * to be used in COPROC field of immediate-mode NPE instruction
  619. */
  620. #define IX_NPEDL_OFFSET_IMMED_INSTR_COPROC_DATA 5
  621. /**
  622. * @def IX_NPEDL_DISPLACE_IMMED_INSTR_COPROC_DATA
  623. * @brief Number of left-shifts required to align most-sig 11 bits of 16-bit
  624. * data value into COPROC field of immediate-mode NPE instruction
  625. */
  626. #define IX_NPEDL_DISPLACE_IMMED_INSTR_COPROC_DATA \
  627. (IX_NPEDL_OFFSET_INSTR_COPROC - IX_NPEDL_OFFSET_IMMED_INSTR_COPROC_DATA)
  628. /**
  629. * @def IX_NPEDL_WR_INSTR_LDUR
  630. * @brief LDUR value used with immediate-mode NPE Instructions by the NpeDl
  631. * for writing to NPE internal logical registers
  632. */
  633. #define IX_NPEDL_WR_INSTR_LDUR 1
  634. /**
  635. * @def IX_NPEDL_RD_INSTR_LDUR
  636. * @brief LDUR value used with NON-immediate-mode NPE Instructions by the NpeDl
  637. * for reading from NPE internal logical registers
  638. */
  639. #define IX_NPEDL_RD_INSTR_LDUR 0
  640. /**
  641. * @enum IxNpeDlCtxtRegNum
  642. * @brief Numeric values to identify the NPE internal Context Store registers
  643. */
  644. typedef enum
  645. {
  646. IX_NPEDL_CTXT_REG_STEVT = 0, /**< identifies STEVT */
  647. IX_NPEDL_CTXT_REG_STARTPC, /**< identifies STARTPC */
  648. IX_NPEDL_CTXT_REG_REGMAP, /**< identifies REGMAP */
  649. IX_NPEDL_CTXT_REG_CINDEX, /**< identifies CINDEX */
  650. IX_NPEDL_CTXT_REG_MAX /**< Total number of Context Store registers */
  651. } IxNpeDlCtxtRegNum;
  652. /*
  653. * NPE Context Store register logical addresses
  654. */
  655. /**
  656. * @def IX_NPEDL_CTXT_REG_ADDR_STEVT
  657. * @brief Logical address of STEVT NPE internal Context Store register
  658. */
  659. #define IX_NPEDL_CTXT_REG_ADDR_STEVT 0x0000001B
  660. /**
  661. * @def IX_NPEDL_CTXT_REG_ADDR_STARTPC
  662. * @brief Logical address of STARTPC NPE internal Context Store register
  663. */
  664. #define IX_NPEDL_CTXT_REG_ADDR_STARTPC 0x0000001C
  665. /**
  666. * @def IX_NPEDL_CTXT_REG_ADDR_REGMAP
  667. * @brief Logical address of REGMAP NPE internal Context Store register
  668. */
  669. #define IX_NPEDL_CTXT_REG_ADDR_REGMAP 0x0000001E
  670. /**
  671. * @def IX_NPEDL_CTXT_REG_ADDR_CINDEX
  672. * @brief Logical address of CINDEX NPE internal Context Store register
  673. */
  674. #define IX_NPEDL_CTXT_REG_ADDR_CINDEX 0x0000001F
  675. /*
  676. * NPE Context Store register reset values
  677. */
  678. /**
  679. * @def IX_NPEDL_CTXT_REG_RESET_STEVT
  680. * @brief Reset value of STEVT NPE internal Context Store register
  681. * (STEVT = off, 0x80)
  682. */
  683. #define IX_NPEDL_CTXT_REG_RESET_STEVT 0x80
  684. /**
  685. * @def IX_NPEDL_CTXT_REG_RESET_STARTPC
  686. * @brief Reset value of STARTPC NPE internal Context Store register
  687. * (STARTPC = 0x0000)
  688. */
  689. #define IX_NPEDL_CTXT_REG_RESET_STARTPC 0x0000
  690. /**
  691. * @def IX_NPEDL_CTXT_REG_RESET_REGMAP
  692. * @brief Reset value of REGMAP NPE internal Context Store register
  693. * (REGMAP = d0->p0, d8->p2, d16->p4)
  694. */
  695. #define IX_NPEDL_CTXT_REG_RESET_REGMAP 0x0820
  696. /**
  697. * @def IX_NPEDL_CTXT_REG_RESET_CINDEX
  698. * @brief Reset value of CINDEX NPE internal Context Store register
  699. * (CINDEX = 0)
  700. */
  701. #define IX_NPEDL_CTXT_REG_RESET_CINDEX 0x00
  702. /*
  703. * numeric range of context levels available on an NPE
  704. */
  705. /**
  706. * @def IX_NPEDL_CTXT_NUM_MIN
  707. * @brief Lowest NPE Context number in range
  708. */
  709. #define IX_NPEDL_CTXT_NUM_MIN 0
  710. /**
  711. * @def IX_NPEDL_CTXT_NUM_MAX
  712. * @brief Highest NPE Context number in range
  713. */
  714. #define IX_NPEDL_CTXT_NUM_MAX 15
  715. /*
  716. * Physical NPE internal registers
  717. */
  718. /**
  719. * @def IX_NPEDL_TOTAL_NUM_PHYS_REG
  720. * @brief Number of Physical registers currently supported
  721. * Initial NPE implementations will have a 32-word register file.
  722. * Later implementations may have a 64-word register file.
  723. */
  724. #define IX_NPEDL_TOTAL_NUM_PHYS_REG 32
  725. /**
  726. * @def IX_NPEDL_OFFSET_PHYS_REG_ADDR_REGMAP
  727. * @brief LSB-offset of Regmap number in Physical NPE register address, used
  728. * for Physical To Logical register address mapping in the NPE
  729. */
  730. #define IX_NPEDL_OFFSET_PHYS_REG_ADDR_REGMAP 1
  731. /**
  732. * @def IX_NPEDL_MASK_PHYS_REG_ADDR_LOGICAL_ADDR
  733. * @brief Mask to extract a logical NPE register address from a physical
  734. * register address, used for Physical To Logical address mapping
  735. */
  736. #define IX_NPEDL_MASK_PHYS_REG_ADDR_LOGICAL_ADDR 0x1
  737. #endif /* IXNPEDLNPEMGRECREGISTERS_P_H */