![Page 1: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/1.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/4.jpg)
Basics of Microarchitecture
![Page 5: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/6.jpg)
The Fetch-Execute Cycle
Fetch
Decode
Load Operands
Execute
![Page 7: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/7.jpg)
Microprocessor Datapath
![Page 8: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/8.jpg)
• 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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/9.jpg)
High Level View of Microarchitecture
![Page 10: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/10.jpg)
A More Detailed View
![Page 11: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/11.jpg)
Microprocessor Cycle Control
![Page 12: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/12.jpg)
• 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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/13.jpg)
• [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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/14.jpg)
• Example of microprogram:
Microprogram
![Page 15: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/15.jpg)
• 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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/16.jpg)
• 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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/17.jpg)
• [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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/18.jpg)
• 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](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/19.jpg)
• Example of HDL defining CU:
Hardwire
![Page 20: EEC4133 Computer Organization & Architecture Chapter 5: Datapath & Control by Muhazam Mustapha, April 2014](https://reader035.vdocuments.net/reader035/viewer/2022081603/56649f345503460f94c51f34/html5/thumbnails/20.jpg)
• Example of the resulting circuit:
Hardwire