Comp - Arch 2334
Comp - Arch 2334
Comp - Arch 2334
memory
address bus
Harvard Architecture
instruction bus
CPU
data bus
instruction
memory
data
memory
address bus
address bus
CPU
data bus
In the figure above we see two different architectural styles. The Von Neumann architecture is
representative of most computer architectures. The most distinguishing feature of the Von
Neumann computer is that it stores both data and instruction information in the same memory.
The Harvard architecture computer stores instructions and data in separate memory. Many
microcontroller architectures (like ones you would find in a toaster) are Harvard architectures.
As just mentioned, a computer system shown above could not turn on a light or pop your toast
out before it burns. It needs an I/O (input/output) port. Lets add one to a Von Neumann architecture.
memory
address bus
CPU
data bus
I/O
adapter
output
input
Now we have a resonable computer system. It can read instructions from a memory, execute
them, store the results and control external devices. The I/O adapter in the most simple terms
forms a temporary storage area where outputs may be posted and inputs may be held until the
CPU can check them.
Note that we are not talking about PC architecture. A PCs architecture is one example of a
computer architecture, it is not computer architecture in general.
Page 1
Lets explore the CPU of a Von Neumann machine. The CPU is the brain of the computer
where lots of interesting things are happening.
register file
control logic
31
r0
r1
r2
ALU
operand 1 bus
operand 2 bus
results bus
r30
r31
opcode
rs1 rs2 rd
memory data
register
program
counter
memory write
data register
instruction
register
memory address
register
address bus
memory system
The CPU executes a program that is fetched more or less sequentially from the memory system. To execute each instruction a number of steps are taken.
1. Fetch the instruction from the location from memory system specified by the memory
address register into the instruction register.
2. Decode the instruction, and increment the PC.
3. Fetch the operands.
4. Execute the desired operation using the ALU
5. Optionally access memory
6. Store the result in the desired location (could be a register or memory)
The program counter (PC) is a special register that holds the address of the next instruction to
be fetched. To fetch an instruction, the contents of the PC is placed on the memory address bus
and a read of memory is performed. When the instruction returns, it is placed in the instruction
register.
Once the instruction is written into the instruction register, it is decoded to determine what the
instruction is and what action is to be taken. During this time, the PC is incremented to the
Page 2
Page 3
instruction
decode
load instruction
register
fetch
operands
store result
memory
access
execute
RISC
CISC
Instruction size
1 word
1 to 54 bytes
Execution time
1 clock
1 to 100s of cycles
Addressing modes
small
large
small
varies
Instruction count/program
large
smaller
During the nineteen eighties, a great controversy existed over the advantages and disadvantages of each style of architecture. In the end, RISC seems to have to won. Even the notable
surviving CISC architecture, Intels x86 family, has adopted many ideas from the RISC camp
to maintain its performance.
Page 4