Download presentation

Presentation is loading. Please wait.

Published byAlexzander Greenwood Modified about 1 year ago

1
REGISTER TRANSFER LANGUAGE (RTL) BASIC SYMBOLS

2
Today’s Outline Register Transfer Language ◦ Type of Registers ◦ Basic Symbols ◦ Register Transfer ◦ Arithmetic Microoperations

3
HIGH LEVEL LANGUAGE Example : C+, VB, JAVA ASSEMBLY LANGUAGE Example : uP and uC OPCODE MICROCODE Mircocode (Micro-operations): Operations executed on data stored in registers, performed in one clock cycle Register Transfer Language (RTL): Symbolic notation used to describe micro-operations Register Transfer Language (RTL) RTL to represent registers specify the operations on their contents

4
RTL Is an algebraic notation used to define machine level operations It is not executed by a computer It is used to explain how the computer works. Example: In assembly language instruction ADD #3, D2 is define in RTL as [D2] [D2] + 3 Register Transfer Language (RTL)

5
Types of Registers AR: Address Registers ◦ A register holds an address for memory unit DR: Data Registers PC: Program Counter IR: Instruction Register Rn: n indicates the Register number ◦ e.g. R2 is Register 2

6
Block Diagram of Registers R PC(H) Register 16 bit Register 7 8 bit Register Bit 7Bit Bit 16 Bit 0 PC(L) 8 bit = 1 byte H = High order byte L = Low order byte PC(H) = PC(15:8)PC(L) = PC(7:0)

7
BASIC SYMBOLS R followed by a number is referring to a register: R2 = second register/register no 2 R2

8
BASIC SYMBOLS M refers to Memory with addresses in square braces: Direct Addressing : M[10] = contents of memory address 10 In this example, M[10] refers to AddressContent MEMORY

9
BASIC SYMBOLS In-direct Addressing : M[R3] = content of the memory address in R AddressContent MEMORY AddressContent REGISTER = 15 Ans : M[R3] refers to

10
BASIC SYMBOLS Arrow pointing to the right shows transfer of data : R4 R3 = Stores the value of R3 into R4 The word transfer is misleading, since it implies that data is moved from one location to another. In fact, the data is copied from one location to another since it also still resides in register R3 => Contents of the source REG do not change, Only change the contents of destination REG Destination Source

11
BASIC SYMBOLS A comma represents simultaneous transfer: R1 R2, R6 R7 Stores R2 into R1 and at the same time stores R7 into R6.

12
BASIC SYMBOLS A colon indicates the termination of function: K : R1R2 If K=1, then stores R2 into R1. K1K2’ : R3R2 If K=1 and K2=0, then stores R2 into R3. K: a control signal generated in the control unit, 0 or 1

13
BASIC SYMBOLS Parenthesis (bracket) indicates part of the register. R8(1) = bit 1of R8 R Bit Position Content MSB LSB LSB : Least Significant Bit MSB : Most Significant Bit

14
BASIC SYMBOLS Parenthesis indicates part of the register. R3(7:0) = the least significant byte of R3 Note : 1 byte = 8 bit R

15
Summary SymbolDescriptionExample Square bracketsSpecifies an address for memory M[R2] Capital Letters & Numerals Denotes a registerAR, IR, PC, R2 ParenthesesDenotes part of a register R2(1), R2(7:0), PC(L) ArrowDenotes Transfer of dataR1 R2 ColonDenotes termination of control function K: CommaSeparates simultaneous transfers R1 R2, R3 R2

16
10 minutes break…

17
ARITHMETIC MICROOPERATIONS The basic arithmetic microoperations are ◦ Addition ◦ Subtraction ◦ Increment ◦ Decrement The additional arithmetic microoperations are ◦ Add with carry ◦ Subtract with borrow ◦ Transfer/Load ◦ etc. … Arithmetic Microoperations

18
MATHEMATICAL AND LOGICAL SYMBOLS Addition is indicated by the + sign: R1 R2+R3 Add R2 and R3, stores in R1 R2 R4+R1 Add R4 and R1, stores in R2 Example 1 : Example 2 :

19
MATHEMATICAL AND LOGICAL SYMBOLS Subtraction is handled not with the minus sign but with complementing. 1’s complement : 2’s complement : R5R3+R4 R5R3+R4+1 R3 minus R4 in 1’s complement R3 minus R4 in 2’s complement Note : Computers use the 2’s complement for negative integer numbers in all arithmetic operations.

20
+ Addition - Subtraction * Multiplication / Division Example:R2R1+R2 Example:R2R1+R2’+1 Example:R2R1*R2 Example:R2R1/R2 ARITHMETIC MICROOPERATIONS

21
Summary of Typical Arithmetic Microoperations (Page 547) Arithmetic Microoperations ARITHMETIC MICROOPERATIONS Note : Any register may be specified for source 1, source 2, or destination.

22
REGISTER TRANSFER LANGUAGE REGISTER TRANSFERS A little bit revision…

23
MICROOPERATIONS Microoperations - The operations performed on data stored in registers or in memory. The functions built into registers are examples of microoperations ◦ Shift ◦ Load ◦ Clear ◦ Increment ◦ … Microoperations

24
MICROOPERATIONS The microoperations most often encountered in digital systems are of four types: Register transfer microoperations ◦ Transfer binary data from one REG to another Arithmetic microoperations ◦ Perform arithmetic on data in REG Logic microoperations ◦ Perform bit manipulation on data in REG Shift microoperations ◦ Shift data in REG Microoperations

25
REGISTER TRANSFER Copying the contents of one register to another is a register transfer. A register transfer is indicated as R2 R1 ◦ In this case the contents of register R1 are copied (loaded) into register R2. ◦ A simultaneous transfer of all bits from the source R1 to the destination register R2, during one clock pulse. ◦ Note that this is a non-destructive; i.e. the contents of R1 are not altered by copying (loading) them to R2 Register Transfer

26
REGISTER TRANSFER A register transfer such as R3 R5 Implies that the digital system has ◦ the data lines from the source register (R5) to the destination register (R3) ◦ Parallel load in the destination register (R3) All bits are loaded simultaneously on clock pulse (same source) ◦ Control lines to perform the action Control the transfer or clock cycles Register Transfer

27
CONDITIONAL REGISTER TRANSFER Conditional Statement ◦ Using control signal to control the transfer ◦ Can be symbolized by if-then statement if (K 1 = 1) then (R2 R1) ◦ In RTL we can write it as: K 1 : R2 R1 The transfer operation be executed only if K1=1 A subscripted letter followed by a colon is a conditional Register Transfer K1: control signal

28
CONDITIONAL REGISTER TRANSFER R2 R1 K1K1 CLK n K1K1 Transfer occurs here n = no of lines = no of bits Transfer occurs in parallel K 1 : R2 R1 Register Transfer Load control input

29
K1 :R5 R2 CONDITIONAL REGISTER TRANSFER Content of R2 will be stored in R5 when condition K1 occurs R5 R2 K1 Example: Register Transfer

30
SIMULTANEOUS OPERATIONS If two or more operations are to occur simultaneously, they are separated with commas K: R3 R5, AR IR If the control function K = 1, load the contents of R5 into R3, and at the same time (positive clock edge), load the contents of register IR into register AR Register Transfer

31
COMPLEX LOGICAL SYMBOLS Content of R5 will be stored in R4 only IF both condition K1 and condition K2 are true: K1K2:R4R5 Register Transfer If K1=1 and K2=1, then stores R5 into R4

32
COMPLEX LOGICAL SYMBOLS Content of R5 will be stored in R4 IF either condition K1 or condition K2 were true, a + sign would be used: (K1+K2) : R4 R5 NOTE: In (K1 + K2), “+” means “OR” In R1 ← R1 + R3, “+” means “plus” Register Transfer

33
COMPLEX LOGICAL SYMBOLS If – then – else is implemented with commas and multiple colons. If K1 true, then stores R4 into R6, else if K2 true, then stores R5 into R6, else store R7 into R6. K1 : R6R4, K1K2 : R6 R5, K1K2: R6 R7 Register Transfer

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google