1 |
6 |
hellwig |
|
2 |
|
|
ECO32 Architecture
|
3 |
|
|
==================
|
4 |
|
|
|
5 |
|
|
General
|
6 |
|
|
-------
|
7 |
|
|
|
8 |
|
|
The ECO32 is a general purpose 32-bit integer processor.
|
9 |
|
|
It is a big endian machine with a byte addressable memory.
|
10 |
|
|
32 integer registers (each 32 bits wide) are provided
|
11 |
|
|
within the CPU. The data path is 32 bits wide. Each machine
|
12 |
|
|
instruction is stored in a single 32 bit word. Addresses as
|
13 |
|
|
generated by a program are 32 bits wide.
|
14 |
|
|
|
15 |
|
|
The CPU can operate in one of two modes, kernel or user mode.
|
16 |
|
|
When running in user mode, certain operations are illegal
|
17 |
|
|
and result in an exception when the program tries to execute
|
18 |
|
|
such an operation.
|
19 |
|
|
|
20 |
|
|
Memory addresses as generated by a running program are virtual
|
21 |
|
|
addresses; a memory management unit (which is part of the CPU)
|
22 |
|
|
converts these into physical addresses. The unit of translation
|
23 |
|
|
is called a page. Pages are 4096 bytes in size. The hardware
|
24 |
|
|
support for paging is minimalistic: only a TLB is provided.
|
25 |
|
|
This implies a wide range of possibilities for the operating
|
26 |
|
|
system designer how to manage page tables.
|
27 |
|
|
|
28 |
|
|
The ECO32 is a RISC processor strongly resembling MIPS.
|
29 |
|
|
It references memory (and thus I/O) only by load and store
|
30 |
|
|
instructions. Instructions operating on data usually come
|
31 |
|
|
in two forms: either with two source registers and a target
|
32 |
|
|
register, or a 16 bit wide immediate constant (coded within
|
33 |
|
|
the instruction) instead of the second source register. All
|
34 |
|
|
operations on data are carried out on all 32 bits ("word")
|
35 |
|
|
in parallel; the load and store instructions can also transfer
|
36 |
|
|
16 bits ("half-word") and 8 bits ("byte"). Memory access to
|
37 |
|
|
words must be aligned on word boundaries (addresses are evenly
|
38 |
|
|
divisible by 4); access to half-words must be aligned on
|
39 |
|
|
half-word boundaries (addresses are evenly divisible by 2).
|
40 |
|
|
The load instructions dealing with half-words and bytes can
|
41 |
|
|
either sign-extend their data or zero-extend it. All the load
|
42 |
|
|
and store instructions do only use one single addressing mode.
|
43 |
|
|
The memory address is computed as the sum of the contents of
|
44 |
|
|
a general purpose register and a sign-extended 16 bit immediate
|
45 |
|
|
offset coded within the instruction.
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
Physical Address Space Utilisation
|
49 |
|
|
----------------------------------
|
50 |
|
|
|
51 |
|
|
The main memory extends from address 0 to MEMORY_SIZE,
|
52 |
|
|
which has an upper limit of 512 MB. The ROM is located
|
53 |
|
|
at 0x20000000; its size, ROM_SIZE, is at most 256 MB.
|
54 |
|
|
The I/O is memory-mapped and located at 0x30000000; its
|
55 |
|
|
size is again at most 256 MB. The I/O address space is
|
56 |
|
|
divided evenly into 256 devices; each device may occupy
|
57 |
|
|
up to 1 MB of address space.
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
Virtual Address Space Utilisation
|
61 |
|
|
---------------------------------
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
Registers
|
65 |
|
|
---------
|
66 |
|
|
|
67 |
|
|
The 32 general purpose registers $0..$31 are 32 bits wide. The
|
68 |
|
|
value of $0 is always 0; write operations to this register don't
|
69 |
|
|
have any effect. Procedure calls place their return address in
|
70 |
|
|
register $31. Interrupts and exceptions place the address of the
|
71 |
|
|
next instruction (in case of an interrupt) or the address of the
|
72 |
|
|
offending instruction (in case of an exception) in register $30.
|