0% found this document useful (0 votes)
23 views22 pages

Lec 3 RTL

The document discusses digital system design and register transfer language (RTL). It defines digital modules as being defined by the registers they contain and microoperations performed on those registers. There are four main types of microoperations: register transfer, arithmetic, logic, and shift. RTL uses symbols to describe microoperation transfers between registers and is a way to specify the sequence and control of microoperations in a digital computer. Common symbols and examples of each microoperation type are provided.

Uploaded by

ashaba martin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views22 pages

Lec 3 RTL

The document discusses digital system design and register transfer language (RTL). It defines digital modules as being defined by the registers they contain and microoperations performed on those registers. There are four main types of microoperations: register transfer, arithmetic, logic, and shift. RTL uses symbols to describe microoperation transfers between registers and is a way to specify the sequence and control of microoperations in a digital computer. Common symbols and examples of each microoperation type are provided.

Uploaded by

ashaba martin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

RTL

DCS114/SSS114
DSE114/CSE114

LECTURE 3

BY
Mr. Bagaiga Richard
Email: [email protected]
1
Introduction

■ A digital system is an interconnection of digital hardware modules that accomplish a


specific information-processing task. Digital systems vary in size and complexity
from a few integrated circuits to a complex of interconnected and interacting digital
computers.
■ Digital system design uses a modular approach. The modules are constructed from
such digital components as registers, decoders, arithmetic elements, and control
logic. The various modules are interconnected with common data and control paths
to form a digital computer system.
■ Digital modules are best defined by the registers they contain and the operations
that are performed on the data stored in them. The operations executed on data
stored in registers are called microoperations
Micro-operations
Micro-operations are elementary operations performed on the information stored in one or
more registers.

The micro-operations in digital computers are of 4 types:


– Register transfer micro-operations transfer binary information from one register to
another.
– Arithmetic micro-operations perform arithmetic operations on numeric data
stored in registers.
– Logic micro-operations perform bit manipulation operation on non-numeric data
stored in registers.
– Shift micro-operations perform shift micro-operations performed on data.

3
The internal hardware organization of a digital computer is best defined by specifying
1. The set of registers it contains and their function.
2. 2. The sequence of micro operations performed on the binary information stored in
the registers.
3. 3. The control that initiates the sequence of micro operations

It is possible to specify the sequence of micro operations in a computer by explaining


every operation in words, but this procedure usually involves a lengthy descriptive
explanation.
It is more convenient to adopt a suitable symbolic representation to describe the
sequence of transfers between registers and the various arithmetic and logic micro
operations associated with the transfers
The symbolic notation used to describe the micro operation transfers among registers is
called a register transfer language
Register Transfer Language
■ The symbolic notation used to describe the micro-operation transfers amongst
registers is called Register transfer language.
■ The term register transfer means the availability of hardware logic circuits that can
perform a stated micro-operation and transfer the result of the operation to the
same or another register.
■ The word language is borrowed from programmers who apply this term to
programming languages. This programming language is a procedure for writing
symbols to specify a given computational process

5
Registers are denoted by capital letters and are sometimes followed by numerals, e.g.,
■ MAR – Memory Address Register (holds addresses for the memory unit)
■ PC – Program Counter (holds the next instruction’s address)
■ IR – Instruction Register (holds the instruction being executed)
■ R1 – Register 1 (a CPU register)

We can indicate individual bits by placing them in parentheses, e.g., PC(8-15), R2(5),
etc.

6
■ The most common way to represent a register is by a rectangular box with the name of the
register inside,The individual bits can be distinguished as in (b).
■ The numbering of bits in a 16-bit register can be marked on top of the box as shown in (c). A
16-bit register is partitioned into two parts in (d). Bits 0 through 7 are assigned the symbol L
(for low byte) and bits 8 through 15 are assigned the symbol H (for high byte). The name of the
16-bit register is PC. The symbol PC (0−7) or PC(L) refers to the low-order byte and PC(8−15) or
PC(H) to the high-order byte.
Register Transfer micro-operations
■ Register Transfer R2 ← R1
■ Simultaneous Transfer R2← R1, R1 ← R2

Normally, we want the transfer to occur only under a predefined control condition using the
if then statement :
We are calling these control functions

■ Conditional Transfer (Control Function) P: R2 ← R1 or If (P = 1) Then R2 ← R1


■ Conditional, Simultaneous Transfer T: R2 ← R1, R1 ← R2

8
Basic Symbols For Register Transfer

9
Memory Transfer
There are two primary operations involving memory:
■ Read – transferring data from memory
■ Write – transferring data into memory
to indicate in Register Transfer Language that we are moving data from a memory
address to the data register, we write:
Read: DR ← M[AR]
To indicate in RTL that we are moving data from Register 1 to a memory location,
we write:
Write: M[AR] ← R1

10
Arithmetic Micro-Operations
■ Some of the basic micro-operations are addition, subtraction, increment and
decrement.
In an add micro-operation The above statement instructs the data or contents of
register R1 to be added to data or content of register R2 and the sum should be
transferred to register R3.
R1 + R2 → R3

In subtract micro-operation, instead of using minus operator we take 1's compliment


and add 1 to the register which gets subtracted,
i.e R1 - R2 is equivalent to R1 + R2' + 1 → R3

Increment and decrement micro-operations are generally performed by adding and


subtracting 1 to and from the register respectively.
R1 + 1 → R1
R1 – 1 → R1
11
Common Arithmetic Micro-Operations
Logic Micro-operations
■ Logic micro-operations are binary operations performed on corresponding bits of two
bit strings.
Example: P: R1 ← R1 ⊕ R2
– 1010 Content of R1
– 1100 Content of R2
– 0110 Content of R1 after P = 1
■ Special Symbols used for logic operations:
∧ - AND
∨ - OR
⊕ - XOR . XOR represents the inequality function, i.e., the output is true if the inputs are
not alike otherwise the output is false.
This avoids confusing AND with multiplication, OR with addition, etc.

13
Applications of logic micro operations

The hardware implementation of logic micro-operations requires that logic gates be


inserted for each bit or pair of bits in the registers to perform the required logic function.
Although there are 16 logic micro-operations, most computers use only four
■ AND,
■ OR,
■ XOR (exclusive-OR),
■ and complement by which all others can be derived
Selective -set operation
The selective-set operation sets to 1 the bits in register A where there are corresponding
1’s in register B. It does not affect bit positions that have 0’s in B. The following
numerical example clarifies this operation:

From the truth table we note that the bits of A after the operation are obtained from the
logic-OR operation of bits in B and previous values of A. therefore, the OR micro
operation can be used to selectively set bits of a register
Selective -complement
The selective-complement operation complements bits in A where there are corresponding
1’s in B. It does not affect bit positions that have 0’s in B. For example:

Again the two leftmost bits of B are 1’s, so the corresponding bits of A are complemented.
This example again can serve as a truth table from which one can deduce that the
selective-complement operation is just an exclusive-OR micro operation. Therefore, the
exclusive-OR micro operation can be used to selectively complement bits of a register
Selective -clear
■ The selective-clear operation clears to 0 the bits in A only where there are corresponding
1’s in B. or example

■ Again the two leftmost bits of B are 1’s, so the corresponding bits of A are cleared to 0.
One can deduce that the Boolean operation performed on the individual bits is AB’. The
corresponding logic micro operation is A ← A ∧ B’
Shift Micro-operations
Shift micro-operations are used for serial transfer of data and are used in conjunction with
arithmetic and logic operations.
The register contents can be shifted to the left or to the right.
There are three types of shift operations:
■ Logical shifts
A logical shift is one that transfers 0 through the serial input. We will adopt the symbols shl and shr
for logical shift-left and shift-right micro-operations Arithmetic shifts multiplies (or divides) a signed
number by 2.
■ Circular shifts
(also known as a rotate operation) circulates the bits of the register around the two ends without
loss of information. This is accomplished by connecting the serial output of the shift register to its
serial input. We will use the symbols cil and cir for the circular shift left and right, respectively.

19
■ An arithmetic shift
is a micro operation that shifts a signed binary number to the left or right. An arithmetic shift-
left multiplies a signed binary number by 2.
 An arithmetic shift-right divides the number by 2. Arithmetic shifts must leave the
sign bit unchanged because the sign of the number remains the same when it is
multiplied
 The arithmetic shift-left inserts a 0 into R0, and shifts all other bits to the left.
Shift Micro-operations

The register symbol must be same on both sides of arrows


21
THE END

You might also like