You are on page 1of 56

The von Neumann Model

INF1100, UiT

Einar Holsbø, 250920


A higher abstraction from
ç√

logic gates
Quite central conceptually
ç√
Memory stores programs and data
Memory access:
1. Load Memory Address Register
2. If read: get data fromç√ Memory Data Register
ç√
3. If write: put data in MDR
Memory access:
1. Load Memory Address Register
2. If read: get data fromç√ Memory Data Register

3. If write: put data in


ç√MDR
Memory access:
1. Load Memory Address Register
2. If read: get data fromç√ Memory Data Register

3. If write: put data in MDR


Going to need some ways for humans to
get things into/out of memory
Processing unit processes data
Arithmetic Logic Unit:
Does arithmetic
and logical operations
Local registers provide
temporary storage (why?)
The control unit orchestrates
interaction between the other components
Program Counter
points to the next instruction
(details to follow)
Instruction Register
holds the current instruction
(details to follow)
Instructions
The smallest atomic unit of work: it either happens or it does not
ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

It’s all bits as usual


ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

opcode: a code for the operation to be performed


ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

operands: where is the data upon which to op?


ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

Source operands: registers 6 and 2 in this case


ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

Destination operand,
where the result should go (if any)
ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

So: Do R6 + R2, store the result in R6


ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√

So: Do R6 + R2, store the result in R6


(other operations/operands are available)
ç√

Instructions
The smallest atomic unit of work: it either happens or it does not

ç√
The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

ç√

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where it goes


The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from


ç√ memory

5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where it goes


The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

ç√
5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where it goes


The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs


ç√ the operation

6. STORE RESULT: write the result to where it goes


The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs the operation

ç√
6. STORE RESULT: write the result to where it goes
The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where


ç√ it goes
The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where it goes


The instruction cycle
How the Control Unit makes everything go

1. FETCH: fetch the next instruction to be processed

2. DECODE: interpret the opcode and operand(s)

3. EVALUATE ADDRESS: evaluate the memory address(es) needed

4. FETCH OPERANDS: fetch operands from memory

5. EXECUTE: The processing unit performs the operation

6. STORE RESULT: write the result to where it goes

(7) start over


1. FETCH
1. FETCH

Load address of next


instruction into MAR
1. FETCH

Read instruction from MDR


to IR
1. FETCH

ç√
1. FETCH

ç√

Increment PC to point to
next instruction
2. DECODE

ç√
2. DECODE

ç√

What does the opcode say?


2. DECODE

ç√

Which parts here


are relevant?
3. EVALUATE
ADDRESS

ç√
3. EVALUATE
ADDRESS

ç√

These can be offsets from a


base address or something,
need for some manipulation
4. FETCH
OPERANDS

ç√
4. FETCH
OPERANDS

ç√
4. FETCH
OPERANDS

ç√
4. FETCH
OPERANDS

ç√
4. FETCH
OPERANDS

ç√
5. EXECUTE

ç√
5. EXECUTE

Do the thing
ç√
6. STORE
RESULT

ç√
6. STORE
RESULT

ç√
6. STORE
RESULT

ç√
REPEAT UNTIL POWEROFF
ç√

ç√

You might also like