Вы находитесь на странице: 1из 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)


Memory Data Register (DR)
Memory Address Registers (AR)
27.05.2016

Arithmetic and Logic Unit (ALU)


Memory Addressing Control Unit
Timing and Control Unit (TCU)

Microprocessors Architecture

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
27.05.2016

Microprocessors Architecture

Instruction Execution Timing Example


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

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

27.05.2016

Microprocessors Architecture

addrhigh
(20h)

data
(50h)

Machine Cycle 1: Fetch


Instruction example: (2000h) <- (2000h) + 50h
Instruction format:
addrlow
addrhigh

code
(00h)
(20h)
6 machine cycles:
M1. Fetch and Decode

data
(50h)

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
27.05.2016

Microprocessors Architecture

Machine Cycle 1: Fetch

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

27.05.2016

Microprocessors Architecture

Machine Cycle 1: Fetch

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

27.05.2016

Microprocessors Architecture

Machine Cycle 1: Fetch

T3. (IR) <- (DR)

27.05.2016

Microprocessors Architecture

10

Machine Cycle 1: Fetch

T4. decode instruction code

27.05.2016

Microprocessors Architecture

11

Machine Cycle 2: Read Address


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)

addrhigh
(20h)

data
(50h)

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


27.05.2016

Microprocessors Architecture

12

Machine Cycle 2: Read Address

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

27.05.2016

Microprocessors Architecture

13

Machine Cycle 2: Read Address

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

27.05.2016

Microprocessors Architecture

14

Machine Cycle 2: Read Address

T3. (AUX2) <- (DR)

27.05.2016

Microprocessors Architecture

15

Machine Cycle 3: Read Address


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)

addrhigh
(20h)

data
(50h)

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


27.05.2016

Microprocessors Architecture

16

Machine Cycle 3: Read Address

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

27.05.2016

Microprocessors Architecture

17

Machine Cycle 3: Read Address

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

27.05.2016

Microprocessors Architecture

18

Machine Cycle 3: Read Address

T3. (AUX1) <- (DR)

27.05.2016

Microprocessors Architecture

19

Machine Cycle 4: Read Operand 1


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

6 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand 1

addrhigh
(20h)

data
(50h)

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


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

M5. Read operand 2 and Execute

M6. Write result


27.05.2016

Microprocessors Architecture

20

Machine Cycle 4: Read Operand 1

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

27.05.2016

Microprocessors Architecture

21

Machine Cycle 4: Read Operand 1

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

27.05.2016

Microprocessors Architecture

22

Machine Cycle 4: Read Operand 1

T3. (A) <- (DR)

27.05.2016

Microprocessors Architecture

23

Machine cycle 5: Read operand 2 and Execute


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

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

addrhigh
(20h)

data
(50h)

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


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

M6. Write result


27.05.2016

Microprocessors Architecture

24

Machine cycle 5: Read operand 2 and Execute

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

27.05.2016

Microprocessors Architecture

25

Machine cycle 5: Read operand 2 and Execute

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

27.05.2016

Microprocessors Architecture

26

Machine cycle 5: Read operand 2 and Execute

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

27.05.2016

Microprocessors Architecture

27

Machine Cycle 6: Write Result


Instruction example: (2000h) <- (2000h) + 50h

Instruction format:

code

addrlow
(00h)

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

27.05.2016

addrhigh
(20h)

data
(50h)

T1. (DR) <- (A)


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

Microprocessors Architecture

28

Machine Cycle 6: Write Result

T1. (DR) <- (A)

27.05.2016

Microprocessors Architecture

29

Machine Cycle 6: Write Result

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

27.05.2016

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

27.05.2016

T1. (TEMP) <- (R3)


T2. (R1) <- (TEMP)

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

27.05.2016

T1. (TEMP) <- (R1), (ATEMP) <- (A)


T2. (A) <- (ATEMP) + (TEMP)

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)

27.05.2016

Microprocessors Architecture

36

1.5 Example #5

Instruction Execution Timing Example


Instruction example: (A) <- (2000h)

Instruction format:

code

4 machine cycles:
M1. Fetch and Decode

addrlow
(00h)

addrhigh
(20h)

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

27.05.2016

Microprocessors Architecture

38

Instruction Execution Timing Example


Instruction example: (A) <- (2000h)

Instruction format:

code

addrlow
(00h)

4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)

addrhigh
(20h)

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


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

M3. Read address (most significant byte)


M4. Read operand

27.05.2016

Microprocessors Architecture

39

Instruction Execution Timing Example


Instruction example: (A) <- (2000h)

Instruction format:

code

addrlow
(00h)

4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)

addrhigh
(20h)

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


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

M4. Read operand

27.05.2016

Microprocessors Architecture

40

Instruction Execution Timing Example


Instruction example: (A) <- (2000h)

Instruction format:

code

addrlow
(00h)

4 machine cycles:
M1. Fetch and Decode
M2. Read address (least significant byte)
M3. Read address (most significant byte)
M4. Read operand

27.05.2016

addrhigh
(20h)

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


T2. (DR) <- ((AR))
T3. (A) <- (RD)

Microprocessors Architecture

41

1.6 Example #6

Instruction Execution Timing Example


Instruction example: (PC) <- 0100h

Instruction format:

code

3 machine cycles:
M1. Fetch and Decode

datalow
(00h)

datahigh
(01h)

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

27.05.2016

Microprocessors Architecture

43

Instruction Execution Timing Example


Instruction example: (PC) <- 0100h

Instruction format:

code

addrlow
(00h)

3 machine cycles:
M1. Fetch and Decode
M2. Read data(least significant byte)

addrhigh
(01h)

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


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

M3. Read data (most significant byte) and Execute

27.05.2016

Microprocessors Architecture

44

Instruction Execution Timing Example


Instruction example: (PC) <- 0100h

Instruction format:

code

addrlow
(00h)

addrhigh
(01h)

3 machine cycles:
M1. Fetch and Decode
M2. Read data (least significant byte)
M3. Read data (most significant byte) and Execute

27.05.2016

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


T2. (PC) <- (PC) + 1, (DR) <- ((AR))
T3. (AUX1) <- (RD)
T4. (PC) <- (AUX1, AUX2)

Microprocessors Architecture

45

Вам также может понравиться