You are on page 1of 21

Advanced Computer

Architecture
Chapter 1:
Microprocessors
Part 2 Course intended for 1st Year Master Students

Leila Benarous
Computer Science Department
University Amar Telidji
Laghouat - Algeria
Examples of microprocessors

2
3
Clock
▪ Defines the basic cycle used to synchronise each
step of the research and the execution cycles.
▪ CPU Cycle: is the minimal time used to execute
an instruction including both of its phases
(search+execution).

4
Sequencer

▪ Wired (hardware)

▪ Firmware (microprogrammed)

5
Sequencer
▪ Wired (hardware): it is faster but
harder to make. Every instruction is
represented by circuits (set of
connected logical gates).
▪ Used in devices that are based in
RISC architecture
6
Sequencer
▪ Firmware (microprogrammed) : it
is easier to make and more flexible.
The micro-instructions are saved in
a ROM.
▪ Used in devices that are based on
CISC architecture.
7
Microprocessor Components:
Registers
▪ A register is a word memory within the processor

▪ Register Types:
▫ Functioning Registers
▫ Instruction Pointer (or Program Counter): It contains
the @ of the next instruction to fetch from memory after
successfully finishing the execution of the current one.
8
Microprocessor Components:
Register Types
▫ Functioning Registers
▫ Instruction Register: It contains the @ of instruction
that is just about to be executed.
▫ Accumulator: It is found in different numbers within
the ALU of the processor. It stores Operand/result before
it’s saved in memory.

9
Microprocessor Components:
Register Types
▫ Functioning Registers
▫ Memory Data Register (MDR or MR): contains the
data to be read from or written in the @ location.
▫ Memory Address Register: contains the @ of the
location to be accessed

10
Microprocessor Components:
Register Types
▫ General Purposes Registers: They are accessed by
programmers of assembly language. They either save
temporal results or frequently used ones without having to
store and fetch them back and forth everytime. Therefore,
the GPR usage reduces the execution time making the
processor performance faster and more efficient.
▫ Notation: R0, R1, R3, …..
11
Microprocessor Components:
Register Types
▫ Index Registers (XR): used to parse the tables easily. They can
be incremented or decremented.
▫ Stack Pointer: It simulates the stack in the memory. It stores
the @ of the last item put into the stack (Last In First Out).
▫ Program Status Word: a set of flags (bits) representing a
particular status. Such as: C: carry flag; Z: zero flag; O:
overflow flag. They are used to test results in branches (Jump)
12
Microprocessor Components:
Buses
▫ While we explained the processors components, No one asked
about how the info (instruction/data) travel in Processors ?

▫ So ….., How does the data/instruction between the

processors components?
▫ They travel through the internal buses: input/output buses.

13
Questions
?
Memory Access Model
▪ The processor executes instructions on operands.

▪ A Simple Instruction example: A=B+C

▪ How do we access these A,B & C memory cells?


▫ Access them directly
▫ Use GPRs
▫ Use ALU accumulators…
15
Memory Access Model
▪ Notation (m, n)

▪ m: maximum number of operands per instruction

▪ n: maximum number of operands per instruction


that are directly accessed from memory.
▪ Back to our previous example: A=B+C

16
Memory Access Model
▪ In the (3,3) model aka Memory-Memory Model
▫ Add @A, @B, @C

▪ In the (2,1) model aka Memory-Register Model


▫ Load R1, @B –> R1:= B
▫ Add R1, @C -> R1:=R1+C
▫ Store R1, @A -> A:=R1
17
Memory Access Model
▪ In the (2,0) model direct calculation using registers
(special case of (2,1) model)
▫ Add R1, R2

▪ In the (1,1) model aka Memory-Accumulator Model


▫ Load @B –> Acc:= B
▫ Add @C -> Acc:=Acc + C
▫ Store @A -> A:=acc
18
Memory Access Model
▪ In the (0,0) model aka Stack Model
▫ Push @B
▫ Push @C
▫ Add
▫ Pop @A

19
Memory Access Model
▪ In the (3,0) model aka Register-Register Model or
Load/Store Model (used in RISC Processors)
▫ Load R1, @B
▫ Load R2, @C
▫ Add R3, R1, R2
▫ Store R3, @A
20
Questions
?
21

You might also like