system.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. /*
  2. * system.h - SOPC Builder system and BSP software package information
  3. *
  4. * Machine generated for CPU 'nios2' in SOPC Builder design 'nios2_uc'
  5. * SOPC Builder design path: ../../nios2_uc.sopcinfo
  6. *
  7. * Generated: Tue Dec 08 10:12:33 CET 2020
  8. */
  9. /*
  10. * DO NOT MODIFY THIS FILE
  11. *
  12. * Changing this file will have subtle consequences
  13. * which will almost certainly lead to a nonfunctioning
  14. * system. If you do modify this file, be aware that your
  15. * changes will be overwritten and lost when this file
  16. * is generated again.
  17. *
  18. * DO NOT MODIFY THIS FILE
  19. */
  20. /*
  21. * License Agreement
  22. *
  23. * Copyright (c) 2008
  24. * Altera Corporation, San Jose, California, USA.
  25. * All rights reserved.
  26. *
  27. * Permission is hereby granted, free of charge, to any person obtaining a
  28. * copy of this software and associated documentation files (the "Software"),
  29. * to deal in the Software without restriction, including without limitation
  30. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  31. * and/or sell copies of the Software, and to permit persons to whom the
  32. * Software is furnished to do so, subject to the following conditions:
  33. *
  34. * The above copyright notice and this permission notice shall be included in
  35. * all copies or substantial portions of the Software.
  36. *
  37. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  38. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  39. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  40. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  41. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  43. * DEALINGS IN THE SOFTWARE.
  44. *
  45. * This agreement shall be governed in all respects by the laws of the State
  46. * of California and by the laws of the United States of America.
  47. */
  48. #ifndef __SYSTEM_H_
  49. #define __SYSTEM_H_
  50. /* Include definitions from linker script generator */
  51. #include "linker.h"
  52. /*
  53. * CPU configuration
  54. *
  55. */
  56. #define ALT_CPU_ARCHITECTURE "altera_nios2_gen2"
  57. #define ALT_CPU_BIG_ENDIAN 0
  58. #define ALT_CPU_BREAK_ADDR 0x00080820
  59. #define ALT_CPU_CPU_ARCH_NIOS2_R1
  60. #define ALT_CPU_CPU_FREQ 50000000u
  61. #define ALT_CPU_CPU_ID_SIZE 1
  62. #define ALT_CPU_CPU_ID_VALUE 0x00000000
  63. #define ALT_CPU_CPU_IMPLEMENTATION "tiny"
  64. #define ALT_CPU_DATA_ADDR_WIDTH 0x14
  65. #define ALT_CPU_DCACHE_LINE_SIZE 0
  66. #define ALT_CPU_DCACHE_LINE_SIZE_LOG2 0
  67. #define ALT_CPU_DCACHE_SIZE 0
  68. #define ALT_CPU_EXCEPTION_ADDR 0x00040020
  69. #define ALT_CPU_FLASH_ACCELERATOR_LINES 0
  70. #define ALT_CPU_FLASH_ACCELERATOR_LINE_SIZE 0
  71. #define ALT_CPU_FLUSHDA_SUPPORTED
  72. #define ALT_CPU_FREQ 50000000
  73. #define ALT_CPU_HARDWARE_DIVIDE_PRESENT 0
  74. #define ALT_CPU_HARDWARE_MULTIPLY_PRESENT 0
  75. #define ALT_CPU_HARDWARE_MULX_PRESENT 0
  76. #define ALT_CPU_HAS_DEBUG_CORE 1
  77. #define ALT_CPU_HAS_DEBUG_STUB
  78. #define ALT_CPU_HAS_ILLEGAL_INSTRUCTION_EXCEPTION
  79. #define ALT_CPU_HAS_JMPI_INSTRUCTION
  80. #define ALT_CPU_ICACHE_LINE_SIZE 0
  81. #define ALT_CPU_ICACHE_LINE_SIZE_LOG2 0
  82. #define ALT_CPU_ICACHE_SIZE 0
  83. #define ALT_CPU_INST_ADDR_WIDTH 0x14
  84. #define ALT_CPU_NAME "nios2"
  85. #define ALT_CPU_OCI_VERSION 1
  86. #define ALT_CPU_RESET_ADDR 0x00040000
  87. /*
  88. * CPU configuration (with legacy prefix - don't use these anymore)
  89. *
  90. */
  91. #define NIOS2_BIG_ENDIAN 0
  92. #define NIOS2_BREAK_ADDR 0x00080820
  93. #define NIOS2_CPU_ARCH_NIOS2_R1
  94. #define NIOS2_CPU_FREQ 50000000u
  95. #define NIOS2_CPU_ID_SIZE 1
  96. #define NIOS2_CPU_ID_VALUE 0x00000000
  97. #define NIOS2_CPU_IMPLEMENTATION "tiny"
  98. #define NIOS2_DATA_ADDR_WIDTH 0x14
  99. #define NIOS2_DCACHE_LINE_SIZE 0
  100. #define NIOS2_DCACHE_LINE_SIZE_LOG2 0
  101. #define NIOS2_DCACHE_SIZE 0
  102. #define NIOS2_EXCEPTION_ADDR 0x00040020
  103. #define NIOS2_FLASH_ACCELERATOR_LINES 0
  104. #define NIOS2_FLASH_ACCELERATOR_LINE_SIZE 0
  105. #define NIOS2_FLUSHDA_SUPPORTED
  106. #define NIOS2_HARDWARE_DIVIDE_PRESENT 0
  107. #define NIOS2_HARDWARE_MULTIPLY_PRESENT 0
  108. #define NIOS2_HARDWARE_MULX_PRESENT 0
  109. #define NIOS2_HAS_DEBUG_CORE 1
  110. #define NIOS2_HAS_DEBUG_STUB
  111. #define NIOS2_HAS_ILLEGAL_INSTRUCTION_EXCEPTION
  112. #define NIOS2_HAS_JMPI_INSTRUCTION
  113. #define NIOS2_ICACHE_LINE_SIZE 0
  114. #define NIOS2_ICACHE_LINE_SIZE_LOG2 0
  115. #define NIOS2_ICACHE_SIZE 0
  116. #define NIOS2_INST_ADDR_WIDTH 0x14
  117. #define NIOS2_OCI_VERSION 1
  118. #define NIOS2_RESET_ADDR 0x00040000
  119. /*
  120. * Custom instruction macros
  121. *
  122. */
  123. #define ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(n,A,B) __builtin_custom_inii(ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0_N+(n&ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0_N_MASK),(A),(B))
  124. #define ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0_N 0xfc
  125. #define ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0_N_MASK ((1<<2)-1)
  126. /*
  127. * Define for each module class mastered by the CPU
  128. *
  129. */
  130. #define __ALTERA_AVALON_JTAG_UART
  131. #define __ALTERA_AVALON_LCD_16207
  132. #define __ALTERA_AVALON_ONCHIP_MEMORY2
  133. #define __ALTERA_AVALON_PIO
  134. #define __ALTERA_NIOS2_GEN2
  135. #define __ALTERA_NIOS_CUSTOM_INSTR_FLOATING_POINT
  136. /*
  137. * System configuration
  138. *
  139. */
  140. #define ALT_DEVICE_FAMILY "Cyclone IV E"
  141. #define ALT_ENHANCED_INTERRUPT_API_PRESENT
  142. #define ALT_IRQ_BASE NULL
  143. #define ALT_LOG_PORT "/dev/null"
  144. #define ALT_LOG_PORT_BASE 0x0
  145. #define ALT_LOG_PORT_DEV null
  146. #define ALT_LOG_PORT_TYPE ""
  147. #define ALT_NUM_EXTERNAL_INTERRUPT_CONTROLLERS 0
  148. #define ALT_NUM_INTERNAL_INTERRUPT_CONTROLLERS 1
  149. #define ALT_NUM_INTERRUPT_CONTROLLERS 1
  150. #define ALT_STDERR "/dev/jtag_uart"
  151. #define ALT_STDERR_BASE 0x81088
  152. #define ALT_STDERR_DEV jtag_uart
  153. #define ALT_STDERR_IS_JTAG_UART
  154. #define ALT_STDERR_PRESENT
  155. #define ALT_STDERR_TYPE "altera_avalon_jtag_uart"
  156. #define ALT_STDIN "/dev/jtag_uart"
  157. #define ALT_STDIN_BASE 0x81088
  158. #define ALT_STDIN_DEV jtag_uart
  159. #define ALT_STDIN_IS_JTAG_UART
  160. #define ALT_STDIN_PRESENT
  161. #define ALT_STDIN_TYPE "altera_avalon_jtag_uart"
  162. #define ALT_STDOUT "/dev/jtag_uart"
  163. #define ALT_STDOUT_BASE 0x81088
  164. #define ALT_STDOUT_DEV jtag_uart
  165. #define ALT_STDOUT_IS_JTAG_UART
  166. #define ALT_STDOUT_PRESENT
  167. #define ALT_STDOUT_TYPE "altera_avalon_jtag_uart"
  168. #define ALT_SYSTEM_NAME "nios2_uc"
  169. /*
  170. * hal configuration
  171. *
  172. */
  173. #define ALT_INCLUDE_INSTRUCTION_RELATED_EXCEPTION_API
  174. #define ALT_MAX_FD 32
  175. #define ALT_SYS_CLK none
  176. #define ALT_TIMESTAMP_CLK none
  177. /*
  178. * jtag_uart configuration
  179. *
  180. */
  181. #define ALT_MODULE_CLASS_jtag_uart altera_avalon_jtag_uart
  182. #define JTAG_UART_BASE 0x81088
  183. #define JTAG_UART_IRQ 0
  184. #define JTAG_UART_IRQ_INTERRUPT_CONTROLLER_ID 0
  185. #define JTAG_UART_NAME "/dev/jtag_uart"
  186. #define JTAG_UART_READ_DEPTH 64
  187. #define JTAG_UART_READ_THRESHOLD 8
  188. #define JTAG_UART_SPAN 8
  189. #define JTAG_UART_TYPE "altera_avalon_jtag_uart"
  190. #define JTAG_UART_WRITE_DEPTH 64
  191. #define JTAG_UART_WRITE_THRESHOLD 8
  192. /*
  193. * lcd_16207 configuration
  194. *
  195. */
  196. #define ALT_MODULE_CLASS_lcd_16207 altera_avalon_lcd_16207
  197. #define LCD_16207_BASE 0x81070
  198. #define LCD_16207_IRQ -1
  199. #define LCD_16207_IRQ_INTERRUPT_CONTROLLER_ID -1
  200. #define LCD_16207_NAME "/dev/lcd_16207"
  201. #define LCD_16207_SPAN 16
  202. #define LCD_16207_TYPE "altera_avalon_lcd_16207"
  203. /*
  204. * onchip_memory2 configuration
  205. *
  206. */
  207. #define ALT_MODULE_CLASS_onchip_memory2 altera_avalon_onchip_memory2
  208. #define ONCHIP_MEMORY2_ALLOW_IN_SYSTEM_MEMORY_CONTENT_EDITOR 0
  209. #define ONCHIP_MEMORY2_ALLOW_MRAM_SIM_CONTENTS_ONLY_FILE 0
  210. #define ONCHIP_MEMORY2_BASE 0x40000
  211. #define ONCHIP_MEMORY2_CONTENTS_INFO ""
  212. #define ONCHIP_MEMORY2_DUAL_PORT 0
  213. #define ONCHIP_MEMORY2_GUI_RAM_BLOCK_TYPE "AUTO"
  214. #define ONCHIP_MEMORY2_INIT_CONTENTS_FILE "nios2_uc_onchip_memory2"
  215. #define ONCHIP_MEMORY2_INIT_MEM_CONTENT 1
  216. #define ONCHIP_MEMORY2_INSTANCE_ID "NONE"
  217. #define ONCHIP_MEMORY2_IRQ -1
  218. #define ONCHIP_MEMORY2_IRQ_INTERRUPT_CONTROLLER_ID -1
  219. #define ONCHIP_MEMORY2_NAME "/dev/onchip_memory2"
  220. #define ONCHIP_MEMORY2_NON_DEFAULT_INIT_FILE_ENABLED 0
  221. #define ONCHIP_MEMORY2_RAM_BLOCK_TYPE "AUTO"
  222. #define ONCHIP_MEMORY2_READ_DURING_WRITE_MODE "DONT_CARE"
  223. #define ONCHIP_MEMORY2_SINGLE_CLOCK_OP 0
  224. #define ONCHIP_MEMORY2_SIZE_MULTIPLE 1
  225. #define ONCHIP_MEMORY2_SIZE_VALUE 204800
  226. #define ONCHIP_MEMORY2_SPAN 204800
  227. #define ONCHIP_MEMORY2_TYPE "altera_avalon_onchip_memory2"
  228. #define ONCHIP_MEMORY2_WRITABLE 1
  229. /*
  230. * pio_BUTTON configuration
  231. *
  232. */
  233. #define ALT_MODULE_CLASS_pio_BUTTON altera_avalon_pio
  234. #define PIO_BUTTON_BASE 0x81040
  235. #define PIO_BUTTON_BIT_CLEARING_EDGE_REGISTER 0
  236. #define PIO_BUTTON_BIT_MODIFYING_OUTPUT_REGISTER 0
  237. #define PIO_BUTTON_CAPTURE 0
  238. #define PIO_BUTTON_DATA_WIDTH 8
  239. #define PIO_BUTTON_DO_TEST_BENCH_WIRING 0
  240. #define PIO_BUTTON_DRIVEN_SIM_VALUE 0
  241. #define PIO_BUTTON_EDGE_TYPE "NONE"
  242. #define PIO_BUTTON_FREQ 50000000
  243. #define PIO_BUTTON_HAS_IN 1
  244. #define PIO_BUTTON_HAS_OUT 0
  245. #define PIO_BUTTON_HAS_TRI 0
  246. #define PIO_BUTTON_IRQ -1
  247. #define PIO_BUTTON_IRQ_INTERRUPT_CONTROLLER_ID -1
  248. #define PIO_BUTTON_IRQ_TYPE "NONE"
  249. #define PIO_BUTTON_NAME "/dev/pio_BUTTON"
  250. #define PIO_BUTTON_RESET_VALUE 0
  251. #define PIO_BUTTON_SPAN 16
  252. #define PIO_BUTTON_TYPE "altera_avalon_pio"
  253. /*
  254. * pio_LED configuration
  255. *
  256. */
  257. #define ALT_MODULE_CLASS_pio_LED altera_avalon_pio
  258. #define PIO_LED_BASE 0x81060
  259. #define PIO_LED_BIT_CLEARING_EDGE_REGISTER 0
  260. #define PIO_LED_BIT_MODIFYING_OUTPUT_REGISTER 0
  261. #define PIO_LED_CAPTURE 0
  262. #define PIO_LED_DATA_WIDTH 32
  263. #define PIO_LED_DO_TEST_BENCH_WIRING 0
  264. #define PIO_LED_DRIVEN_SIM_VALUE 0
  265. #define PIO_LED_EDGE_TYPE "NONE"
  266. #define PIO_LED_FREQ 50000000
  267. #define PIO_LED_HAS_IN 0
  268. #define PIO_LED_HAS_OUT 1
  269. #define PIO_LED_HAS_TRI 0
  270. #define PIO_LED_IRQ -1
  271. #define PIO_LED_IRQ_INTERRUPT_CONTROLLER_ID -1
  272. #define PIO_LED_IRQ_TYPE "NONE"
  273. #define PIO_LED_NAME "/dev/pio_LED"
  274. #define PIO_LED_RESET_VALUE 0
  275. #define PIO_LED_SPAN 16
  276. #define PIO_LED_TYPE "altera_avalon_pio"
  277. /*
  278. * pio_MATRIX configuration
  279. *
  280. */
  281. #define ALT_MODULE_CLASS_pio_MATRIX altera_avalon_pio
  282. #define PIO_MATRIX_BASE 0x81050
  283. #define PIO_MATRIX_BIT_CLEARING_EDGE_REGISTER 0
  284. #define PIO_MATRIX_BIT_MODIFYING_OUTPUT_REGISTER 0
  285. #define PIO_MATRIX_CAPTURE 0
  286. #define PIO_MATRIX_DATA_WIDTH 20
  287. #define PIO_MATRIX_DO_TEST_BENCH_WIRING 0
  288. #define PIO_MATRIX_DRIVEN_SIM_VALUE 0
  289. #define PIO_MATRIX_EDGE_TYPE "NONE"
  290. #define PIO_MATRIX_FREQ 50000000
  291. #define PIO_MATRIX_HAS_IN 0
  292. #define PIO_MATRIX_HAS_OUT 1
  293. #define PIO_MATRIX_HAS_TRI 0
  294. #define PIO_MATRIX_IRQ -1
  295. #define PIO_MATRIX_IRQ_INTERRUPT_CONTROLLER_ID -1
  296. #define PIO_MATRIX_IRQ_TYPE "NONE"
  297. #define PIO_MATRIX_NAME "/dev/pio_MATRIX"
  298. #define PIO_MATRIX_RESET_VALUE 0
  299. #define PIO_MATRIX_SPAN 16
  300. #define PIO_MATRIX_TYPE "altera_avalon_pio"
  301. #endif /* __SYSTEM_H_ */