SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Chapter 4
Register Transfer and Microoperations
•   4-1   Register Transfer Language
•   4-2   Register Transfer
•   4-3   Bus and Memory Transfer
•   4-4   Arithmetic Microoperations
•   4-5   Logic Microoperations
•   4-6   Shift Microoperations
•   4-7   Arithmetic Logic Shift Units

                    EE-222 Computer Architecture
                        Muhammad Bilal Saif        33
CONNECTING REGISTERS
• In a digital system with many registers, it is impractical to
  have dedicated connections between all registers.
• To completely connect n registers we require n(n-1) lines
   – So this is not a realistic approach to use separate wiring for each register
     in a large digital system


• Instead, take a different approach
• Have one centralized set of circuits for data transfer – the
  bus
• Have control circuits to select which register is the source,
  and which is the destination

                            EE-222 Computer Architecture
                                Muhammad Bilal Saif                                 34
BUS AND BUS TRANSFER
Bus is a path (of a group of wires) over which information is
transferred, from any of several sources to any of several destinations.
            …
            …




      Dec
  …
  …




                  R1              R2             ……     Rn

                                                                  Bus



From a register to bus: BUS  R

                         EE-222 Computer Architecture
                             Muhammad Bilal Saif                   35
Bus Implementation
• Bus can be implemented by
1. Mux
2. Tristate buffer




               EE-222 Computer Architecture
                   Muhammad Bilal Saif        36
Bus implementation by using Mux
            Register A               Register B             Register C                 Register D
            0   1      2   3         0   1      2    3      0   1      2    3          0   1      2    3




                 B C           D0        B 1 C1      D1         B2     C2       D2         B3     C3       D3
                  0  0


            0                        0                      0                          0
                4 x1                     4 x1                   4 x1                       4 x1
                MUX                      MUX                    MUX                        MUX



0x
 select
1
0y


                                                    Register A
                                                    4-line bus C                     3rd bit of all the
 0th
   bit of all the               1st bit of all the Registers                         Registers
 Registers
                                     EE-222 Computer Architecture
                                         Muhammad Bilal Saif 2nd    bit of all the Registers                37
General rules
• A bus system will multiplex k registers of n bits
  each to produce an n-line common bus.
• The number of multiplexers needed to
  construct the bus is equal to n (# of bits on
  each register).
• The size of each multiplexer must be k x 1
  since in multiplexes k data lines.


                  EE-222 Computer Architecture
                      Muhammad Bilal Saif         38
General rule (Simplified)
• # of Mux required is equal to # of bits in each
  register.
• Size of Mux is dependent on total number of
  registers




                  EE-222 Computer Architecture
                      Muhammad Bilal Saif           39
BUS TRANSFER IN RTL
• Depending on whether the bus is to be
  mentioned explicitly or not, register transfer can
  be indicated as either
           R2 R1                                  Sout
                                                           n

                                                               Register   Bus
  or                                                 Clk
                                                                Bank
            BUS R1, R2  BUS
                                                     Sin
                                                           n




• In the former case the bus is implicit, but in the
  latter, it is explicitly indicated

                     EE-222 Computer Architecture
                         Muhammad Bilal Saif                              40
Bus implementation by using Three state buffer



       Three-State Bus Buffers


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



                    Control input C
                                      0
                                      1


In high impedance the gate acts like an open circuit.


                               EE-222 Computer Architecture
                                   Muhammad Bilal Saif                                41
Three state Bus Buffer
    • Tri-state gates can be used to implement the
      functioning of any other conventional gate
      such as AND, OR, NAND, NOR etc.




Assignment # 02:
a) Draw the circuit, which performs the functionality of OR gate, by using only
   tri-state buffers and resistors.
b) Repeat the above for NOR gate
                              EE-222 Computer Architecture
                                  Muhammad Bilal Saif                     42
Three states gates in Verilog




         EE-222 Computer Architecture
             Muhammad Bilal Saif        44
Syntax of three state gates




        EE-222 Computer Architecture
            Muhammad Bilal Saif        45
Bus implementation by using Three state buffer

Bus line with three-state buffers
                                                              Bus line for bit 0
                                               A0
                                               B0
                                               C0                                                    Bus line for bit1
                                                                                   A1
                                               D0
                                                                                        B1
                                    S0              0
                      Select                        1                                         C1
                                    S1              2
                      Enable                        3                                                D1




                                                                                 Bus line for bit2
                           Bus line for bit3                      A2
            A3
                                                                       B2
                 B3
                                                                            C2
                      C3
                                                                                 D2
                           D3




                                           EE-222 Computer Architecture
                                               Muhammad Bilal Saif                                                   46
General Rule
• In case of three state buffers; a common bus
  for k registers of n bits each, can be
  constructed by using n circuits with k buffer in
  each as shown in the previous slide.
• Only one decoder is required.




                  EE-222 Computer Architecture
                      Muhammad Bilal Saif        47
Surprise Quiz - 01
• Draw the diagram of a bus system by using tri-
  state buffers, having
  – 4 registers of 2 bits each.




                    EE-222 Computer Architecture
                        Muhammad Bilal Saif        48
Simple RAM design
Control Signals
                         Read/Write Control
                                                                     8

                                               8 bit Register
Address Bus       2
                                               8 bit Register
                           Dec
                                               8 bit Register

                                               8 bit Register



                                                                Data Bus
                      In terms of RAM, each internal
                      register is called a “word”
                                 EE-222 Computer Architecture
                                     Muhammad Bilal Saif                   49
MEMORY (RAM)
• Assume the RAM contains 2k words and each word
  has n bits. It needs the following
  –   n data input lines
  –   n data output lines
                                                                  data input lines
  –   k address lines
                                                                           n
  –   A Read control line
  –   A Write control line                    address lines
                                                              k
                                                                       RAM
                                                Read
                                                                       unit
                                                Write

                                                                            n
                                                                  data output lines


                             EE-222 Computer Architecture
                                 Muhammad Bilal Saif                                 50
RAM Calculation
In computer
     210 = 1024 ≈ 1K
     220 = 1048576 ≈ 1M
     230 = 1073741824 ≈ 1G




                EE-222 Computer Architecture
                    Muhammad Bilal Saif        51
MEMORY TRANSFER
    • Collectively, the memory is viewed at the register level as
      a device, “M”.
    • Since it contains multiple locations, we must specify
      which address in memory we will be using
    • 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              M
                                                                     Memory             Read
                                           MAR / AR
                                                                      unit              Write
Further material regarding memory can be found at
article 2-7, p59 of text book                                     Data out    Data in
                                   EE-222 Computer Architecture
                                       Muhammad Bilal Saif                              52
MEMORY READ
• To read a value from a location in memory and load it into a register,
  the register transfer language notation looks like this:

                     R1  M[MAR]

• This causes the following actions 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




                             EE-222 Computer Architecture
                                 Muhammad Bilal Saif                                      53
MEMORY WRITE

• To write a value from a register to a location in memory looks like
  this in register transfer language:

                      M[MAR]  R1

• This causes the following to occur
    – The contents of the MAR get sent to the memory address lines
    – The values in register R1 get sent over the bus to the data input lines of the
      memory
    – A Write (= 1) gets sent to the memory unit
    – The values get loaded into the specified address in the memory




                             EE-222 Computer Architecture
                                 Muhammad Bilal Saif                                   54
SUMMARY OF R. TRANSFER MICROOPERATIONS

A B            Transfer content of reg. B into reg. A
AR DR(AD)     Transfer content of AD portion of reg. DR into reg. AR
A  constant   Transfer a binary constant into reg. A
BUS  R1,       Transfer content of R1 into bus and, at the same time,
R2 BUS          transfer content of bus into R2
AR              Address register
DR              Data register
M[AR]           Memory word specified by reg. AR
M               Equivalent to M[AR]
DR  M         Memory read operation: transfers content of
                     memory word specified by AR into DR
M  DR         Memory write operation: transfers content of
                     DR into memory word specified by AR


                      EE-222 Computer Architecture
                          Muhammad Bilal Saif                       55
Chapter 4
Register Transfer and Microoperations
•   4-1   Register Transfer Language
•   4-2   Register Transfer
•   4-3   Bus and Memory Transfer
•   4-4   Arithmetic Microoperations
•   4-5   Logic Microoperations
•   4-6   Shift Microoperations
•   4-7   Arithmetic Logic Shift Units

                    EE-222 Computer Architecture
                        Muhammad Bilal Saif        56
MICROOPERATIONS
• Computer system microoperations are of four
  types:
  – Register transfer microoperations
  – Arithmetic microoperations                   We have covered this topic;
                                                 this microoperation does
  – Logic microoperations                        not alter the register
                                                 contents while transfer
  – Shift microoperations

                                                 These operations change
                                                 the register contents while
                                                 transfer
                  EE-222 Computer Architecture
                      Muhammad Bilal Saif                               57
ARITHMETIC MICROOPERATIONS
• The basic arithmetic microoperations are
    –   Addition
    –   Subtraction
    –   Increment                               Can be implemented by
    –   Decrement                               1. Binary up/down
                                                 Subtraction is achieved
                                                 by counter i.e.
                                                    addition
• The additional arithmetic microoperations are
   – Add with carry                             2. Adding/subtracting 1
                                                 R3R1 + R2’ + 1
    – Subtract with borrow
    – Transfer/Load
    – etc. …

                 Summary of Typical Arithmetic Micro-Operations
        R3  R1 + R2        Contents of R1 plus R2 transferred to R3
        R3  R1 - R2        Contents of R1 minus R2 transferred to R3
        R2  R2’            Complement the contents of R2
        R2  R2’+ 1         2's complement the contents of R2 (negate)
        R3  R1 + R2’+ 1    subtraction
        R1  R1 + 1         Increment
        R1  R1 - 1         Decrement
                                 EE-222 Computer Architecture
                                     Muhammad Bilal Saif                  58
BINARY ADDER
For add microoperation we require
•Registers that hold the data
•Digital components that perform the addition (Full adder)

                        B3        A3        B2        A2        B1        A1        B0        A0

   Binary Adder
                             FA        C3        FA        C2        FA        C1        FA        C0



                  C4         S3                  S2                  S1                  S0




For n bit binary adder, we require n full adders.



                                  EE-222 Computer Architecture
                                      Muhammad Bilal Saif                                               59

Weitere ähnliche Inhalte

Was ist angesagt?

Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adderdragonpradeep
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazardAJAL A J
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
Bus and memory transfer
Bus and memory transferBus and memory transfer
Bus and memory transferAnil Pokhrel
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Polish Notation In Data Structure
Polish Notation In Data StructurePolish Notation In Data Structure
Polish Notation In Data StructureMeghaj Mallick
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler designKuppusamy P
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operationsSanjeev Patel
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operationsVATSAL TRIVEDI
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programmingKartik Sharma
 
Chapter 5The proessor status and the FLAGS registers
Chapter 5The proessor status and the FLAGS registersChapter 5The proessor status and the FLAGS registers
Chapter 5The proessor status and the FLAGS registerswarda aziz
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphsTilakpoudel2
 

Was ist angesagt? (20)

Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adder
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Bus and memory transfer
Bus and memory transferBus and memory transfer
Bus and memory transfer
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
4. block coding
4. block coding 4. block coding
4. block coding
 
Polish Notation In Data Structure
Polish Notation In Data StructurePolish Notation In Data Structure
Polish Notation In Data Structure
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programming
 
Chapter 5The proessor status and the FLAGS registers
Chapter 5The proessor status and the FLAGS registersChapter 5The proessor status and the FLAGS registers
Chapter 5The proessor status and the FLAGS registers
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphs
 
Computer system bus
Computer system busComputer system bus
Computer system bus
 

Ähnlich wie Lecture 2

Combinational circuit
Combinational circuitCombinational circuit
Combinational circuitsabina deshar
 
2. Unit1-CMOS PTL TGL Logic.pdf
2. Unit1-CMOS PTL TGL Logic.pdf2. Unit1-CMOS PTL TGL Logic.pdf
2. Unit1-CMOS PTL TGL Logic.pdftheanmolchawla19
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxAishah928448
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011arunachalamr16
 
Madge Smart Ringswitch - Version 2 Software
Madge Smart Ringswitch - Version 2 SoftwareMadge Smart Ringswitch - Version 2 Software
Madge Smart Ringswitch - Version 2 SoftwareRonald Bartels
 
B.sc cs-ii-u-1.4 digital logic circuits, digital component
B.sc cs-ii-u-1.4 digital logic circuits, digital componentB.sc cs-ii-u-1.4 digital logic circuits, digital component
B.sc cs-ii-u-1.4 digital logic circuits, digital componentRai University
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECESeshaVidhyaS
 
Apresentação feita em 2006 no Annual Simulation Symposium.
Apresentação feita em 2006 no Annual Simulation Symposium.Apresentação feita em 2006 no Annual Simulation Symposium.
Apresentação feita em 2006 no Annual Simulation Symposium.Antonio Marcos Alberti
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...Arti Parab Academics
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
B sc cs i bo-de u-iii combitional logic circuit
B sc cs i bo-de u-iii combitional logic circuitB sc cs i bo-de u-iii combitional logic circuit
B sc cs i bo-de u-iii combitional logic circuitRai University
 
Bca 2nd sem-u-1.4 digital logic circuits, digital component
Bca 2nd sem-u-1.4 digital logic circuits, digital componentBca 2nd sem-u-1.4 digital logic circuits, digital component
Bca 2nd sem-u-1.4 digital logic circuits, digital componentRai University
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuitchauhankapil
 

Ähnlich wie Lecture 2 (20)

STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
2. Unit1-CMOS PTL TGL Logic.pdf
2. Unit1-CMOS PTL TGL Logic.pdf2. Unit1-CMOS PTL TGL Logic.pdf
2. Unit1-CMOS PTL TGL Logic.pdf
 
D0532025
D0532025D0532025
D0532025
 
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptxENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
ENG 202 – Digital Electronics 1 - Chapter 4 (1).pptx
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011
 
Madge Smart Ringswitch - Version 2 Software
Madge Smart Ringswitch - Version 2 SoftwareMadge Smart Ringswitch - Version 2 Software
Madge Smart Ringswitch - Version 2 Software
 
B.sc cs-ii-u-1.4 digital logic circuits, digital component
B.sc cs-ii-u-1.4 digital logic circuits, digital componentB.sc cs-ii-u-1.4 digital logic circuits, digital component
B.sc cs-ii-u-1.4 digital logic circuits, digital component
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
Apresentação feita em 2006 no Annual Simulation Symposium.
Apresentação feita em 2006 no Annual Simulation Symposium.Apresentação feita em 2006 no Annual Simulation Symposium.
Apresentação feita em 2006 no Annual Simulation Symposium.
 
9077262.ppt
9077262.ppt9077262.ppt
9077262.ppt
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
Co ppt
Co pptCo ppt
Co ppt
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
B sc cs i bo-de u-iii combitional logic circuit
B sc cs i bo-de u-iii combitional logic circuitB sc cs i bo-de u-iii combitional logic circuit
B sc cs i bo-de u-iii combitional logic circuit
 
H5243740
H5243740H5243740
H5243740
 
Bca 2nd sem-u-1.4 digital logic circuits, digital component
Bca 2nd sem-u-1.4 digital logic circuits, digital componentBca 2nd sem-u-1.4 digital logic circuits, digital component
Bca 2nd sem-u-1.4 digital logic circuits, digital component
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 

Kürzlich hochgeladen

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 

Kürzlich hochgeladen (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 

Lecture 2

  • 1. Chapter 4 Register Transfer and Microoperations • 4-1 Register Transfer Language • 4-2 Register Transfer • 4-3 Bus and Memory Transfer • 4-4 Arithmetic Microoperations • 4-5 Logic Microoperations • 4-6 Shift Microoperations • 4-7 Arithmetic Logic Shift Units EE-222 Computer Architecture Muhammad Bilal Saif 33
  • 2. CONNECTING REGISTERS • In a digital system with many registers, it is impractical to have dedicated connections between all registers. • To completely connect n registers we require n(n-1) lines – So this is not a realistic approach to use separate wiring for each register in a large digital system • Instead, take a different approach • Have one centralized set of circuits for data transfer – the bus • Have control circuits to select which register is the source, and which is the destination EE-222 Computer Architecture Muhammad Bilal Saif 34
  • 3. BUS AND BUS TRANSFER Bus is a path (of a group of wires) over which information is transferred, from any of several sources to any of several destinations. … … Dec … … R1 R2 …… Rn Bus From a register to bus: BUS  R EE-222 Computer Architecture Muhammad Bilal Saif 35
  • 4. Bus Implementation • Bus can be implemented by 1. Mux 2. Tristate buffer EE-222 Computer Architecture Muhammad Bilal Saif 36
  • 5. Bus implementation by using Mux Register A Register B Register C Register D 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 B C D0 B 1 C1 D1 B2 C2 D2 B3 C3 D3 0 0 0 0 0 0 4 x1 4 x1 4 x1 4 x1 MUX MUX MUX MUX 0x select 1 0y Register A 4-line bus C 3rd bit of all the 0th bit of all the 1st bit of all the Registers Registers Registers EE-222 Computer Architecture Muhammad Bilal Saif 2nd bit of all the Registers 37
  • 6. General rules • A bus system will multiplex k registers of n bits each to produce an n-line common bus. • The number of multiplexers needed to construct the bus is equal to n (# of bits on each register). • The size of each multiplexer must be k x 1 since in multiplexes k data lines. EE-222 Computer Architecture Muhammad Bilal Saif 38
  • 7. General rule (Simplified) • # of Mux required is equal to # of bits in each register. • Size of Mux is dependent on total number of registers EE-222 Computer Architecture Muhammad Bilal Saif 39
  • 8. BUS TRANSFER IN RTL • Depending on whether the bus is to be mentioned explicitly or not, register transfer can be indicated as either R2 R1 Sout n Register Bus or Clk Bank BUS R1, R2  BUS Sin n • In the former case the bus is implicit, but in the latter, it is explicitly indicated EE-222 Computer Architecture Muhammad Bilal Saif 40
  • 9. Bus implementation by using Three state buffer Three-State Bus Buffers 0 1 0 1 z Output Y=A if C=1 Normal input A High-impedance if C=0 Control input C 0 1 In high impedance the gate acts like an open circuit. EE-222 Computer Architecture Muhammad Bilal Saif 41
  • 10. Three state Bus Buffer • Tri-state gates can be used to implement the functioning of any other conventional gate such as AND, OR, NAND, NOR etc. Assignment # 02: a) Draw the circuit, which performs the functionality of OR gate, by using only tri-state buffers and resistors. b) Repeat the above for NOR gate EE-222 Computer Architecture Muhammad Bilal Saif 42
  • 11. Three states gates in Verilog EE-222 Computer Architecture Muhammad Bilal Saif 44
  • 12. Syntax of three state gates EE-222 Computer Architecture Muhammad Bilal Saif 45
  • 13. Bus implementation by using Three state buffer Bus line with three-state buffers Bus line for bit 0 A0 B0 C0 Bus line for bit1 A1 D0 B1 S0 0 Select 1 C1 S1 2 Enable 3 D1 Bus line for bit2 Bus line for bit3 A2 A3 B2 B3 C2 C3 D2 D3 EE-222 Computer Architecture Muhammad Bilal Saif 46
  • 14. General Rule • In case of three state buffers; a common bus for k registers of n bits each, can be constructed by using n circuits with k buffer in each as shown in the previous slide. • Only one decoder is required. EE-222 Computer Architecture Muhammad Bilal Saif 47
  • 15. Surprise Quiz - 01 • Draw the diagram of a bus system by using tri- state buffers, having – 4 registers of 2 bits each. EE-222 Computer Architecture Muhammad Bilal Saif 48
  • 16. Simple RAM design Control Signals Read/Write Control 8 8 bit Register Address Bus 2 8 bit Register Dec 8 bit Register 8 bit Register Data Bus In terms of RAM, each internal register is called a “word” EE-222 Computer Architecture Muhammad Bilal Saif 49
  • 17. MEMORY (RAM) • Assume the RAM contains 2k words and each word has n bits. It needs the following – n data input lines – n data output lines data input lines – k address lines n – A Read control line – A Write control line address lines k RAM Read unit Write n data output lines EE-222 Computer Architecture Muhammad Bilal Saif 50
  • 18. RAM Calculation In computer 210 = 1024 ≈ 1K 220 = 1048576 ≈ 1M 230 = 1073741824 ≈ 1G EE-222 Computer Architecture Muhammad Bilal Saif 51
  • 19. MEMORY TRANSFER • Collectively, the memory is viewed at the register level as a device, “M”. • Since it contains multiple locations, we must specify which address in memory we will be using • 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 M Memory Read MAR / AR unit Write Further material regarding memory can be found at article 2-7, p59 of text book Data out Data in EE-222 Computer Architecture Muhammad Bilal Saif 52
  • 20. MEMORY READ • To read a value from a location in memory and load it into a register, the register transfer language notation looks like this: R1  M[MAR] • This causes the following actions 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 EE-222 Computer Architecture Muhammad Bilal Saif 53
  • 21. MEMORY WRITE • To write a value from a register to a location in memory looks like this in register transfer language: M[MAR]  R1 • This causes the following to occur – The contents of the MAR get sent to the memory address lines – The values in register R1 get sent over the bus to the data input lines of the memory – A Write (= 1) gets sent to the memory unit – The values get loaded into the specified address in the memory EE-222 Computer Architecture Muhammad Bilal Saif 54
  • 22. SUMMARY OF R. TRANSFER MICROOPERATIONS A B Transfer content of reg. B into reg. A AR DR(AD) Transfer content of AD portion of reg. DR into reg. AR A  constant Transfer a binary constant into reg. A BUS  R1, Transfer content of R1 into bus and, at the same time, R2 BUS transfer content of bus into R2 AR Address register DR Data register M[AR] Memory word specified by reg. AR M Equivalent to M[AR] DR  M Memory read operation: transfers content of memory word specified by AR into DR M  DR Memory write operation: transfers content of DR into memory word specified by AR EE-222 Computer Architecture Muhammad Bilal Saif 55
  • 23. Chapter 4 Register Transfer and Microoperations • 4-1 Register Transfer Language • 4-2 Register Transfer • 4-3 Bus and Memory Transfer • 4-4 Arithmetic Microoperations • 4-5 Logic Microoperations • 4-6 Shift Microoperations • 4-7 Arithmetic Logic Shift Units EE-222 Computer Architecture Muhammad Bilal Saif 56
  • 24. MICROOPERATIONS • Computer system microoperations are of four types: – Register transfer microoperations – Arithmetic microoperations We have covered this topic; this microoperation does – Logic microoperations not alter the register contents while transfer – Shift microoperations These operations change the register contents while transfer EE-222 Computer Architecture Muhammad Bilal Saif 57
  • 25. ARITHMETIC MICROOPERATIONS • The basic arithmetic microoperations are – Addition – Subtraction – Increment Can be implemented by – Decrement 1. Binary up/down Subtraction is achieved by counter i.e. addition • The additional arithmetic microoperations are – Add with carry 2. Adding/subtracting 1 R3R1 + R2’ + 1 – Subtract with borrow – Transfer/Load – etc. … Summary of Typical Arithmetic Micro-Operations R3  R1 + R2 Contents of R1 plus R2 transferred to R3 R3  R1 - R2 Contents of R1 minus R2 transferred to R3 R2  R2’ Complement the contents of R2 R2  R2’+ 1 2's complement the contents of R2 (negate) R3  R1 + R2’+ 1 subtraction R1  R1 + 1 Increment R1  R1 - 1 Decrement EE-222 Computer Architecture Muhammad Bilal Saif 58
  • 26. BINARY ADDER For add microoperation we require •Registers that hold the data •Digital components that perform the addition (Full adder) B3 A3 B2 A2 B1 A1 B0 A0 Binary Adder FA C3 FA C2 FA C1 FA C0 C4 S3 S2 S1 S0 For n bit binary adder, we require n full adders. EE-222 Computer Architecture Muhammad Bilal Saif 59