Title: Computer Design Basics
1Chapter 9
29-2 Datapaths
- Reminding
- A digital system (or a simple computer) contains
datapath unit and control unit. - Datapath
- A set of registers
- Microoperations on these registers
- Control interface
39-2 Datapaths
- The arithmetic/logic unit (ALU) and shifter are
designed to perform the microoperations
(arithmetic and logic). - Shifter is often separated from ALU for shift
operation, but sometimes is implemented in ALU. - The combination of a set of registers with a
shared ALU and shifter and interconnecting path
is the datapath of the system.
4Block diagram of a generic datapath (Fig. 9-1)
G select S 2..0Cin
5Symbol for an n-bit ALU (Fig. 9-2)
6Requirements for ALU and Shifter
- The sets of values must be generated and must
become available on the corresponding control
lines early in the clock cycle. - Binary data from the two source registers must be
propagated through the multiplexers and the ALU
and on into the inputs of the destination
register, all during the remainder of the same
clock. - To achieve fast operations, ALU and shifter are
constructed with combinational logic having
limited number of levels.
79-3 The ALU
- This section introduction the design of ALU
- The basic component of an arithmetic circuit is
a parallel adder
Fig. 9-3 Block diagram of an arithmetic circuit
8Function of arithmetic circuit
G XYCin
9B input logic
- The B input logic in Fig. 9-3 can be implemented
with 4-to-1 multiplexer (How?). - To reduce the gates number, it can be implemented
through logic design of one bit (one stage)
instead of using multiplexer.
10B input logic
- logic design for B input logic (one stage)
11Diagram of a 4-bit arithmetic circuit (Fig. 9-5)
12Logic Circuit Design
Fig 9-6 One stage of logic circuit
13One stage of ALU (Fig. 9-7)
Gi
14Function Table of ALU (Table 9-2)
159-4 The Shifter
- one bit is shifted in a clock
- To shift an operant by mgt1 bit positions, the
shifter should perform a series of m 1-bit
position shift, taking m clock cycle - What is the operation when S is set as 00 (0),
01(1), 10 (2)?
Fig. 9-8
16Barrel shifter
- A combinational circuit
- Shifts or rotates the input data by the number of
bit position specified by a binary value
174-bit Barrel shifter (Fig. 9-9)
Note i positions of left rotation is the same as
2n-i bits of right rotation
189-5 Datapath representation
- Reduce the complexity of the datapath in Fig. 9-1
- A computer with 32 or more registers are common
- Register file a set of registers having common
microoperations performed on them
19Datapath using register file and function unit
(Fig. 9-10)
20Function select
- MF, G and H are coded in terms of FS
- MFF3.F2, G3F3, G2F2, G1F1, G0F0, H1F1, H0F0