Csa Unit I
Csa Unit I
Csa Unit I
Digital systems are built with digital modules . Those modules are connected with control
and data paths.
Micro operations:
RTLis set of symbolic notations used to describe micro operations, transfer among
registers.
RTL is a system for expressing in symbolic form the micro operation sequences
among registers in a digital module
Registers are designated by capital letters; sometimes followed by numbers to denote the
function of a register.
Examples:
MAR for Memory Address Register
PC for Program Counter
IR for Instruction register
The individual flip flops in n-bit register is numbered from 0 in right most to n-1 in left most .
A register can be viewed as a single entity or may also be represented showing the bits of
data they contain.
Register transfer:
For register transfers, the data transfer from one register to another is designated in symbolic
form by replacement operator.
Control Function:
Transfer has to happen under a certain condition by means of a control signal, called a control
function.
This looks if-then statement.
If the signal is “1” then action will take place.
P also could be a combination of Boolean variables which yields a single Boolean output.
P: R2 R1
Which means “if P = 1, then load the contents of register R1 into register R2”,
i.e., if (P = 1) then (R2 R1).
R1 transfer to R2.
Register R2 has a load control activated by P control function and the whole operation is
synchronized with the central clock.
The rising edge of the CLK input triggers activates P at t time and at t+1 time the transfer
takes place.
Simultaneous Operations:
In cases where two or more operations are to occur simultaneously, they are separated with
commas as shown next:
P: R3 R5, MARIR
If the control function P = 1, load the contents of R5 into R3, and at the same time (clock),
load the contents of register IR into register MAR .
New approach:
Use one centralized set of circuits for data transfer the “bus”.
Also use control circuits to select which register is the source, and which is the destination.
Definition of a bus:
Bus is a path (of a group of wires) over which information is transferred, from any of several
sources to any of several destinations.
One way of constructing a bus is by using multiplexers.
The transfer of information from a bus into one of many destination registers can be
accomplished by connecting bus lines to the inputs of all registers and activating load control
of selected destination.
The symbolic statement for a bus transfer may mention the bus or may be implied in the
statement.
R2 R1
OR
Memory Transfer:
Memory (RAM) can be thought as a sequential circuits containing some number of registers.
Memory is usually accessed in computer systems by putting the desired address in a special
register, the Memory Address Register (MAR, or AR).
When memory is accessed, the contents of the MAR get sent to the memory unit’s address
lines.
DR M[AR]
Write operation:
The content of data register DR is transferred into memory location addressed by address
register AR.
M[AR] DR
R3 R1 + R2 +1 (R1 – R2)
Multiplication and division are implemented using sequence of additions and subtractions
respectively.
Binary Adder-Subtractor:
The addition and subtraction operations can be combined into one common circuit by
including ExOR with each full adder.
And
1) using a counter.
incrementor of 4 bits:
least significant adder always have one of its input as “1” while its carry is cascaded to other
half adders
Arithmetic Circuit :
The arithmetic micro operations can be implemented in one composite arithmetic circuit.
This circuit comprised of full adders and multiplexers.
The multiplexer controls which data is fed into Y input of the adder.
The output of the binary adder is computed from D = A + Y +Cin
The Y input can have one of 4 different values: B, B’, always “1”, or always “0”.
Logic micro operation specify binary operations on the strings of bits in registers.
Logic micro operations are bit-wise operations, i.e., they work on the individual bits of data.
These are useful for bit manipulations on binary data and also useful for making logical
decisions based on the bit value.
There are, in principle, 16 different logic functions that can be defined over two binary input
variables.
However, most systems only implement four of these:
AND ( ), OR ( ), XOR ( ), Complement/NOT
The two selection lines of the multiplexer selects one of the four logic operations available at
one time.
The circuit shows one stage for bit “i” but for logic circuit of n bits the circuit should be
repeated n times but with one remark; the selection pins will be shared with all stages.
Shift micro-operations are used for serial transfer of data beside they are used in conjunction
with arithmetic, logic, and other data processing operations.
There are 3 types of shift micro operations.
What differentiates them is the information that goes into the serial input:
Logical shift
Circular shift
Arithmetic shift
Logical Shift:
Examples:
R2 shr R2
R3shl R3
Circular Shift:
The circular shift rotates of the register around the two ends without loss of information.
This is accomplished by connecting the two ends of the shift register to each other.
Examples:
R2 cir R2
R3 cil R3
Arithmetic Shift:
Arithmetic shift is a micro-operation that shifts a signed binary number to the left or right.
Arithmetic shift must leave sign bit unchanged.
The arithmetic shift right is considered divide by 2 and left shift is considered multiply by 2.
Arithmetic Shift Right & Left.
Arithmetic shifts must leave the sign bit unchanged just to preserve the sign of the resulted
number.
If that case happened then it will be an overflow.
An overflow flip flop will be used to detect arithmetic shift left overflow .
Examples:
R2 ashr R2
R3 ashl R3
The figure shows four 2 by 1 multiplexers with 4 input lines A0 to A3 and 4 output lines H0
to H3.
The upper (left) multiplexer can take its inputs from serial in (IR) or A0.
The last multiplexer (bottom or right) can take its inputs from A3 or serial input (IL).
the single line select will select for shift right or left operations.
The arithmetic, logic, and shift circuits known previously will be combined in one ALU with
common selection inputs.
One stage (bit) of ALSU with its table is shown here.
the arithmetic and logic units will select their operations simultaneously when S0 and S1 are
applied;
while S2 and S3 will select one of those unit outputs or a shift left bit stage or shift right bit
stage.