Professional Documents
Culture Documents
Computer
Architecture Architecture I
I
Computer
Design Basics
DR. Abduljalil Radman
Taiz University
2020
Computer Design Basics
The separation of a design into a datapath that implements
microoperations and a control unit that determines the
sequence of microoperations was introduced in previous
parts.
In this part, we continue by defining a generic computer
datapath that implements register transfer microoperations
and serves as a framework for the design of detailed
processing logic.
The concept of a control word provides a tie between the
datapath and the control unit associated with it.
Generic Datapath
Instead of having each individual register perform its microoperations directly, computer
systems often employ a number of storage registers in conjunction with a shared
operation unit called an arithmetic/logic unit, abbreviated ALU.
To perform a microoperation, the contents of specified source registers are applied to the
inputs of the shared ALU.
The ALU performs an operation, and the result of this operation is transferred to a
destination register.
With the ALU as a combinational circuit, the entire register transfer operation from the
source registers, through the ALU, and into the destination register is performed during
one clock cycle.
The shift operations are often performed in a separate unit, but sometimes these
operations are also implemented within the ALU.
Recall that the combination of a set of registers with a shared ALU and interconnecting
paths is the datapath for the system.
Generic Datapath
The datapath and the control unit are the two parts of the
processor, or CPU, of a computer.
In addition to the registers, the datapath contains the digital
logic that implements the various microoperations.
When a large number of registers is included in a datapath,
the registers are most conveniently connected through one or
more buses.
Registers in a datapath interact by the direct transfer of data,
as well as in the performance of the various types of
microoperations.
The Arithmetic/Logic Unit
The ALU is a combinational circuit that performs a set of basic
arithmetic and logic microoperations.
It has a number of selection lines used to determine the operation to
be performed.
The selection lines are decoded within the ALU, so that k selection
lines can specify up to distinct operations.
Figure shows the symbol for a typical n- bit ALU.
The n data inputs from A are combined with the n data inputs from B
to generate the result of an operation at the G outputs. The mode-
select input S2 distinguishes between arithmetic and logic operations.
Symbol for an n-Bit ALU
ALU
Design:
1- Design the
arithmetic
section.
2- Design the
logic section.
3- Combine
the two
sections
to form the
ALU.
Arithmetic Circuit
The basic component of an arithmetic circuit is a parallel
adder, which is constructed with a number of full-adder
circuits connected in cascade: (Block Diagram of an Arithmetic Circuit)
Arithmetic Circuit
B Input Logic for One Stage of
Arithmetic Circuit
Logic Diagram of a 4-Bit
Arithmetic Circuit
Logic Circuit
The logic microoperations manipulate the bits of the
operands by treating each bit in a register as a binary
variable, giving bitwise operations.
There are four commonly used logic operations— AND, OR,
XOR (exclusive-OR), and NOT— from which others can be
conveniently derived.
One Stage of Logic Circuit
Arithmetic/Logic Unit
The logic circuit can be combined with the arithmetic circuit to
produce an ALU.
Design a 4-bit ALU that performs the following operations: draw the
logic diagram for the LSB stage?
S2 S1 S0 Operation
0 0 0 0 G= A-1
0 0 0 1 G= A
0 0 1 0 G= A+
0 0 1 1 G= A-B
0 1 0 0 G=A+B
0 1 0 1 G= A+B+1
0 1 1 0 G= A
0 1 1 1 G= A+
1 0 0 X G= B˅
1 0 1 X G= B˄A
1 1 0 X G=A⊕B
1 1 1 X G=
Design a 4-bit ALU and shifter that performs the following
operations:
A+B
A+B+1
+1
sl A
A˅B
sr A
A˄B
Give the result of your design as the logic diagram for a single stage?