summaryrefslogtreecommitdiff
path: root/README.leon2
blob: c79a4e305bcbcfe9925a8bdcfb8963bb56387d98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

1. LEON2 emulation

The file 'leon2.c' contains a model of simple LEON2 sub-system. It
contains 16 Mbyte ROM and 16 Mbyte RAM. Standard peripherals
such as interrupt controller, UART and timer are provided.
The model can execute leon2 binaries that do not require an
MMU.

To start sis in Leon2 mode, add the -leon2 switch. In gdb,
use 'target sim -leon2' .

1.1 UART

One LEON2 UART is emulated, and is located at address 0x80000070.
The following registers are implemented:

- UART RX and TX register	(0x80000070)
- UART status register		(0x80000074)

The UART generates interrupt 3.

1.2 Timer unit

The LEON2 timer unit is emulated and located at address 0x80000040.
It is configured with two timers and separate interrupts (8 and 9).
The scaler is configured to 16 bits, while the counters are 32 bits.

1.3 Interrupt controller

The interrupt controller is implemented as described in the
LEON2 IP manual, with the exception of the interrupt level register.
Secondary interrupts are not supported. The registers are located
at address 0x80000090.

1.5 Memory interface

The following memory areas are valid for the Leon3 simulator:

0x00000000 - 0x01000000		ROM (16 Mbyte, loaded at start-up)
0x40000000 - 0x41000000		RAM (16 Mbyte, loaded at start-up)
0x80000000 - 0x81000000		APB bus, including plug&play
0xFFFFF000 - 0xFFFFFFFF		AHB plug&play area

Access to non-existing memory will result in a memory exception trap.

1.8 Power-down mode

The Leon2 power-down register (0x80000018) is supported. When power-down is
entered, time is skipped forward until the next event in the event queue.
However, if the simulator event queue is empty, power-down mode is not
entered since no interrupt would be generated to exit from the mode. A
Ctrl-C in the simulator window will exit the power-down mode.