blob: 9a0ea060c751bd0f0967753f698b51b105dc18a6 [file] [log] [blame]
wdenkc935d3b2004-01-03 19:43:48 +00001
2TODO: specify IDE i/f
3 specify OCI
4
5
6===============================================================================
7 C P U , M E M O R Y , I N / O U T C O M P O N E N T S
8===============================================================================
9see also [1]-[5]
10
11CPU: "standard_32"
12 32 bit NIOS for 50 MHz
13 256 Byte for register file (15 levels)
14 4 KByte instruction cache (4 bytes in each cache line)
15 4 KByte data cache (4 bytes in each cache line)
16 2 KByte On Chip ROM with GERMS boot monitor
17 64 KByte On Chip RAM
18 MSTEP multiplier
19 no Debug Core
20 On Chip Instrumentation (OCI) enabled
21
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020022 U-Boot CFG: CONFIG_SYS_NIOS_CPU_CLK = 50000000
23 CONFIG_SYS_NIOS_CPU_ICACHE = 4096
24 CONFIG_SYS_NIOS_CPU_DCACHE = 4096
25 CONFIG_SYS_NIOS_CPU_REG_NUMS = 256
26 CONFIG_SYS_NIOS_CPU_MUL = 0
27 CONFIG_SYS_NIOS_CPU_MSTEP = 1
28 CONFIG_SYS_NIOS_CPU_DBG_CORE = 0
wdenkc935d3b2004-01-03 19:43:48 +000029
30OCI: (TODO)
31
32IRQ: Nr. | used by
33 ------+--------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020034 16 | TIMER0 | CONFIG_SYS_NIOS_CPU_TIMER0_IRQ = 16
35 25 | UART0 | CONFIG_SYS_NIOS_CPU_UART0_IRQ = 25
36 30 | LAN91C111 | CONFIG_SYS_NIOS_CPU_LAN0_IRQ = 30
37 35 | PIO5 | CONFIG_SYS_NIOS_CPU_PIO5_IRQ = 35
38 40 | PIO0 | CONFIG_SYS_NIOS_CPU_PIO0_IRQ = 40
39 50 | TIMER1 | CONFIG_SYS_NIOS_CPU_TIMER1_IRQ = 50
wdenkc935d3b2004-01-03 19:43:48 +000040
41MEMORY: 8 MByte Flash
42 1 MByte SRAM
43 16 MByte SDRAM
44
45Timer: TIMER0: high priority programmable timer (IRQ16)
46 TIMER1: low priority fixed timer for 10 ms @ 50 MHz (IRQ50)
47
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020048 U-Boot CFG: CONFIG_SYS_NIOS_CPU_TICK_TIMER = 1
49 CONFIG_SYS_NIOS_CPU_USER_TIMER = 0
wdenkc935d3b2004-01-03 19:43:48 +000050
51PIO: Nr. | description
52 ------+--------------------------------------------------------
53 PIO0 | BUTTON: 4 inputs for user push buttons (IRQ40)
54 PIO1 | LCD: 11 in/outputs for ASCII LCD
55 PIO2 | LED: 8 outputs for user LEDs
56 PIO3 | SEVENSEG: 16 outputs for user seven segment display
57 PIO4 | RECONF: 1 in/output for . . . . . . . . . . . .
58 PIO5 | CFPRESENT: 1 input for CF present event (IRQ35)
59 PIO6 | CFPOWER: 1 output to controll CF power supply
60 PIO7 | CFATASEL: 1 output to controll CF ATA card select
61
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020062 U-Boot CFG: CONFIG_SYS_NIOS_CPU_BUTTON_PIO = 0
63 CONFIG_SYS_NIOS_CPU_LCD_PIO = 1
64 CONFIG_SYS_NIOS_CPU_LED_PIO = 2
65 CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO = 3
66 CONFIG_SYS_NIOS_CPU_RECONF_PIO = 4
67 CONFIG_SYS_NIOS_CPU_CFPRESENT_PIO = 5
68 CONFIG_SYS_NIOS_CPU_CFPOWER_PIO = 6
69 CONFIG_SYS_NIOS_CPU_CFATASEL_PIO = 7
wdenkc935d3b2004-01-03 19:43:48 +000070
71UART: UART0: fixed baudrate of 115200, fixed protocol 8N1,
72 without handshake RTS/CTS (IRQ25)
73
74LAN: SMsC LAN91C111 with:
75 - offset 0x300 (LAN91C111_REGISTERS_OFFSET)
76 - data bus width 32 bit (LAN91C111_DATA_BUS_WIDTH)
77
78IDE: (TODO)
79
80
81===============================================================================
82 M E M O R Y M A P
83===============================================================================
84
85- - - - - - - - - - - external memory 2 - - - - - - - - - - - - - - - - - - -
86
87 0x02000000 ---32-----------16|15------------0-
88 | : | \
89 | : | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020090 SDRAM | : | > CONFIG_SYS_NIOS_CPU_SRAM_SIZE
wdenkc935d3b2004-01-03 19:43:48 +000091 | : | | = 0x01000000
92 | : | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020093 0x01000000 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_SRAM_BASE
wdenkc935d3b2004-01-03 19:43:48 +000094 | |
95 : gap :
96 : :
97
98- - - - - - - - - - - on chip i/o - - - - - - - - - - - - - - - - - - -
99
100 : :
101 : gap :
102 | |
103 0x00920a80 ---32-----------16|15------------0-
104 | | | \
105 : (real size : : |
106 IDE i/f : and content : : > 0x00000080
107 [5] : unknown) : : |
108 | | | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200109 0x00920a00 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_IDE0
wdenkc935d3b2004-01-03 19:43:48 +0000110 | (unused) | \
111 + 0x1c |- - - - - - - - - - - - - - - -| |
112 | (unused) | |
113 + 0x18 |- - - - - - - - - - - - - - - -| |
114 | (unused) | |
115 + 0x14 |- - - - - - - - - - - - - - - -| |
116 TIMER1 | (unused) | |
117 [3] + 0x10 |- - - - - - - - - - - - - - - -| > 0x00000020
118 | (unused) | |
119 + 0x0c |- - - - - - - - - - - - - - - -| |
120 | (unused) | |
121 + 0x08 |- - - - - - - - - - - - - - - -| |
122 | control (1 bit) (rw) | |
123 + 0x04 |- - - - - - - - - - - - - - - -| |
124 | status (2 bit) (rw) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200125 0x009209e0 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_TIMER1
wdenkc935d3b2004-01-03 19:43:48 +0000126 | (unused) | \
127 + 0x0c |- - - - - - - - - - - - - - - -| |
128 PIO7 | (unused) | |
129 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
130 | (unused) | |
131 + 0x04 |- - - - - - - - - - - - - - - -| |
132 | data (1 bit) (wo) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200133 0x009209d0 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO7
wdenkc935d3b2004-01-03 19:43:48 +0000134 | (unused) | \
135 + 0x0c |- - - - - - - - - - - - - - - -| |
136 PIO6 | (unused) | |
137 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
138 | (unused) | |
139 + 0x04 |- - - - - - - - - - - - - - - -| |
140 | data (1 bit) (wo) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200141 0x009209c0 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO6
wdenkc935d3b2004-01-03 19:43:48 +0000142 | edgecapture (1 bit) (rw) | \
143 + 0x0c |- - - - - - - - - - - - - - - -| |
144 PIO5 | interruptmask (1 bit) (rw) | |
145 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
146 | (unused) | |
147 + 0x04 |- - - - - - - - - - - - - - - -| |
148 | data (1 bit) (ro) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200149 0x009209b0 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO5
wdenkc935d3b2004-01-03 19:43:48 +0000150 | (unused) | \
151 + 0x0c |- - - - - - - - - - - - - - - -| |
152 PIO4 | (unused) | |
153 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
154 | direction (1 bit) (rw) | |
155 + 0x04 |- - - - - - - - - - - - - - - -| |
156 | data (1 bit) (rw) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200157 0x009209a0 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO4
wdenkc935d3b2004-01-03 19:43:48 +0000158 | (unused) | \
159 + 0x0c |- - - - - - - - - - - - - - - -| |
160 PIO3 | (unused) | |
161 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
162 | (unused) | |
163 + 0x04 |- - - - - - - - - - - - - - - -| |
164 | data (16 bit) (wo) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200165 0x00920990 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO3
wdenkc935d3b2004-01-03 19:43:48 +0000166 | (unused) | \
167 + 0x0c |- - - - - - - - - - - - - - - -| |
168 PIO2 | (unused) | |
169 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
170 | (unused) | |
171 + 0x04 |- - - - - - - - - - - - - - - -| |
172 | data (8 bit) (wo) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200173 0x00920980 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO2
wdenkc935d3b2004-01-03 19:43:48 +0000174 | (unused) | \
175 + 0x0c |- - - - - - - - - - - - - - - -| |
176 PIO1 | (unused) | |
177 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
178 | direction (11 bit) (rw) | |
179 + 0x04 |- - - - - - - - - - - - - - - -| |
180 | data (11 bit) (rw) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200181 0x00920970 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO1
wdenkc935d3b2004-01-03 19:43:48 +0000182 | edgecapture (4 bit) (rw) | \
183 + 0x0c |- - - - - - - - - - - - - - - -| |
184 PIO0 | interruptmask (4 bit) (rw) | |
185 [4] + 0x08 |- - - - - - - - - - - - - - - -| > 0x00000010
186 | (unused) | |
187 + 0x04 |- - - - - - - - - - - - - - - -| |
188 | data (4 bit) (ro) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200189 0x00920960 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_PIO0
wdenkc935d3b2004-01-03 19:43:48 +0000190 | (unused) | \
191 + 0x1c |- - - - - - - - - - - - - - - -| |
192 | (unused) | |
193 + 0x18 |- - - - - - - - - - - - - - - -| |
194 | snaph (16 bit) (rw) | |
195 + 0x14 |- - - - - - - - - - - - - - - -| |
196 TIMER0 | snapl (16 bit) (rw) | |
197 [3] + 0x10 |- - - - - - - - - - - - - - - -| > 0x00000020
198 | periodh (16 bit) (rw) | |
199 + 0x0c |- - - - - - - - - - - - - - - -| |
200 | periodl (16 bit) (rw) | |
201 + 0x08 |- - - - - - - - - - - - - - - -| |
202 | control (4 bit) (rw) | |
203 + 0x04 |- - - - - - - - - - - - - - - -| |
204 | status (2 bit) (rw) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200205 0x00920940 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_TIMER0
wdenkc935d3b2004-01-03 19:43:48 +0000206 | | \
207 : gap : > (space for UART1)
208 | | /
209 0x00920920 ---32-----------16|15------------0-
210 | (unused) | \
211 + 0x1c |- - - - - - - - - - - - - - - -| |
212 | (unused) | |
213 + 0x18 |- - - - - - - - - - - - - - - -| |
214 | (unused) | |
215 + 0x14 |- - - - - - - - - - - - - - - -| |
216 UART0 | (unused) | > 0x00000020
217 [2] + 0x10 |- - - - - - - - - - - - - - - -| |
218 | control (10 bit) (rw) | |
219 + 0x0c |- - - - - - - - - - - - - - - -| |
220 | status (10 bit) (rw) | |
221 + 0x08 |- - - - - - - - - - - - - - - -| |
222 | txdata (8 bit) (wo) | |
223 + 0x04 |- - - - - - - - - - - - - - - -| |
224 | rxdata (8 bit) (ro) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200225 0x00920900 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_UART0
wdenkc935d3b2004-01-03 19:43:48 +0000226
227- - - - - - - - - - - on chip debugging - - - - - - - - - - - - - - - - - - -
228
229 0x00920900 -----------------------------------
230 | | \
231 : (real size : |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200232 OCI Debug : and content : > CONFIG_SYS_NIOS_CPU_OCI_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000233 : unknown) : | = 0x00000100
234 | | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200235 0x00920800 ----------------------------------- CONFIG_SYS_NIOS_CPU_OCI_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000236
237- - - - - - - - - - - on chip memory 2 - - - - - - - - - - -
238
239 0x00920800 ---32-----------16|15------------0-
240 | : | \
241 | : | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200242 GERMS | : | > CONFIG_SYS_NIOS_CPU_ROM_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000243 | : | | = 0x00000800
244 | : | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200245 0x00920000 |- - - - - - - - - - - - - - - -+- - CONFIG_SYS_NIOS_CPU_RST_VECT
246 0x00920000 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_ROM_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000247
248- - - - - - - - - - - external i/o - - - - - - - - - - - - - - - - - - -
249
250 0x00920000 ---32-----------16|15------------0-
251 | gap | \
252 0x00910310 --+-------------------------------| |
253 | | |
254 | register bank (size = 0x10) | |
255 | +--------.---.---.--- | |
256 | | bank 0 \ 1 \ 2 \ 3 \ | |
257 | |---------------------------+ | |
258 LAN91C111 | | BANK | RESERVED | | |
259 | |- - - - - - -|- - - - - - -| | > na_lan91c111_size
260 | | RPCR | MIR | | | = 0x00010000
261 | |- - - - - - -|- - - - - - -| | |
262 | | COUNTER | RCR | | |
263 | |- - - - - - -|- - - - - - -| | |
264 | | EPH STATUS | TCR | | |
265 | +---------------------------+ | |
266 0x00910300 --+--LAN91C111_REGISTERS_OFFSET---| |
267 | gap | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200268 0x00910000 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_LAN0_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000269
270- - - - - - - - - - - on chip memory 1 - - - - - - - - - - -
271
272 0x00910000 ---32-----------16|15------------0-
273 | : | \
274 | : | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200275 onchip RAM | : | > CONFIG_SYS_NIOS_CPU_RAM_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000276 | : | | = 0x00010000
277 | : | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200278 0x00900000 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_RAM_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000279
280- - - - - - - - - - - external memory 1 - - - - - - - - - - - - - - - - - - -
281
282 0x00900000 ---32-----------16|15------------0-
283 0x00900000 --+32-----------16|15------------0+
284 | . | \ \
285 | . | | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200286 | . | | > CONFIG_SYS_NIOS_CPU_VEC_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000287 | . | | | = 0x00000100
288 | . | | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200289 0x008fff00 |- - - - - - - - - - - - - - - -+-|- CONFIG_SYS_NIOS_CPU_VEC_BASE
290 0x008fff00 |- - - - - - - - - - - - - - - -+-|- CONFIG_SYS_NIOS_CPU_STACK
wdenkc935d3b2004-01-03 19:43:48 +0000291 | . | | \
292 | . | | |
293 | . | | > stack area
294 | . | | |
295 | . | | V
296 | . | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200297 SRAM | . | > CONFIG_SYS_NIOS_CPU_SRAM_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000298 | . | | = 0x00100000
299 | | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200300 0x00800000 ---32-----------16|15------------0- CONFIG_SYS_NIOS_CPU_SRAM_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000301 0x00800000 ---8-------------4|3-------------0-
302 | sector 127 | \
303 + 0x7f0000 |- - - - - - - - - - - - - - - -| |
304 | : | |
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200305 Flash |- - - - : - - - -| > CONFIG_SYS_NIOS_CPU_FLASH_SIZE
wdenkc935d3b2004-01-03 19:43:48 +0000306 | sector 1 : | | = 0x00800000
307 + 0x010000 |- - - - - - - - - - - - - - - -| |
308 | sector 0 (size = 0x10000) | /
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200309 0x00000000 ---8-------------4|3-------------0- CONFIG_SYS_NIOS_CPU_FLASH_BASE
wdenkc935d3b2004-01-03 19:43:48 +0000310
311
312===============================================================================
313 F L A S H M E M O R Y A L L O C A T I O N
314===============================================================================
315
316 0x00800000 ---8-------------4|3-------------0-
317 | : | \
318 | : | |
319 SAFE | : | > 2 MByte
320 FPGA conf. | : | | (NOT usable by software)
321 | : | /
322 0x00600000 --+- - - - - - - -:- - - - - - - -+-
323 | : | \
324 | : | |
325 USER | : | > 2 MByte
326 FPGA conf. | : | | (NOT usable by software)
327 | : | /
328 0x00400000 --+- - - - - - - -:- - - - - - - -+-
329 | : | \
330 | : | |
331 WEB pages | : | > 2 MByte
332 | : | | (provisory usable)
333 | : | /
334 0x00200000 --+- - - - - - - -:- - - - - - - -+-
335 | : | \
336 | : | |
337 | : | > 2 MByte free for use
338 0x00040000 --+- - - - - - - -:- - - - - - - -+-|- u-boot _start()
339 | : | /
340 0x00000000 ---8-------------4|3-------------0-
341
342
343===============================================================================
344 R E F E R E N C E S
345===============================================================================
346[1] http://www.altera.com/literature/manual/mnl_nios_board_stratix_1s40.pdf
347[2] http://www.altera.com/literature/ds/ds_nios_uart.pdf
348[3] http://www.altera.com/literature/ds/ds_nios_timer.pdf
349[4] http://www.altera.com/literature/ds/ds_nios_pio.pdf
350[5] http://www.opencores.org/projects/ata/
351 http://www.t13.org/index.html
352
353
354===============================================================================
355Stephan Linz <linz@li-pro.net>