|
|
ECO32 Architecture
|
ECO32 Architecture
|
==================
|
==================
|
|
|
General
|
General
|
-------
|
-------
|
|
|
The ECO32 is a general purpose 32-bit integer processor.
|
The ECO32 is a general purpose 32-bit integer processor.
|
It is a big endian machine with a byte addressable memory.
|
It is a big endian machine with a byte addressable memory.
|
32 integer registers (each 32 bits wide) are provided
|
32 integer registers (each 32 bits wide) are provided
|
within the CPU. The data path is 32 bits wide. Each machine
|
within the CPU. The data path is 32 bits wide. Each machine
|
instruction is stored in a single 32 bit word. Addresses as
|
instruction is stored in a single 32 bit word. Addresses as
|
generated by a program are 32 bits wide.
|
generated by a program are 32 bits wide.
|
|
|
The CPU can operate in one of two modes, kernel or user mode.
|
The CPU can operate in one of two modes, kernel or user mode.
|
When running in user mode, certain operations are illegal
|
When running in user mode, certain operations are illegal
|
and result in an exception when the program tries to execute
|
and result in an exception when the program tries to execute
|
such an operation.
|
such an operation.
|
|
|
Memory addresses as generated by a running program are virtual
|
Memory addresses as generated by a running program are virtual
|
addresses; a memory management unit (which is part of the CPU)
|
addresses; a memory management unit (which is part of the CPU)
|
converts these into physical addresses. The unit of translation
|
converts these into physical addresses. The unit of translation
|
is called a page. Pages are 4096 bytes in size. The hardware
|
is called a page. Pages are 4096 bytes in size. The hardware
|
support for paging is minimalistic: only a TLB is provided.
|
support for paging is minimalistic: only a TLB is provided.
|
This implies a wide range of possibilities for the operating
|
This implies a wide range of possibilities for the operating
|
system designer how to manage page tables.
|
system designer how to manage page tables.
|
|
|
The ECO32 is a RISC processor strongly resembling MIPS.
|
The ECO32 is a RISC processor strongly resembling MIPS.
|
It references memory (and thus I/O) only by load and store
|
It references memory (and thus I/O) only by load and store
|
instructions. Instructions operating on data usually come
|
instructions. Instructions operating on data usually come
|
in two forms: either with two source registers and a target
|
in two forms: either with two source registers and a target
|
register, or a 16 bit wide immediate constant (coded within
|
register, or a 16 bit wide immediate constant (coded within
|
the instruction) instead of the second source register. All
|
the instruction) instead of the second source register. All
|
operations on data are carried out on all 32 bits ("word")
|
operations on data are carried out on all 32 bits ("word")
|
in parallel; the load and store instructions can also transfer
|
in parallel; the load and store instructions can also transfer
|
16 bits ("half-word") and 8 bits ("byte"). Memory access to
|
16 bits ("half-word") and 8 bits ("byte"). Memory access to
|
words must be aligned on word boundaries (addresses are evenly
|
words must be aligned on word boundaries (addresses are evenly
|
divisible by 4); access to half-words must be aligned on
|
divisible by 4); access to half-words must be aligned on
|
half-word boundaries (addresses are evenly divisible by 2).
|
half-word boundaries (addresses are evenly divisible by 2).
|
The load instructions dealing with half-words and bytes can
|
The load instructions dealing with half-words and bytes can
|
either sign-extend their data or zero-extend it. All the load
|
either sign-extend their data or zero-extend it. All the load
|
and store instructions do only use one single addressing mode.
|
and store instructions do only use one single addressing mode.
|
The memory address is computed as the sum of the contents of
|
The memory address is computed as the sum of the contents of
|
a general purpose register and a sign-extended 16 bit immediate
|
a general purpose register and a sign-extended 16 bit immediate
|
offset coded within the instruction.
|
offset coded within the instruction.
|
|
|
|
|
Physical Address Space Utilisation
|
Physical Address Space Utilisation
|
----------------------------------
|
----------------------------------
|
|
|
The main memory extends from address 0 to MEMORY_SIZE,
|
The main memory extends from address 0 to MEMORY_SIZE,
|
which has an upper limit of 512 MB. The ROM is located
|
which has an upper limit of 512 MB. The ROM is located
|
at 0x20000000; its size, ROM_SIZE, is at most 256 MB.
|
at 0x20000000; its size, ROM_SIZE, is at most 256 MB.
|
The I/O is memory-mapped and located at 0x30000000; its
|
The I/O is memory-mapped and located at 0x30000000; its
|
size is again at most 256 MB. The I/O address space is
|
size is again at most 256 MB. The I/O address space is
|
divided evenly into 256 devices; each device may occupy
|
divided evenly into 256 devices; each device may occupy
|
up to 1 MB of address space.
|
up to 1 MB of address space.
|
|
|
|
|
Virtual Address Space Utilisation
|
Virtual Address Space Utilisation
|
---------------------------------
|
---------------------------------
|
|
|
|
|
Registers
|
Registers
|
---------
|
---------
|
|
|
The 32 general purpose registers $0..$31 are 32 bits wide. The
|
The 32 general purpose registers $0..$31 are 32 bits wide. The
|
value of $0 is always 0; write operations to this register don't
|
value of $0 is always 0; write operations to this register don't
|
have any effect. Procedure calls place their return address in
|
have any effect. Procedure calls place their return address in
|
register $31. Interrupts and exceptions place the address of the
|
register $31. Interrupts and exceptions place the address of the
|
next instruction (in case of an interrupt) or the address of the
|
next instruction (in case of an interrupt) or the address of the
|
offending instruction (in case of an exception) in register $30.
|
offending instruction (in case of an exception) in register $30.
|
|
|