• Tidak ada hasil yang ditemukan

Lecture 2-NGE greerhkuyu

N/A
N/A
adrian kuman firmansah

Academic year: 2023

Membagikan "Lecture 2-NGE greerhkuyu"

Copied!
31
0
0

Teks penuh

(1)

Microprocessor & interfacing

Lecture 1

MIKROPROSESOR DAN ANTARMUKA

TKI3A3

S1 Teknik Komputer

(2)

OUTLINE

Microprocessor Architectures

• Basic Architecture

• Register Organization

• CISC vs RISC

• X86 Architecture

• ARM Architecture

(3)

Microprocessor

Architectures

(4)

Basic

Machine Cycle

Fetch Instruction à processor reads instruction from memory

Interpret Instruction à decode

instruction to determine what action is required

Fetch Data à reads data from memory or I/O for execution

Process Data à execution such as arithmetic or logic function

Write Data à write data to memory or I/O

Fetch Decode Execute

(5)

Machine Cycle

(6)

Basic

Computer System

Microprocessor

Memory I/O

Data Bus Address Bus Control Bus

(7)

Basic Computer System

(8)

ALU

Arithmetic Operations (+ - x / )

Logic Operations (and, or, not, etc)

There’s an Accumulator!

A B

n n

+ - x / logic

Acc

umulator

(9)

Arithmetic Logic Operation

Subtract is addition using 2’s complement

Multiply is addition and shift left

Divide is addition and shift right

ALU consists of Full Adder and Half Adder plus Shift Register (Remember Logic Circuit!)

(10)

Flags

An effect of operation

To give an information for the next execution

(11)

Zero àactivate when operation result is zero.

1 1 0 0 1 1 0 0

1 1 0 0 1 1 0 0 xor

0 0 0 0 0 0 0 0

(12)

Carry à If bits from addition process result become larger than register capacity

1 1 1 1

1 1 0 0 1 1 0 0

1 1 0 0 1 1 0 0 +

1 0 0 1 1 0 0 0

FE FE + 1 FC

Carry bit

(13)

Overflow àto validate sign number after arithmetic process

1 1 1

+76 0 1 0 0 1 1 0 0

+68 0 1 0 0 0 1 0 0 +

+144 1 0 0 1 0 0 0 0

(14)

I8086/8088 Microprocessor Architecture

ES CS SS DS

4 3 2 1

CONTROL SYSTEM

AH AL BH BL CH CL DH DL

SP BP SI DI

OPERAND FLAGS

C-BUS

IP

ALU

INSTRUCTION STREAM

BYTE QUEUE

A- BUS

BIU

EU

(15)

Register Organization

User-Visible Registers

• Enable the machine- or assembly language programmer to minimize main memory references by optimizing use of registers.

Control and Status Registers

• Used by the control unit to control the

operation of the processor and by privileged, operating system programs to control the execution of programs.

(16)

User-Visible Register

General Purpose

can be assigned to a variety of functions by the programmer

Data

may be used only to hold data and cannot be employed in the calculation of an operand address

Address

may themselves be somewhat general purpose, or they may be devoted to a particular addressing mode

Segment Pointer, Index Register, Stack Pointer

Condition

Flags

(17)

Control and Status Register

There are a variety of processor

registers that are employed to control the operation of the processor.

ØProgram counter (PC): Contains the address of an instruction to be

fetched

ØInstruction register (IR): Contains the instruction most recently fetched

ØMemory address register (MAR):

Contains the address of a location in memory

ØMemory buffer register (MBR):

Contains a word of data to be written to memory or the word most recently read

(18)

Example

(19)

Data

Flow

(20)

X86 Architecture

(21)
(22)
(23)
(24)
(25)

CISC vs RISC

CISC (Complex Instruction Set Computing)

ü Hardware optimized ü Complex instruction

ü Greater machine cycle per instruction e.g. 12 clocks ü Hardware circuitry more

complex

ü Draws greater power consumption

(26)

CISC vs RISC

RISC (Reduce Instruction Set Computing)

• An instruction per cycle

• Operation between register

• Simple addressing mode

• Simple and Fix instruction format

• Need reliable compiler

(27)

ARM Architecture

A moderate array of uniform registers, more than are found on some CISC systems but fewer than are found on many RISC systems.

A load/store model of data processing, in which operations only perform on operands in registers and not directly in memory. All data must be loaded into registers before an operation can be performed; the result can then be used for further processing or

stored into memory.

A uniform fixed-length instruction of 32 bits for the standard set and 16 bits for the

Thumb instruction set.

To make each data processing instruction more flexible, either a shift or rotation can preprocess one of the source registers. To efficiently support this feature, there are separate arithmetic logic unit (ALU) and shifter units.

(28)

ARM Architecture

• A small number of addressing modes with all load/store addressees

determined from registers and

instruction fields. Indirect or indexed addressing involving values in

memory are not used.

• Auto-increment and auto-decrement addressing modes are used to

improve the operation of program loops.

• Conditional execution of instructions minimizes the need for conditional branch instructions, thereby

improving pipeline efficiency, because pipeline flushing is reduced.

(29)
(30)
(31)

Referensi

Dokumen terkait