overview of register transfer and micro...

32
SUBJECT:- COA TOPICS:-Register Transfer Language Created by : - Sanjay Patel Overview of Register Transfer and Micro operation

Upload: dangque

Post on 17-Apr-2018

231 views

Category:

Documents


2 download

TRANSCRIPT

SUBJECT:- COATOPICS:-Register Transfer

Language

Created by : - Sanjay Patel

Overview of Register Transfer and Micro operation

Created by : - Sanjay Patel2

Outline Register Transfer language

Register Transfer

Bus and Memory Transfer

Arithmetic Micro Operation

Logic Micro Operation

Shift Micro Operation

Arithmetic logic Shift Unit

Created by : - Sanjay Patel3

Register Transfer Language Register:- which stores information in bit of sequence

like 00,01,0011,00110. It is made by flip-flop and basicelement of processor.

Register Transfer Language:- The symbolic notationused to describe the micro operation transfers amongregisters is called a Register transfer language

Created by : - Sanjay Patel4

Cont’d..Register transfer languageA symbolic languageA convenient tool for describing the internal organization of digital computersCan also be used to facilitate the design process of digital systems.

MAR- memory address registerPC - program counterIR - instruction register

Information transfer from one register to another is designated in symbolic form by means of a replacement operator.

R2 R1

Created by : - Sanjay Patel 5

Basic Component There are four basic component

I. Register and their function:- shift Register, counter Register, memory unit.

II. Information:- information store in register may be binary, character, BCD number, alphanumerical character.

III. Operation:- Micro operation, Macro operation.IV. Control function:- control the sequence of

operation

Created by : - Sanjay Patel 6

Cont’d..

R1

Register R

Numbering of bits

Showing individual bits

Subfields (Divided into two parts)

PC(H) PC(L)15 8 7 0

Block diagram of a register

7 6 5 4 3 2 1 0

R215 0

Created by : - Sanjay Patel 7

Register TransferIf want to transfer the content of any register

then it will occur only under a control condition.if (p=1) then (R2 R1)

where p is a control signal

If the signal is 1, the action takes placeThis is represented as: P: R2 ← R1

Which means “if P = 1, then load the contents of register R1 into register R2”

Created by : - Sanjay Patel 8

Hardware implementation

Implementation of controlled transfer P: R2 ← R1

Block diagram

Timing diagram

Clock

Transfer occurs here

R2

R1

Control Circuit

LoadP

n

Clock

Load

t t+1

Created by : - Sanjay Patel 9

Two operationIf two or more operations are to occur simultaneously, they are separated with commas

P: R3 ← R5, MAR ← IR

Here, 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.

T1: R2 ← R1T2: R3 ← R4

T:R2 ← R1, R3 ← R4

Created by : - Sanjay Patel10

BASIC SYMBOLS FOR REGISTER TRANSFERS

Capital letters Denotes a register MAR, R2& numerals

Parentheses () Denotes a part of a register R2(0-7), R2(L)

Arrow ← Denotes transfer of information R2 ← R1

Colon : Denotes termination of control function P:

Comma , Separates two micro-operations A ← B, B ← A

Symbols Description Examples

Created by : - Sanjay Patel 11

Bus and Memory Transfer

Bus:- Bus is a path(of a group of wires) over whichinformation is transferred, from any of severalsources to any of several destinations

There are three type of bus. Address Bus Data Bus Control Bus

Created by : - Sanjay Patel12

Implementing common bus using multiplexer

From a register to bus: BUS ← R

1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4Register A Register B Register C Register D

B C D1 1 1

4 x1MUX

B C D2 2 2

4 x1MUX

B C D3 3 3

4 x1MUX

B C D4 4 4

4 x1MUX

4-line bus

x

yselect

0 0 0 0

Register A Register B Register C Register D

Bus lines

Created by : - Sanjay Patel 13

TRANSFER FROM BUS TO A DESTINATION REGISTER

Three-State Bus Buffers

Bus line with three-state buffers

Reg. R0 Reg. R1 Reg. R2 Reg. R3

Bus lines

2 x 4Decoder

Load

D0 D1 D2 D3zw

Select E (enable)

Output Y=A if C=1High-impedence if C=0Normal input A

Control input C

SelectEnable

0123

S0S1

A0B0C0D0

Bus line for bit 0

Created by : - Sanjay Patel14

Memory Transfer

A memory is collection of storage cells. Eachcell store 1-bit of information.

The memory stores binary information in groupsof bits called words.

To access information from particular word frommain memory, each word in the main memoryhas a distinct address.

The transfer of information from a memory wordto the outside environment is called a Readoperation.

The transfer of new information to be stored inthe memory is called Write operation

Created by : - Sanjay Patel 15

Cont’d..

data input lines

data output lines

n

n

kaddress lines

Read

Write

RAMunit

Created by : - Sanjay Patel16

Cont’d…

Collectively, the memory is viewed at the register level as adevice, M.

Since it contains multiple locations, we must specify whichaddress in memory we will be using

This is done by indexing memory references Memory is usually accessed in computer systems by putting

the desired address in a special register, the Memory AddressRegister (MAR, or AR)

When memory is accessed, the contents of the MAR get sentto the memory unit’s address lines

ARMemory

unit

Read

Write

Data inData out

M

Created by : - Sanjay Patel 17

Memory Read To read a value from a location in memory and

load it into a register, the register transferlanguage notation looks like this:

R1 ← M[MAR]

This causes the following to occur The contents of the MAR get sent to the memory

address lines A Read (= 1) gets sent to the memory unit The contents of the specified address are put on

the memory’s output data lines These get sent over the bus to be loaded into

register R1

Created by : - Sanjay Patel 18

Memory WriteTo write a value from a register to a location in

memory looks like this in register transferlanguage:

This causes the following to occur The contents of the MAR get sent to the memory

address lines A Write (= 1) gets sent to the memory unit The values in register R1 get sent over the bus

to the data input lines of the memory The values get loaded into the specified address

in the memory

M[MAR] ← R1

Created by : - Sanjay Patel 19

Micro-operation or Inter Register

Computer system micro operations are of four types:

1. Register transfer micro operations :- Transfer information from one register to another

2. Arithmetic micro operations:- Perform arithmetic operations on numeric data stored in registers.

3. Logic micro operations:- Perform bit manipulation operations on non numeric data stored in registers.

4. Shift micro operations :- Shift operations on data stored in registers.

Created by : - Sanjay Patel 20

Arithmetic micro operation

The basic arithmetic micro operations areAdditionSubtractionIncrementDecrement

The additional arithmetic micro operations areAdd with carrySubtract with borrowTransfer/Loadetc. …

Created by : - Sanjay Patel 21

Cont’d…

R3 ← R1 + R2 Contents of R1 plus R2 transferred to R3R3 ← R1 - R2 Contents of R1 minus R2 transferred to R3R2 ← R2’ Complement the contents of R2 R2 ← R2’+ 1 2's complement the contents of R2 (negate)R1 ← R1 + 1 IncrementR1 ← R1 - 1 Decrement

Created by : - Sanjay Patel 22

Logic micro operation

It specifies binary operations on the strings of bits stored in registers Logic microoperations are bit-wise operations, i.e., they work on the individual bits of data useful for bit manipulations on binary data useful for making logical decisions based on the bit value

Logic Micro Operation symbol

OR v

AND ^

Complement BAR

EX-OR ⊕

Created by : - Sanjay Patel 23

F0 = 0 F ← 0 Clear

F1 = xy F ← A ∧ B AND

F2 = xy' F ← A ∧ B’

F3 = x F ← A Transfer A

F4 = x'y F ← A’∧ B

F5 = y F ← B Transfer B

F6 = x ⊕ y F ← A ⊕ B Exclusive-OR

F7 = x + y F ← A ∨ B OR

F8 = (x + y)' F ← (A ∨ B)’ NOR

F9 = (x ⊕ y)' F ← (A ⊕ B)’ Exclusive-NOR

F10 = y' F ← B’ Complement B

F11 = x + y' F ← A ∨ B

F12 = x' F ← A’ Complement A

F13 = x' + y F ← A’∨ B

F14 = (xy)' F ← (A ∧ B)’ NAND

F15 = 1 F ← all 1's Set to all 1's

Created by : - Sanjay Patel 24

Logic micro operation circuit table

0 0 F = A ∧ B AND0 1 F = A ∨ B OR1 0 F = A ⊕ B XOR1 1 F = A’ Complement

S1 S0 Output µ-operationFunction table

BA

SS

F

10

i

ii 0

1

2

3

4 X 1MUX

Select

Created by : - Sanjay Patel 25

Application of logic operation

Logic microoperations can be used to manipulate individual bits or a portions of a word in a registerConsider the data in a register A. In another register, B, is bit data that will be used to modify the contents of A.

Selective-set A ← A + BSelective-complement A ← A ⊕ BSelective-clear A ← A • B’Mask (Delete) A ← A • BClear A ← A ⊕ BInsert A ← (A • B) + C

Selective set

Created by : - Sanjay Patel 26

Selective complement

Created by : - Sanjay Patel 27

Created by : - Sanjay Patel 28

shift micro operationShift micro operations are used for serial transfer of data.There are three types of shifts

Logical shiftCircular shiftArithmetic shift

Serialinput

• A right shift operation

• A left shift operation Serialinput

Created by : - Sanjay Patel 29

Logical Shift

In a logical shift the serial input to the shift is a 0.A right logical shift operation:

A left logical shift operation:

In a Register Transfer Language, the following notation is used

shl for a logical shift leftshr for a logical shift right

0

0

Created by : - Sanjay Patel 30

Circular Shift

In a circular shift the serial input is the bit that is shifted out of the other end of the register.

A right circular shift operation:

A left circular shift operation:

In a RTL, the following notation is usedcil for a circular shift leftcir for a circular shift right

Created by : - Sanjay Patel 31

Arithmetic Shift

0

A right arithmetic shift operation

A left arithmetic shift operation:

Thank You !

Created by :-

S A N J A Y P A T E LAssistant Professor (I.T.)

Shankersinh Vaghela Bapu

Institute of Technology, Gandhinagar