Sdic V Notes
Sdic V Notes
Sdic V Notes
REGISTER-TRANSFER LOGIC
• Digital systems are composed of modules that are constructed from digital
components, such as registers, decoders, arithmetic elements, and control logic
• The modules are interconnected with common data and control paths to form
adigital computer system
• The operations executed on data stored in registers are called microoperations
• A microoperation is an elementary operation performed on the information stored in
one or more registers
• Examples are shift, count, clear, and load
• Some of the digital components from before are registers that implement
microoperations
• The internal hardware organization of a digital computer is best defined by specifying
o The set of registers it contains and their functions
o The sequence of microoperations performed on the binary information stored
o The control that initiates the sequence of microoperations
• Use symbols, rather than words, to specify the sequence of microoperations
• The symbolic notation used is called a register transfer language
• A programming language is a procedure for writing symbols to specify a
given computational process
• Define symbols for various types of microoperations and describe associated
hardware that can implement the microoperations
INTERREGISTER TRANSFER
• The registers in a digital system are designated by capital letters to denote the function
of the register.
• For example, the register that holds an address for the memory unit is usually called
the memory address register and is designated MAR .
• Other designations for registers are A, B, R1, R2, and IR.
Figure 5.1 shows four ways to represent a register in block diagram form.
Letters (and
numerals) Denotes a register A, MBR, R2
2 MVIT
Information or data transfer
Information transfer from one register to another is designated in symbolic form by
means of the replacement operator. The statement:
A←B (statement without control statement)
The above statement denotes the transfer of the contents of register B into register A. It
designates a replacement of the contents of A by the contents of B. By definition, the
contents of the source register B do not change after the transfer.
The condition that determines when the transfer is to occur is called a control function. A
control function is a Boolean function that can be equal to 1 or 0. The control function is
included with the statement as follows:
x' T : A ←B
The control function is terminated with a colon. It symbolizes the requirement that the transfer
operation be executed by the hardware only when the Boolean function x'T, = 1, i.e., when
variable x = 0 and timing variable T, = 1.
3 MVIT
Arithmetic Microoperations
Logic Microoperations
• Logic operations specify binary operations for strings of bits stored in registers and
treat each bit separately
• Example: the XOR of R1 and R2 is symbolized by
P: R1 ← R1 ⊕ R2
• Example: R1 = 1010 and R2 = 1100
1010 1010 Content of R1
1100 1100 Content of R2
0110 Content of R1 after P = 1
4 MVIT
•Symbols used for logicalmicrooperations:
OR: ∨
AND: ∧
XOR: ⊕
PROCESSOR ORGANIZATION
• The processor part of a computer CPU is sometimes referred to as the data path of the
CPU because the processor forms the paths for the data transfers between the
registers in the unit.
• The various paths are said to be controlled by means of gates that open the required
path and close all others.
• A processor unit can be designed to fulfill the requirements of a set of data paths for a
specific application.
• In a processor unit, the data paths are formed by means of buses and other common
lines.
• The control gates that formulate the given path are essentially multiplexers and
decoders whose selection lines specify the required path.
• The processing of information is done by one common digital function whose data path
can be specified with a set of common selection variables
Bus Organization
• A bus organization for four processor registers is shown in Fig.5.3.
• Each register is connected to two multiplexers (MUX) to form input buses A and B.
• The selection lines of each multiplexer select one register for the particular bus.
• The A and B buses are applied to a common arithmetic logic unit.
• The function selected in the ALU determines the particular operation that is to be
performed.
• The shift microoperations are implemented in the shifter.
• The result of the microoperation goes through the output bus S into the inputs of all
registers.
• The destination register that receives the information from the output bus is selected
by a decoder.
• When enabled, this decoder activates one of the register load inputs to provide a
transfer path between the data on the S bus and the inputs of the selected destination
register. The output bus S provides the terminals for transferring data to an external
destination. One input of multiplexer A or B can receive data from the outside
5 MVIT
Fig5.3 Processor registers and ALU connected through common buses
• The control unit that supervises the processor bus system directs the information flow
through the ALU by selecting the various components in the unit. For example, to
perform the microoperation:
R1←R2+ R3
• The control must provide binary selection variables to the following selector inputs:
6 MVIT
shift).
7 MVIT
Fig 5.4 arithmetic operation
• From the above Fig 5.5, by changing the B input and Cin we get 8 operaton. So the input
B is applied in four different form by using following circuit
Fig 5.5
The input A is applied directly to the 4-bit parallel adder and the input B is modified. The
resultant arithmetic circuit is shown in Fig 5.6
8 MVIT
DESIGN OF LOGIC CIRCUIT
The logic microoperations manipulate the bits of the operands separately and treat
each bit as a binary variable.
The 16 logic operations can be generated in one circuit and selected by means of four
selection lines.
Since all logic operations can be obtained by means of AND, OR, and NOT
(complement) operations, it may be more convenient to employ a logic circuit with just
these operations.
For three operations, we need two selection variables.
But two selection lines can select among four logic operations, so we choose also the
exclusive-OR (XOR) function for the logic circuit to be designed in this and the next
section.
The simplest and most straightforward way to design a logic circuit is shown in Fig.
5.7. The diagram shows one typical stage designated by subscript i.
The circuit must be repeated n times for an n-bit logic circuit. The four gates generate
Figure 5.7 one stage of logic circuit (a) Logic diagram (b) Function table
9 MVIT
The four gate generate four logic operations OR, XOR, AND, and NOT. The two selection
variables in the multiplexer select one of the gates for the output. The function table lists the
output logic generated as a function of the two selection variables.
• The logic circuit can be combined with the arithmetic circuit to produce one arithmetic logic
unit.
• Selection variables Sl and So can be made common to both sections provided we use a
third selection variable, S2, to differentiate between the two.
• This configuration is illustrated in Fig 5.7. The outputs of the logic and arithmetic circuits in
each stage go through a multiplexer with selection variable S2.
• A more efficient ALU can be obtained if we investigate the possibility of generating logic
operations in an already available arithmetic circuit. This can be done by inhibiting all input
carries into the full-adder circuits of the parallel adder. Consider the Boolean function that
generates the output sum in a full-adder circuit:
F.=X ⊕ Y ⊕Cin
• The input carry G in each stage can be made to be equal to 0 when a selection
variable s z is equal to 1. The result would be:
F=X ⊕ Y
This expression is valid because of the property of the exclusive-OR operation x ⊕ 0 = x
The third step in the design is not a straightforward procedure and requires a certain amount
of ingenuity on the part of the designer. There is no guarantee that a solution can be found or
that the solution uses the minimum number of gates. The example presented here
demonstrates the type of logical thinking sometimes required in the design of digital systems.
The final ALU is shown in Fig. 5.8 Only the first two stages are drawn, but the diagram
can be easily extended to more stages. The inputs to each full-adder circuit are specified by
the Boolean functions:
X i= Ai+ S2 S1 S0 Bi+ S2 S1 S0 Bi
Yi= S0 Bi+ S1 Bi
Zi= S2Ci
When s2 = 0, the three functions reduce to:
10 MVIT
X i= Ai
Yi= S0 Bi+ S1 Bi
Zi= C
11 MVIT
Fig 5.8 shows the two stage ALU logic circuit and the corresponding function table is shown in
table 3
Selection Function
Output
S2 S1 So Cin
0 0 0 0 F=A Transfer A
0 0 0 1 F=A +1 Increment A
0 0 1 0 F=A +B Addition
0 1 0 1 F=A - B Subtraction
0 1 1 0 F=A - 1 Decrement A
0 1 1 1 F=A Transfer A
1 0 0 X F=AVB OR
1 0 1 X F = A ⊕B XOR
1 1 0 X F=A ∧ B AND
1 1 1 X F = A Complement A
PROCESSOR UNIT
12 MVIT
• The output from the shifter can be transferred to any one of the registers or to an
external destination.
• There are 16 selection variables in the unit, and their function is specified by a control
word in Fig. 5.9 (b). The 16-bit control word, when applied to the selection variables in
the processor, specifies a given microoperation.
• The control word is partitioned into six fields, with each field designated by a letter
name. All fields, except Cin, have a code of three bits.
• Three bits of A select source register for the input to left side of the ALU. The B field is
the same, but it selects the source information for the right input of the ALU.
• The D field selects a destination register.
• The F field, together with the bit in Cin, selects a function for the ALU. The H field
selects the type of shift in the shifter unit
13 MVIT
The three bits in the F field, together with the input carry Cin, provide the 12 operations
of the ALU as specified in Table 4.4. Note that there are two possibilities for F = A. In
one case the carry bit C is cleared, and in the other case it is set to 1
TABLE 5.4 Functions of control variables for the processor of Fig. 5.9
DESIGN OF ACCUMULATOR
• Some processor units distinguish one register from all others and call it an
accumulator register.
• The block diagram of an accumulator that forms a sequential circuit is shown in Fig
5.10.
• The A register and the associated combinational circuit constitutes a sequential circuit.
• The combinational circuit replaces the ALU but cannot be separated from the register,
since it is only the combinational-circuit part of a sequential circuit.
• The A register is referred to as the accumulator register and is sometimes denoted by
the symbol AC. Here, accumulator refers to both the A register and its associated
combinational circuit.
• The external inputs to the accumulator are the data inputs from B and the control
variables that determine the microoperations for the register.
• The next state of register A is a function of its present state and of the external inputs.
14 MVIT
15 MVIT
• The accumulator is similar to these registers but is more general, since it can perform
data-processing operations.
• An accumulator is a multifunction register that, by itself, can be made to perform all of
the microoperations in a processor unit. The microoperations included in an
accumulator depend on the operations that must be included in the particular
processor.
Control
Microoperation Name
variable
Pi A ←A + B Add
Pz A←0 Clear
P3 A← A Complement
Pa A ←A ∧ B AND
Ps A ←A ∨ B OR
P6 A ←A ⊕B Exclusive-OR
P7 A ← shr A Shift-right
Pa A ←shl A Shift-left
P9 A←A+l Increment
Check for
I f ( A = 0) then (Z = 1) zero
16 MVIT
• The control initiates all microoperations in the data processor. The control logic that
generates the signals for sequencing the microoperations is a sequential circuit whose
internal states dictate the control functions for the system.
• The digital circuit that acts as the control logic provides a time sequence of signals for
initiating the microoperations in the data-processor part of the system.
1. Hardwired control unit: A control unit implemented with SSI and MSI devices is said
to be a hard-wired control.
2. Microprogrammed or microprocessor control unit : microprogram control which uses
an LSI device such as a programmable logic array or a read-only memory
17 MVIT
the control circuit uses 12 flip-flops, one for each state.
• Fig 5.12 shows the block diagram of one flip-flop per state method
.
External
inputs
• In this figure 5.12 has four flip-flop per state Ti, i = 0, 1, 2, 3.at any given time interval
between two clock pulses, only one flip-flop is equal to 1; all others are equal to 0.
• The transition from the present state to the next is a function of the present T i that is a
1 and certain input conditions.
• The next state is manifested when the previous flip-flop is cleared and a new one is
set. Each of the flip-flop outputs is connected to the data-processing section of the
digital system to initiate certain microoperations.
• The other control outputs shown in the diagram are a function of the T's and external
inputs. These outputs may also initiate microoperations.
The advantage of the one flip-flop per state method is the simplicity with which it can be
designed. This type of controller can be designed by inspection from the state diagram that
describes the control sequence
18 MVIT
Sequence Register and Decoder Method
This method uses a register to sequence the control states. The register is decoded to
provide one output for each state. For n flip-flops in the sequence register, the circuit will
have 2n states and the decoder will have 2n outputs.
PLA Control
The PLA control is essentially similar to the sequence register and decoder method except
that all combinational circuits are implemented with a PLA, including the decoder and the
decision logic. By using a PLA for the combinational circuit, it is possible to reduce the
number of ICs and the number of interconnection wires.
19 MVIT
Fig 5.14 PLA control logic
• Figure 5.14 shows the configuration of a PLA controller. An external sequence
register establishes the present state of the control circuit.
Microprogram Control
• The purpose of the control unit is to initiate a series of sequential steps of
microoperations.
• The control variables at any given time can be represented by a string of 1's and 0's
called a control word. As such, control words can be programmed to initiate the various
components in the system in an organized manner.
• A control unit whose control variables are stored in a memory is called a
microprogrammed control unit. Each control word of memory is called a
microinstruction, and a sequence of microinstructions is called a microprogram.
• Figure 5.15 illustrates the general configuration of the microprogram control unit.
• The control memory is assumed to be a ROM, within which all control information is
permanently stored.
• The control memory address register specifies the control word read from control
memory. It must be realized that a ROM operates as a combinational circuit, with the
address value as the input and the corresponding word as the output.
• The content of the specified word remains on the output wires as long as the address
value remains in the address register. No read signal is needed as in a random-access
memory.
• The word read from control memory represents a microinstruction. The
microinstruction specifies one or more microoperations for the components of the
system.
20 MVIT
Figure 5.15 Microprogram control logic
• Once these operations are executed, the control unit must determine its next address.
The location of the next microinstruction may be the next one in sequence, or it may
be located somewhere else in the control memory. For this reason, it is necessary to
use some bits of the microinstruction to control the generation of the address for the
next microinstruction. The next address may also be a function of external input
conditions.
• While the microoperations are being executed, the next address is computed in the
next-address generator circuit and then transferred (with the next clock pulse) into the
control address register to read the next microinstruction.
21 MVIT