Upload
rodger-butler
View
225
Download
3
Embed Size (px)
Citation preview
EEC4133Computer Organization &
ArchitectureChapter 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
Chapter Content
• Basics of the Microarchitecture
• Microprocessor Datapath
• Microprocessor Cycle Control– Microprogramming– Hardwiring
Basics of Microarchitecture
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)
The Fetch-Execute Cycle
Fetch
Decode
Load Operands
Execute
Microprocessor Datapath
• 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
High Level View of Microarchitecture
A More Detailed View
Microprocessor Cycle Control
• 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
• [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
• Example of microprogram:
Microprogram
• 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
• 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
• [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
• 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
• Example of HDL defining CU:
Hardwire
• Example of the resulting circuit:
Hardwire