Vous êtes sur la page 1sur 45

Horia Cucu

Speech & Dialogue Research Laboratory


Faculty of Electronics, Telecommunications and Information Technology
University POLITEHNICA of Bucharest
1.1 Example #1
Overview of a CISC, General Purpose
Microprocessor Core

General Purpose Registers (GPRs) Arithmetic and Logic Unit (ALU)


Memory Data Register (DR) Memory Addressing Control Unit
Memory Address Registers (AR) Timing and Control Unit (TCU)
18.05.2017 Microprocessors Architecture 4
Instruction Execution Timing
Premises
Busses
8-bit internal and external data bus
16-bit external address bus
Memory
Linear memory organization
16-bit physical addresses
8-bit memory locations
Registers
8-bit, general purpose registers: R1, , R6; can be concatenated
8-bit special function registers: A (accumulator), F (flags), DR
(data reg), IR (instruction reg), ATEMP, TEMP, AUX1, AUX2
16-bit special function registers: PC, SP, IX, RA

18.05.2017 Microprocessors Architecture 5


Instruction Execution Timing Example
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1
M5. Read operand 2 and Execute
M6. Write result

18.05.2017 Microprocessors Architecture 6


Machine Cycle 1: Fetch
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: addrlow addrhigh data
code
6 machine cycles: (00h) (20h) (50h)

M1. Fetch and Decode


T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1
M5. Read operand 2 and Execute
M6. Write result

18.05.2017 Microprocessors Architecture 7


Machine Cycle 1: Fetch

T1. (AR) <- (PC), MEM-READ

18.05.2017 Microprocessors Architecture 8


Machine Cycle 1: Fetch

T2. (PC) <- (PC) + 1, (DR) <- ((AR))

18.05.2017 Microprocessors Architecture 9


Machine Cycle 1: Fetch

T3. (IR) <- (DR)

18.05.2017 Microprocessors Architecture 10


Machine Cycle 1: Fetch

T4. decode instruction code

18.05.2017 Microprocessors Architecture 11


Machine Cycle 2: Read Address
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX2) <- (DR)
M3. Read address (most significant byte)
M4. Read operand 1
M5. Read operand 2 and Execute
M6. Write result

18.05.2017 Microprocessors Architecture 12


Machine Cycle 2: Read Address

T1. (AR) <- (PC), MEM-READ

18.05.2017 Microprocessors Architecture 13


Machine Cycle 2: Read Address

T2. (PC) <- (PC) + 1, (DR) <- ((AR))

18.05.2017 Microprocessors Architecture 14


Machine Cycle 2: Read Address

T3. (AUX2) <- (DR)

18.05.2017 Microprocessors Architecture 15


Machine Cycle 3: Read Address
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX1) <- (DR)
M4. Read operand 1
M5. Read operand 2 and Execute
M6. Write result

18.05.2017 Microprocessors Architecture 16


Machine Cycle 3: Read Address

T1. (AR) <- (PC), MEM-READ

18.05.2017 Microprocessors Architecture 17


Machine Cycle 3: Read Address

T2. (PC) <- (PC) + 1, (DR) <- ((AR))

18.05.2017 Microprocessors Architecture 18


Machine Cycle 3: Read Address

T3. (AUX1) <- (DR)

18.05.2017 Microprocessors Architecture 19


Machine Cycle 4: Read Operand 1
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (A) <- (DR)
M5. Read operand 2 and Execute
M6. Write result

18.05.2017 Microprocessors Architecture 20


Machine Cycle 4: Read Operand 1

T1. (AR) <- (PC), MEM-READ

18.05.2017 Microprocessors Architecture 21


Machine Cycle 4: Read Operand 1

T2. (PC) <- (PC) + 1, (DR) <- ((AR))

18.05.2017 Microprocessors Architecture 22


Machine Cycle 4: Read Operand 1

T3. (A) <- (DR)

18.05.2017 Microprocessors Architecture 23


Machine cycle 5: Read operand 2 and Execute
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1
M5. Read operand 2 and Execute
T1. (AR) <- (AUX1, AUX2), MEM-READ
T2. (DR) <- ((AR))
T3. (A) <- (A) + (DR)
M6. Write result

18.05.2017 Microprocessors Architecture 24


Machine cycle 5: Read operand 2 and Execute

T1. (AR) <- (AUX1, AUX2), MEM-READ

18.05.2017 Microprocessors Architecture 25


Machine cycle 5: Read operand 2 and Execute

T2. (DR) <- ((AR))

18.05.2017 Microprocessors Architecture 26


Machine cycle 5: Read operand 2 and Execute

T3. (A) <- (A) + (DR)

18.05.2017 Microprocessors Architecture 27


Machine Cycle 6: Write Result
Instruction example: (2000h) <- (2000h) + 50h
Instruction format: code
addrlow addrhigh data

(00h) (20h) (50h)
6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1
M5. Read operand 2 and Execute
M6. Write result
T1. (DR) <- (A)
T2. (AR) <- (AUX1, AUX2), MEM-WRITE

18.05.2017 Microprocessors Architecture 28


Machine Cycle 6: Write Result

T1. (DR) <- (A)

18.05.2017 Microprocessors Architecture 29


Machine Cycle 6: Write Result

T2. (AR) <- (AUX1, AUX2), MEM-WRITE

18.05.2017 Microprocessors Architecture 30


1.2 Example #2
Instruction Execution Timing Example
Instruction example: (R1) <- (R3)
Instruction format: code

1 machine cycle:
M1. Fetch and Decode
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
Execute
T1. (TEMP) <- (R3)
T2. (R1) <- (TEMP)

18.05.2017 Microprocessors Architecture 32


1.3 Example #3
Instruction Execution Timing Example
Instruction example: (A) <- (A) + (R1)
Instruction format: code

1 machine cycle:
M1. Fetch and Decode
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
Execute
T1. (TEMP) <- (R1), (ATEMP) <- (A)
T2. (A) <- (ATEMP) + (TEMP)

18.05.2017 Microprocessors Architecture 34


1.4 Example #4
Instruction Execution Timing Example
Instruction example: (A) <- (A) + ((R5, R6))
Instruction format: code
3 machine cycles:
M1. Fetch and Decode
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
M2. Read operand
T1. (AR) <- (R5, R6), MEM-READ

T2. (DR) <- ((AR))
T3. (TEMP) <- (RD), (ATEMP) <- (A)
M3. Execute
(A) <- (ATEMP) + (TEMP)

18.05.2017 Microprocessors Architecture 36


1.5 Example #5
Instruction Execution Timing Example
Instruction example: (A) <- (2000h)
Instruction format: code
addrlow addrhigh

(00h) (20h)
4 machine cycles:
M1. Fetch and Decode
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand

18.05.2017 Microprocessors Architecture 38


Instruction Execution Timing Example
Instruction example: (A) <- (2000h)
Instruction format: code
addrlow addrhigh

(00h) (20h)
4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX2) <- (RD)
M3. Read address (most significant byte)
M4. Read operand

18.05.2017 Microprocessors Architecture 39


Instruction Execution Timing Example
Instruction example: (A) <- (2000h)
Instruction format: code
addrlow addrhigh

(00h) (20h)
4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX1) <- (RD)
M4. Read operand

18.05.2017 Microprocessors Architecture 40


Instruction Execution Timing Example
Instruction example: (A) <- (2000h)
Instruction format: code
addrlow addrhigh

(00h) (20h)
4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand
T1. (AR) <- (AUX1, AUX2), MEM-READ
T2. (DR) <- ((AR))
T3. (A) <- (RD)

18.05.2017 Microprocessors Architecture 41


1.6 Example #6
Instruction Execution Timing Example
Instruction example: (PC) <- 0100h
Instruction format: code
datalow datahigh

(00h) (01h)
3 machine cycles:
M1. Fetch and Decode
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (IR) <- (DR)
T4. decode instruction code
M2. Read data (least significant byte)
M3. Read data (most significant byte) and Execute

18.05.2017 Microprocessors Architecture 43


Instruction Execution Timing Example
Instruction example: (PC) <- 0100h
Instruction format: code
datalow datahigh

(00h) (01h)
3 machine cycles:
M1. Fetch and Decode
M2. Read data(least significant byte)
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX2) <- (RD)
M3. Read data (most significant byte) and Execute

18.05.2017 Microprocessors Architecture 44


Instruction Execution Timing Example
Instruction example: (PC) <- 0100h
Instruction format: code
datalow datahigh

(00h) (01h)
3 machine cycles:
M1. Fetch and Decode
M2. Read data (least significant byte)
M3. Read data (most significant byte) and Execute
T1. (AR) <- (PC), MEM-READ
T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX1) <- (RD)
T4. (PC) <- (AUX1, AUX2)

18.05.2017 Microprocessors Architecture 45

Vous aimerez peut-être aussi