hw_emif.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. //###########################################################################
  2. //
  3. // FILE: hw_emif.h
  4. //
  5. // TITLE: Definitions for the C28x EMIF registers.
  6. //
  7. //###########################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // 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
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //###########################################################################
  42. #ifndef __HW_EMIF_H__
  43. #define __HW_EMIF_H__
  44. //*****************************************************************************
  45. //
  46. // The following are defines for the EMIF register offsets
  47. //
  48. //*****************************************************************************
  49. #define EMIF_O_RCSR 0x0 // Revision Code and Status
  50. // Register
  51. #define EMIF_O_ASYNC_WCCR 0x2 // Async Wait Cycle Config
  52. // Register
  53. #define EMIF_O_SDRAM_CR 0x4 // SDRAM
  54. // (pad_cs_o_n[0]/pad_cs_o_n[1])
  55. // Config Register
  56. #define EMIF_O_SDRAM_RCR 0x6 // SDRAM Refresh Control Register
  57. #define EMIF_O_ASYNC_CS2_CR 0x8 // Async 1 (pad_cs_o_n[2]) Config
  58. // Register
  59. #define EMIF_O_ASYNC_CS3_CR 0xA // Async 2 (pad_cs_o_n[3]) Config
  60. // Register
  61. #define EMIF_O_ASYNC_CS4_CR 0xC // Async 3 (pad_cs_o_n[4]) Config
  62. // Register
  63. #define EMIF_O_ASYNC_CS5_CR 0xE // Async 4 (pad_cs_o_n[5]) Config
  64. // Register
  65. #define EMIF_O_SDRAM_TR 0x10 // SDRAM Timing Register
  66. #define EMIF_O_TOTAL_SDRAM_AR 0x18 // Total SDRAM Accesses Register
  67. #define EMIF_O_TOTAL_SDRAM_ACTR 0x1A // Total SDRAM Activate Register
  68. #define EMIF_O_SDR_EXT_TMNG 0x1E // SDRAM SR/PD Exit Timing
  69. // Register
  70. #define EMIF_O_INT_RAW 0x20 // Interrupt Raw Register
  71. #define EMIF_O_INT_MSK 0x22 // Interrupt Masked Register
  72. #define EMIF_O_INT_MSK_SET 0x24 // Interrupt Mask Set Register
  73. #define EMIF_O_INT_MSK_CLR 0x26 // Interrupt Mask Clear Register
  74. #define EMIF_O_IO_CTRL 0x28 // IO Control Register
  75. #define EMIF_O_IO_STAT 0x2A // IO Status Register
  76. #define EMIF_O_MODEL_REL_NUM 0x56 // Module Release Number Register
  77. //*****************************************************************************
  78. //
  79. // The following are defines for the bit fields in the RCSR register
  80. //
  81. //*****************************************************************************
  82. #define EMIF_RCSR_MINOR_REVISION_S 0
  83. #define EMIF_RCSR_MINOR_REVISION_M 0xFF // Minor Revision.
  84. #define EMIF_RCSR_MAJOR_REVISION_S 8
  85. #define EMIF_RCSR_MAJOR_REVISION_M 0xFF00 // Major Revision.
  86. #define EMIF_RCSR_MODULE_ID_S 16
  87. #define EMIF_RCSR_MODULE_ID_M 0x3FFF0000 // EMIF module ID.
  88. #define EMIF_RCSR_FR 0x40000000 // EMIF is running in full rate or
  89. // half rate.
  90. #define EMIF_RCSR_BE 0x80000000 // EMIF endian mode.
  91. //*****************************************************************************
  92. //
  93. // The following are defines for the bit fields in the ASYNC_WCCR register
  94. //
  95. //*****************************************************************************
  96. #define EMIF_ASYNC_WCCR_MAX_EXT_WAIT_S 0
  97. #define EMIF_ASYNC_WCCR_MAX_EXT_WAIT_M 0xFF // Maximum Extended Wait cycles.
  98. #define EMIF_ASYNC_WCCR_CS2_WAIT_S 16
  99. #define EMIF_ASYNC_WCCR_CS2_WAIT_M 0x30000 // Maps the wait signal for chip
  100. // select 2.
  101. #define EMIF_ASYNC_WCCR_CS3_WAIT_S 18
  102. #define EMIF_ASYNC_WCCR_CS3_WAIT_M 0xC0000 // Maps the wait signal for chip
  103. // select 3.
  104. #define EMIF_ASYNC_WCCR_CS4_WAIT_S 20
  105. #define EMIF_ASYNC_WCCR_CS4_WAIT_M 0x300000 // Maps the wait signal for chip
  106. // select 4.
  107. #define EMIF_ASYNC_WCCR_CS5_WAIT_S 22
  108. #define EMIF_ASYNC_WCCR_CS5_WAIT_M 0xC00000 // Maps the wait signal for chip
  109. // select 5.
  110. #define EMIF_ASYNC_WCCR_WP0 0x10000000 // Wait Polarity for
  111. // pad_wait_i[0].
  112. #define EMIF_ASYNC_WCCR_WP1 0x20000000 // Wait Polarity for
  113. // pad_wait_i[1].
  114. #define EMIF_ASYNC_WCCR_WP2 0x40000000 // Wait Polarity for
  115. // pad_wait_i[2].
  116. #define EMIF_ASYNC_WCCR_WP3 0x80000000 // Wait Polarity for
  117. // pad_wait_i[3].
  118. //*****************************************************************************
  119. //
  120. // The following are defines for the bit fields in the SDRAM_CR register
  121. //
  122. //*****************************************************************************
  123. #define EMIF_SDRAM_CR_PAGESIGE_S 0
  124. #define EMIF_SDRAM_CR_PAGESIGE_M 0x7 // Page Size.
  125. #define EMIF_SDRAM_CR_EBANK 0x8 // External chip select setup.
  126. #define EMIF_SDRAM_CR_IBANK_S 4
  127. #define EMIF_SDRAM_CR_IBANK_M 0x70 // Internal Bank setup of SDRAM
  128. // devices.
  129. #define EMIF_SDRAM_CR_BIT_11_9_LOCK 0x100 // Bits 11 to 9 are writable only
  130. // if this bit is set.
  131. #define EMIF_SDRAM_CR_CL_S 9
  132. #define EMIF_SDRAM_CR_CL_M 0xE00 // CAS Latency.
  133. #define EMIF_SDRAM_CR_BIT_13_LOCK 0x1000 // Bits 13 is writable only if
  134. // this bit is set.
  135. #define EMIF_SDRAM_CR_NM 0x4000 // Narrow Mode.
  136. #define EMIF_SDRAM_CR_BIT_25_17_LOCK 0x10000 // Bits 25 to 17 are writable only
  137. // if this bit is set
  138. #define EMIF_SDRAM_CR_IBANK_POS 0x80000 // Internal bank position.
  139. #define EMIF_SDRAM_CR_ROWSIZE_S 20
  140. #define EMIF_SDRAM_CR_ROWSIZE_M 0x700000 // Row Size.
  141. #define EMIF_SDRAM_CR_PASR_S 23
  142. #define EMIF_SDRAM_CR_PASR_M 0x3800000 // Partial Array Self Refresh.
  143. #define EMIF_SDRAM_CR_PDWR 0x20000000 // Perform refreshes during Power
  144. // Down.
  145. #define EMIF_SDRAM_CR_PD 0x40000000 // Power Down.
  146. #define EMIF_SDRAM_CR_SR 0x80000000 // Self Refresh.
  147. //*****************************************************************************
  148. //
  149. // The following are defines for the bit fields in the SDRAM_RCR register
  150. //
  151. //*****************************************************************************
  152. #define EMIF_SDRAM_RCR_REFRESH_RATE_S 0
  153. #define EMIF_SDRAM_RCR_REFRESH_RATE_M 0x1FFF // Refresh Rate.
  154. //*****************************************************************************
  155. //
  156. // The following are defines for the bit fields in the ASYNC_CS2_CR register
  157. //
  158. //*****************************************************************************
  159. #define EMIF_ASYNC_CS2_CR_ASIZE_S 0
  160. #define EMIF_ASYNC_CS2_CR_ASIZE_M 0x3 // Asynchronous Memory Size.
  161. #define EMIF_ASYNC_CS2_CR_TA_S 2
  162. #define EMIF_ASYNC_CS2_CR_TA_M 0xC // Turn Around cycles.
  163. #define EMIF_ASYNC_CS2_CR_R_HOLD_S 4
  164. #define EMIF_ASYNC_CS2_CR_R_HOLD_M 0x70 // Read Strobe Hold cycles.
  165. #define EMIF_ASYNC_CS2_CR_R_STROBE_S 7
  166. #define EMIF_ASYNC_CS2_CR_R_STROBE_M 0x1F80 // Read Strobe Duration cycles.
  167. #define EMIF_ASYNC_CS2_CR_R_SETUP_S 13
  168. #define EMIF_ASYNC_CS2_CR_R_SETUP_M 0x1E000 // Read Strobe Setup cycles.
  169. #define EMIF_ASYNC_CS2_CR_W_HOLD_S 17
  170. #define EMIF_ASYNC_CS2_CR_W_HOLD_M 0xE0000 // Write Strobe Hold cycles.
  171. #define EMIF_ASYNC_CS2_CR_W_STROBE_S 20
  172. #define EMIF_ASYNC_CS2_CR_W_STROBE_M 0x3F00000 // Write Strobe Duration cycles.
  173. #define EMIF_ASYNC_CS2_CR_W_SETUP_S 26
  174. #define EMIF_ASYNC_CS2_CR_W_SETUP_M 0x3C000000 // Write Strobe Setup cycles.
  175. #define EMIF_ASYNC_CS2_CR_EW 0x40000000 // Extend Wait mode.
  176. #define EMIF_ASYNC_CS2_CR_SS 0x80000000 // Select Strobe mode.
  177. //*****************************************************************************
  178. //
  179. // The following are defines for the bit fields in the ASYNC_CS3_CR register
  180. //
  181. //*****************************************************************************
  182. #define EMIF_ASYNC_CS3_CR_ASIZE_S 0
  183. #define EMIF_ASYNC_CS3_CR_ASIZE_M 0x3 // Asynchronous Memory Size.
  184. #define EMIF_ASYNC_CS3_CR_TA_S 2
  185. #define EMIF_ASYNC_CS3_CR_TA_M 0xC // Turn Around cycles.
  186. #define EMIF_ASYNC_CS3_CR_R_HOLD_S 4
  187. #define EMIF_ASYNC_CS3_CR_R_HOLD_M 0x70 // Read Strobe Hold cycles.
  188. #define EMIF_ASYNC_CS3_CR_R_STROBE_S 7
  189. #define EMIF_ASYNC_CS3_CR_R_STROBE_M 0x1F80 // Read Strobe Duration cycles.
  190. #define EMIF_ASYNC_CS3_CR_R_SETUP_S 13
  191. #define EMIF_ASYNC_CS3_CR_R_SETUP_M 0x1E000 // Read Strobe Setup cycles.
  192. #define EMIF_ASYNC_CS3_CR_W_HOLD_S 17
  193. #define EMIF_ASYNC_CS3_CR_W_HOLD_M 0xE0000 // Write Strobe Hold cycles.
  194. #define EMIF_ASYNC_CS3_CR_W_STROBE_S 20
  195. #define EMIF_ASYNC_CS3_CR_W_STROBE_M 0x3F00000 // Write Strobe Duration cycles.
  196. #define EMIF_ASYNC_CS3_CR_W_SETUP_S 26
  197. #define EMIF_ASYNC_CS3_CR_W_SETUP_M 0x3C000000 // Write Strobe Setup cycles.
  198. #define EMIF_ASYNC_CS3_CR_EW 0x40000000 // Extend Wait mode.
  199. #define EMIF_ASYNC_CS3_CR_SS 0x80000000 // Select Strobe mode.
  200. //*****************************************************************************
  201. //
  202. // The following are defines for the bit fields in the ASYNC_CS4_CR register
  203. //
  204. //*****************************************************************************
  205. #define EMIF_ASYNC_CS4_CR_ASIZE_S 0
  206. #define EMIF_ASYNC_CS4_CR_ASIZE_M 0x3 // Asynchronous Memory Size.
  207. #define EMIF_ASYNC_CS4_CR_TA_S 2
  208. #define EMIF_ASYNC_CS4_CR_TA_M 0xC // Turn Around cycles.
  209. #define EMIF_ASYNC_CS4_CR_R_HOLD_S 4
  210. #define EMIF_ASYNC_CS4_CR_R_HOLD_M 0x70 // Read Strobe Hold cycles.
  211. #define EMIF_ASYNC_CS4_CR_R_STROBE_S 7
  212. #define EMIF_ASYNC_CS4_CR_R_STROBE_M 0x1F80 // Read Strobe Duration cycles.
  213. #define EMIF_ASYNC_CS4_CR_R_SETUP_S 13
  214. #define EMIF_ASYNC_CS4_CR_R_SETUP_M 0x1E000 // Read Strobe Setup cycles.
  215. #define EMIF_ASYNC_CS4_CR_W_HOLD_S 17
  216. #define EMIF_ASYNC_CS4_CR_W_HOLD_M 0xE0000 // Write Strobe Hold cycles.
  217. #define EMIF_ASYNC_CS4_CR_W_STROBE_S 20
  218. #define EMIF_ASYNC_CS4_CR_W_STROBE_M 0x3F00000 // Write Strobe Duration cycles.
  219. #define EMIF_ASYNC_CS4_CR_W_SETUP_S 26
  220. #define EMIF_ASYNC_CS4_CR_W_SETUP_M 0x3C000000 // Write Strobe Setup cycles.
  221. #define EMIF_ASYNC_CS4_CR_EW 0x40000000 // Extend Wait mode.
  222. #define EMIF_ASYNC_CS4_CR_SS 0x80000000 // Select Strobe mode.
  223. //*****************************************************************************
  224. //
  225. // The following are defines for the bit fields in the ASYNC_CS5_CR register
  226. //
  227. //*****************************************************************************
  228. #define EMIF_ASYNC_CS5_CR_ASIZE_S 0
  229. #define EMIF_ASYNC_CS5_CR_ASIZE_M 0x3 // Asynchronous Memory Size.
  230. #define EMIF_ASYNC_CS5_CR_TA_S 2
  231. #define EMIF_ASYNC_CS5_CR_TA_M 0xC // Turn Around cycles.
  232. #define EMIF_ASYNC_CS5_CR_R_HOLD_S 4
  233. #define EMIF_ASYNC_CS5_CR_R_HOLD_M 0x70 // Read Strobe Hold cycles.
  234. #define EMIF_ASYNC_CS5_CR_R_STROBE_S 7
  235. #define EMIF_ASYNC_CS5_CR_R_STROBE_M 0x1F80 // Read Strobe Duration cycles.
  236. #define EMIF_ASYNC_CS5_CR_R_SETUP_S 13
  237. #define EMIF_ASYNC_CS5_CR_R_SETUP_M 0x1E000 // Read Strobe Setup cycles.
  238. #define EMIF_ASYNC_CS5_CR_W_HOLD_S 17
  239. #define EMIF_ASYNC_CS5_CR_W_HOLD_M 0xE0000 // Write Strobe Hold cycles.
  240. #define EMIF_ASYNC_CS5_CR_W_STROBE_S 20
  241. #define EMIF_ASYNC_CS5_CR_W_STROBE_M 0x3F00000 // Write Strobe Duration cycles.
  242. #define EMIF_ASYNC_CS5_CR_W_SETUP_S 26
  243. #define EMIF_ASYNC_CS5_CR_W_SETUP_M 0x3C000000 // Write Strobe Setup cycles.
  244. #define EMIF_ASYNC_CS5_CR_EW 0x40000000 // Extend Wait mode.
  245. #define EMIF_ASYNC_CS5_CR_SS 0x80000000 // Select Strobe mode.
  246. //*****************************************************************************
  247. //
  248. // The following are defines for the bit fields in the SDRAM_TR register
  249. //
  250. //*****************************************************************************
  251. #define EMIF_SDRAM_TR_T_RRD_S 4
  252. #define EMIF_SDRAM_TR_T_RRD_M 0x70 // Activate to Activate timing for
  253. // different bank.
  254. #define EMIF_SDRAM_TR_T_RC_S 8
  255. #define EMIF_SDRAM_TR_T_RC_M 0xF00 // Activate to Activate timing .
  256. #define EMIF_SDRAM_TR_T_RAS_S 12
  257. #define EMIF_SDRAM_TR_T_RAS_M 0xF000 // Activate to Precharge timing.
  258. #define EMIF_SDRAM_TR_T_WR_S 16
  259. #define EMIF_SDRAM_TR_T_WR_M 0x70000 // Last Write to Precharge timing.
  260. #define EMIF_SDRAM_TR_T_RCD_S 20
  261. #define EMIF_SDRAM_TR_T_RCD_M 0x700000 // Activate to Read/Write timing.
  262. #define EMIF_SDRAM_TR_T_RP_S 24
  263. #define EMIF_SDRAM_TR_T_RP_M 0x7000000 // Precharge to Activate/Refresh
  264. // timing.
  265. #define EMIF_SDRAM_TR_T_RFC_S 27
  266. #define EMIF_SDRAM_TR_T_RFC_M 0xF8000000 // Refresh/Load Mode to
  267. // Refresh/Activate timing
  268. //*****************************************************************************
  269. //
  270. // The following are defines for the bit fields in the TOTAL_SDRAM_AR register
  271. //
  272. //*****************************************************************************
  273. #define EMIF_TOTAL_SDRAM_AR_TOTAL_SDRAM_AR_S 0
  274. #define EMIF_TOTAL_SDRAM_AR_TOTAL_SDRAM_AR_M 0xFFFFFFFF // Total number of VBUSP accesses
  275. // to SDRAM.
  276. //*****************************************************************************
  277. //
  278. // The following are defines for the bit fields in the TOTAL_SDRAM_ACTR register
  279. //
  280. //*****************************************************************************
  281. #define EMIF_TOTAL_SDRAM_ACTR_TOTAL_SDRAM_ACTR_S 0
  282. #define EMIF_TOTAL_SDRAM_ACTR_TOTAL_SDRAM_ACTR_M 0xFFFFFFFF // Number of SDRAM accesses which
  283. // required an activate command.
  284. //*****************************************************************************
  285. //
  286. // The following are defines for the bit fields in the SDR_EXT_TMNG register
  287. //
  288. //*****************************************************************************
  289. #define EMIF_SDR_EXT_TMNG_T_XS_S 0
  290. #define EMIF_SDR_EXT_TMNG_T_XS_M 0x1F // Self Refresh exit to new
  291. // command timing.
  292. //*****************************************************************************
  293. //
  294. // The following are defines for the bit fields in the INT_RAW register
  295. //
  296. //*****************************************************************************
  297. #define EMIF_INT_RAW_AT 0x1 // Asynchronous Timeout.
  298. #define EMIF_INT_RAW_LT 0x2 // Line Trap.
  299. #define EMIF_INT_RAW_WR_S 2
  300. #define EMIF_INT_RAW_WR_M 0x3C // Wait Rise.
  301. //*****************************************************************************
  302. //
  303. // The following are defines for the bit fields in the INT_MSK register
  304. //
  305. //*****************************************************************************
  306. #define EMIF_INT_MSK_AT_MASKED 0x1 // Asynchronous Timeout.
  307. #define EMIF_INT_MSK_LT_MASKED 0x2 // Line Trap.
  308. #define EMIF_INT_MSK_WR_MASKED_S 2
  309. #define EMIF_INT_MSK_WR_MASKED_M 0x3C // Wait Rise.
  310. //*****************************************************************************
  311. //
  312. // The following are defines for the bit fields in the INT_MSK_SET register
  313. //
  314. //*****************************************************************************
  315. #define EMIF_INT_MSK_SET_AT_MASK_SET 0x1 // Asynchronous Timeout.
  316. #define EMIF_INT_MSK_SET_LT_MASK_SET 0x2 // Line Trap.
  317. #define EMIF_INT_MSK_SET_WR_MASK_SET_S 2
  318. #define EMIF_INT_MSK_SET_WR_MASK_SET_M 0x3C // Wait Rise.
  319. //*****************************************************************************
  320. //
  321. // The following are defines for the bit fields in the INT_MSK_CLR register
  322. //
  323. //*****************************************************************************
  324. #define EMIF_INT_MSK_CLR_AT_MASK_CLR 0x1 // Asynchronous Timeout.
  325. #define EMIF_INT_MSK_CLR_LT_MASK_CLR 0x2 // Line Trap.
  326. #define EMIF_INT_MSK_CLR_WR_MASK_CLR_S 2
  327. #define EMIF_INT_MSK_CLR_WR_MASK_CLR_M 0x3C // Wait Rise.
  328. //*****************************************************************************
  329. //
  330. // The following are defines for the bit fields in the IO_CTRL register
  331. //
  332. //*****************************************************************************
  333. #define EMIF_IO_CTRL_IO_CTRL_S 0
  334. #define EMIF_IO_CTRL_IO_CTRL_M 0xFFFF // VTP calibration control for the
  335. // IOs
  336. //*****************************************************************************
  337. //
  338. // The following are defines for the bit fields in the IO_STAT register
  339. //
  340. //*****************************************************************************
  341. #define EMIF_IO_STAT_IO_STAT_S 0
  342. #define EMIF_IO_STAT_IO_STAT_M 0xFFFF // VTP calibration status of the
  343. // IOs
  344. //*****************************************************************************
  345. //
  346. // The following are defines for the bit fields in the MODEL_REL_NUM register
  347. //
  348. //*****************************************************************************
  349. #define EMIF_MODEL_REL_NUM_RELEASE_NUM_S 0
  350. #define EMIF_MODEL_REL_NUM_RELEASE_NUM_M 0xFF // Release Number.
  351. #endif