20
EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Embed Size (px)

Citation preview

Page 1: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

EEC4133Computer Organization &

ArchitectureChapter 5: Datapath & Control

by Muhazam Mustapha, April 2014

Page 2: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Learning Outcome

• By the end of this chapter, students are expected to be able to understand and explain the components and controls of a microprocessor’s datapath system

Most of the material in this slide set is adopted from Murdocca & Heuring 2007

Page 3: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Chapter Content

• Basics of the Microarchitecture

• Microprocessor Datapath

• Microprocessor Cycle Control– Microprogramming– Hardwiring

Page 4: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Basics of Microarchitecture

Page 5: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

The Fetch-Execute Cycle

• The steps that the control unit carries out in executing a program are:– Fetch the next instruction to be executed from

memory– Decode the opcode– Read operand(s) from main memory, if any– Execute the instruction and store results, if

any– Go to first step (fetch)

Page 6: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

The Fetch-Execute Cycle

Fetch

Decode

Load Operands

Execute

Page 7: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Microprocessor Datapath

Page 8: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• The microarchitecture consists of the control unit and the programmer-visible registers, functional units such as the ALU, and any additional registers that may be required by the control unit

• These are basically the datapath of the microprocessor

High Level View of Microarchitecture

Page 9: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

High Level View of Microarchitecture

Page 10: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

A More Detailed View

Page 11: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

Microprocessor Cycle Control

Page 12: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Flow of user’s application is controlled by assembly program

• Flow of fetch-execute cycle is controlled by microprogram– One of the way to control the flow of fetch-

cycle is by microprogramming – the other way is by hardwiring

• Control Unit internal circuitry runs microprograms transparently

Microprogram

Page 13: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• [Definition] Microprogramming is the scheme to control the control unit (CU) of a microprocessor in running fetch-execute cycle by having assembly like instructions

• With microprogram CU directs the flow of data in the datapath

• Microprogramming has instruction set just like assembly language, but it is FIXED for executing certain assembly instruction

Microprogram

Page 14: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Example of microprogram:

Microprogram

Page 15: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Since the pattern of the execution of fetch-execute cycle is short and almost similar from one assembly instruction to another, often times there are many repeated patterns in the microprogram

• These repeated patterns in microprograms are coded as nanoprograms

Nanoprogram

Page 16: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Hence during the actual fetch-execute cycle, the nanoprograms are being executed in place of microprograms when the repetitions are encountered

• [Definition] Nanoprogramming is the scheme to replace the repeated sequences in microprogramming with one single instruction

Nanoprogram

Page 17: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• [Definition] Hardwiring is the scheme to control the control unit (CU) of a microprocessor in running fetch-execute cycle by having dedicated circuitry that performs the proper state machine to direct the data flow through the microprocessor’s datapath

Hardwire

Page 18: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Hardwiring is done by designing the circuit using an HDL

• The HDL will define how the CU should direct the data flow in the datapath based on the input from the datapath

Hardwire

Page 19: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Example of HDL defining CU:

Hardwire

Page 20: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014

• Example of the resulting circuit:

Hardwire