Docsity

Instruction Cycle - Microprocessors and Computer Systems - Lecture Slides, Slides of Microprocessors

Partial preview of the text

Download Instruction Cycle - Microprocessors and Computer Systems - Lecture Slides and more Slides Microprocessors in PDF only on Docsity!

Outline

„

Recap

„

Instruction Cycle & Pipelined Instruction Cycle

„

Flag Registers

„

Intel 8088 Microprocessor

„

Summary

Recap

Buses

„

Parallel signal lines connecting CPU with I/OPorts and memory

„

Types of Buses:^ ‰

Address bus

‰

Data bus

‰

Control bus

Instruction Cycle

„

Instruction Pointer (IP) ‰

One register on CPU used to store theaddress of the upcoming instruction

„

Fetch Cycle ‰

Send address of IP onto the address busand get the instruction from the data bus

„

Execute Cycle ‰

Decode and execute the instruction

Instruction Cycle Structure

„

Bus Interface Unit (BIU) ‰

Respond to all signals that go to the processor

‰

Store the instruction code in instruction queue,enable

pipelined processing of instructions

„

Execution Unit (EU) ‰

Select the registers to operate on and docomputation in arithmetic logic unit (ALU)

‰

Test the

status and control flags

, update the

results to registers

Pipelined Instruction Cycle

„

The approach to speed up the instructionscycle processing in microprocessors.

„

Divide a complex and time-consuming task intoseveral small and single steps to improve thetask processing.

How Pipelined Instruction Cycle works?Think about the “laundry” example:

Doing N loads of laundry, once at a time^ The fact is, doing one load at a time is not smart!

Doing N loads of laundry in

“

pipeline

”

“Pipeline” is a more effective way!

„

A 16-bit flag register indicates some conditionsproduced by the execution of instruction or controlscertain operations of the EU

Flag Registers

Flag Registers (Con

’

t)

„

A flag indicates the result has exceeded the range of thesigned number in the machine.

„

For a 8-bit system, the range of signed number is:

7

7

-1, i.e. -128~0~+

If the result is out of this range, then Overflow!

Overflow Flag

Methods to judge “Overflow” :

„

Judge in Decimal Number,

1000 1000=-1201100 0100=-60(-120)+(-60)=(-180)>(-128), overflow!

„

The overflow only can be caused by the addition of twopositive numbers or negative numbers.Judge Rule: If the addend and augend have the samesign bit, while the sign bit of the result is different, thenOverflow! 1000 1000 and 1100 0100 are negative,the sum 0100 1100 is positive, Overflow!

Overflow Flag (Con

’

t)

Intel 8088 Chip with different pins

„

8088’s Input & Output

Input

Output

DC Characteristic