Post on 06-Apr-2018
transcript
8/3/2019 SlideChap6 editted
1/16
Principles of Computer Architecture
ALU & MICROARHITECTURE
DESIGN
8/3/2019 SlideChap6 editted
2/16
High Level View of Microarchitecture
The microarchitecture consists of the control unit andthe programmer-visible registers, functional units such as
the ALU, and any additional registers that may be required
by the control unit.
8/3/2019 SlideChap6 editted
3/16
Basics of the Microarchitecture
The Fetch-Execute Cycle
The steps that the control unit carries out in executing a
program are:
(1) Fetch the next instruction to be executed from memory.
(2) Decode the opcode.
(3) Read operand(s) from main memory, if any.
(4) Execute the instruction and store results, if any.
(5) Go to step 1.
8/3/2019 SlideChap6 editted
4/16
Designing A Microarchitecture
Hardware component:-
ALU
Register for Source Operand
Register for Destination Operand
Bus for Data Transfer Register to ALU(read)
Bus for Data Transfer ALU to Register(write)
8/3/2019 SlideChap6 editted
5/16
High Level View
8/3/2019 SlideChap6 editted
6/16
Basics of the Microarchitecture
8/3/2019 SlideChap6 editted
7/16
Designing A Microarchitecture Using
ALU 74181R0
R1
R2
R3
ENB
ENB
ENB
ENB
ENB
ENB
ENB
ENB
ABus BBus
ALU74181
S3S2S1S0
CBus
WriteEnable
C Decoder A Decoder BDecoder
8/3/2019 SlideChap6 editted
8/16
ALU 74181
Refer toALU74181.doc
Microword formatCmux M C S3S2S1S0 Abus Bbus Cbus
0 x x xxxx xx xx 00 Load R0
0 x x xxxx xx xx 01 Load R1
1 0 0 1001 0 1 10 R2=R0 plus R1
8/3/2019 SlideChap6 editted
9/16
8/3/2019 SlideChap6 editted
10/16
Expanding the ALUALU
1BitY1A1
B1
ALU
1BitY2A2
B2
ALU
1BitY3A3
B3
ALU1Bit
Y4A4
B4
F1F0
8/3/2019 SlideChap6 editted
11/16
Creating the DatapathR0n
2
1. Input 2 to Cbus.
2. Select 0 to choose R0.
3. Press S1 to load to R0.
R1 n 3
1. Input 3 to Cbus.
2. Select 1 to choose R1.3. Press S1 to load to R1.
Abus Decodern R0
Select 0 to choose R0.
Bbus Decodern R1Select 1 to choose R1.
R0
R1
R2
R3
ENB
ENB
ENB
ENB
ENB
ENB
ENB
ENB
ABus BBus
ALU
74181
S3S2S1S0
CBus
Write
Enable
C Decoder A Decoder BDecoder
8/3/2019 SlideChap6 editted
12/16
Creating the control sequence
Cmux = to choose data from memory or ALU 0 input to Cbus
1 ALU output to Cbus
M, C & S3S2S1S0 = input for ALU 74181 Abus = register to Abus.
Bbus = register to Bbus.
Cbus = Cbus to Register.
Cmux M C S3S2S1S0 Abus Bbus Cbus
1bit 1bit 1bit 4bit 2bit 2bit 2bit
8/3/2019 SlideChap6 editted
13/16
Example 1 Determine the control sequence for
R2
8/3/2019 SlideChap6 editted
14/16
Example 2
Determine the control sequence forR3
8/3/2019 SlideChap6 editted
15/16
Example 3
Determine the control sequence for R2
8/3/2019 SlideChap6 editted
16/16
or
2R1R2R1plus0R2R
0R0R
21R
30R
n
n
n
n
n