EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.

Slides:



Advertisements
Similar presentations
EKT 221 : Digital 2 MUX-based Transfer
Advertisements

Computer Architecture CS 215
CPEN Digital System Design
KU College of Engineering Elec 204: Digital Systems Design
Registers and Counters
Chapter 7 Henry Hexmoor Registers and RTL
8085 processor. Bus system in microprocessor.
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Chapter 7. Register Transfer and Computer Operations
Logic and Computer Design Fundamentals Registers and Counters
CPEN Digital System Design Chapter 9 – Computer Design
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
KU College of Engineering Elec 204: Digital Systems Design
REGISTER A Register is a group of binary storage cells suitable for holding binary information. A group of flip-flops constitutes a register, since each.
Chapter 1_4 Part II Counters
Registers & Register Transfers Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
ETE Digital Electronics
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
Registers CPE 49 RMUTI KOTAT.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
CSC321 Where We’ve Been Binary representations Boolean logic Logic gates – combinational circuits Flip-flops – sequential circuits Complex gates – modules.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Chapter 4 Computer Design Basics. Chapter Overview Part 1 – Datapaths  Introduction  Datapath Example  Arithmetic Logic Unit (ALU)  Shifter  Datapath.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
Chap 5. Registers and Counters. Chap Definition of Register and Counter l a clocked sequential circuit o consist of a group of flip-flops & combinational.
Register and Register Transfers
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
Shift Registers pp Shift Registers Capability to shift bits ♦ In one or both directions Why? ♦ Part of standard CPU instruction set ♦ Cheap.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
Abdullah Said Alkalbani University of Buraimi
Digital Logic Design.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Lecture 21: Registers and Counters (1)
EKT 221 : Chapter 4 Computer Design Basics
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
EKT 221 : Digital 2 Serial Transfers & Microoperations Date : Lecture : 2 hr.
Shift Register.
Chap 5. Registers and Counters
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 23 Introduction Computer Specification –Instruction Set Architecture (ISA) - the specification.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
EKT 221 : DIGITAL 2.
EKT 221 : Digital 2 Serial Transfers & Microoperations
6.
Chap 7. Register Transfers and Datapaths
EKT 221 : Digital 2 Serial Transfers & Microoperations
KU College of Engineering Elec 204: Digital Systems Design
Chapter 7 – Registers and Register Transfers
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Register Transfer and Microoperations
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Chapter 1_5 register Cell Design
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Overview Part 1 - Registers, Microoperations and Implementations
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Presentation transcript:

EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3

Outlines  Multiplexer-based transfers  Transforming Block Diagram to Detailed Logic  Shift Registers  Shift Registers with Parallel Loads  Shift Registers with Parallel Loads and Hold  Bidirectional Shift Register  MUX-Based Transfer  Bus-Based Transfer  Serial Transfer and Micro-operations

Multiplexer-Based Transfers  A Register receives data transfers from more than 1 sources.  A dedicated multiplexer is used to select the wanted input  Example shows:  R0 receives data from R1 if K1 is 1.  R0 receives data from R2 if K1 is 0. R2 R1 R0 K2 K1 0 1 S MUX n=4

Multiplexer-Based Transfers  How do we represent this in RTL form?  Written in if-then-else: If (K1=1) then (R0 R1) else if (K2=1) then (R0 R2)  Written in RTL K1:R0 R1, K1K2:R0 R2 R2 R1 R0 K2 K1 0 1 S MUX n=4

Multiplexer-Based Transfers K1:R0 R1, K1K2:R0 R2 Analyze the diagram for input: K1K2Load R0 content 000n.c 011R2 101R1 111 R2 R1 R0 K2 K1 0 1 S MUX n=4 Load

Transforming a Block Diagram into Detailed Logic R2 R1 R0 K2 K1 0 1 S MUX n=4 Load Block Diagram Q0 Q1 Q2 Q3 D0 D1 D2 D3 Load Q0 Q1 Q2 Q3 D0 D1 D2 D3 Load 2 to 1 MUX Y0 Y1 Y2 Y3 A0 A1 A2 A3 B0 B1 B2 B3 Q0 Q1 Q2 Q3 D0 D1 D2 D3 Load S CLK K2 K1 R1 R0 R2 Detailed Logic

Shift Registers  Shift Registers move data laterally within the register toward its MSB or LSB position  In the simplest case, the shift register is simply a set of D flip-flops connected in a row like this:

Shift Registers  Data input, In, is called a serial input or the shift right input.  Data output, Out, is often called the serial output.  The vector (A, B, C, Out) is called the parallel output. Serial Input Serial Output Parallel Output

Shift Registers CPInABCOut T00???? T110??? T2110?? T30110? T41 T51 T61 T0 is the register state just before the first clock pulse occurs T1 is after the first pulse and before the second. Initially unknown states are denoted by “?” Complete the last three rows of the table

Shift Registers with Parallel Load  The shift register shown earlier has no control input, thus data is always shifted on clock pulse  How to make the shift registers more controllable?

Shift Registers with Parallel Load  By adding a mux between each shift register stage, data can be shifted or loaded  If SHIFT is LOW, A and B are replaced by the data on DA and DB lines, else data shifts right on each clock. SHIFT IN DnDnA0 A1 Selector 2 to 1 MUX

Shift Registers with Parallel Load  But what if we want to hold to the current data, meaning no shift or no loading of new data?  The design must have 2 controls: 1.For the SHIFT 2.For the LOAD SHIFTLOADOPERATION 00No Change 01Load Parallel Data 1XShift right We use an AND gate to disabled the Load input, so we mark with don’t care condition

SHIFT REGISTER WITH PARALLEL LOAD AND HOLD OPERATION In Register Transfer Language: Shift : Q slQ, Shift Load : Q D

Bidirectional Shift Register

 Unidirectional Register  Capable of shifting only in one direction (like what we have discussed in last lecture) 1.Shift on clock pulse 2.Shift & Load 3.Shift, Load & Hold * shift occurs in one direction only  Bidirectional Register  A register that can shift in both directions 1.Shift Left (sl) 2.Shift Right (sr) And at the same time is capable of HOLD and LOAD

Bidirectional Shift Register  By placing a 4-input multiplexer in front of each D flip-flop in a shift register, we can implement a circuit with shift right, shift left, parallel load, hold. S0S1 A1 A2 A3 A4 4 to 1 mux S1S0Register Operation 00No change (hold) 01Shift Left 10Shift Right 11Parallel Load

Bidirectional Shift Register S1S0Register Operation 00No change (Hold) 01Shift Left 10Shift Right 11Parallel Load How do we represent his in RTL : (No Transfer occurs) S 1 S 0 : Q slQ S 1 S 0 : Q srQ S 1 S 0 : Q D

Bidirectional Shift Register  Lets analyze the single stage diagram of a Bidirectional Shift Register S1S0Register Operation 00No change (Hold) 01Shift Left 10Shift Right 11Parallel Load

Bidirectional Shift Register  Shift registers can also be designed to shift more than a single bit position right or left

Bidirectional Shift Register  Shift register can be designed to shift a variable number of bit positions specified by a variable called a shift amount.

4 Bits Bidirectional Shift Register

MUX-based Transfer

Dedicated MUX – based Transfer  Multiplexer connected to each register input produces a very flexible structure  Characterize the simultaneous transfers possible with this structure

Example 1: S0, S1, S2 = (0,0,1) and L0, L1, L2 = (0,0,1) then L2 : R2 ← R1

Example 2: S0, S1, S2 = (1,0,0) and L0, L1, L2 = (0,1,1) then L1: R1 ← R0, L2 : R2 ← R0

MUX and Bus – based transfer for Multiple Registers  Multiplexer dedicated to each register  Excessive amount of logic  High number of interconnections  3 n-bit 2-to-1 MUX  Each with own “Select” signal  Each register has own “Load” signal

MUX and Bus – based transfer for Multiple Registers Solution to the problem :  Shared transfer paths for registers  A shared transfer object is called a bus  Bus implementation using :  Multiplexers  Three – state nodes and drivers  In most cases, the number of bits is the length of the receiving register

Multiplexer Bus  Only need a single n-bit 3-to-1 MUX and parallel load registers  MUX outputs are shared as common path (bus)  SELECT  Determine contents of source register  LOAD  Determine destination register / register to be loaded with data

Multiplexer Bus Example 1: S1, S0 = (0,0) and L0, L1, L2 = (0,0,1) then L2 : R2 R0

Multiplexer Bus Example 2: S1, S0 = (1,0) and L0, L1, L2 = (1,1,0) then L0: R0 R2, L1 : R1 R2

Multiplexer Bus Example 3: S1, S0 = (1,0) and L0, L1, L2 = (0,1,1) then L1: R1 R2, L2 : R2 R2 (n.change)

Multiplexer Bus  A single bus driven by a MUX lowers cost, but limits the available transfers  Characterize the simultaneous transfers possible with this structure…  Characterize the cost savings compared to dedicated MUX…

Multiplexer Bus  3 rd transfer : cannot be done  Requires 2 simultaneous sources in a single bus  Cannot occur in 1 clock cycle  Requires at least 2 buses  However, dedicated MUX can do this

MUX-based vs Bus-based  MUX-based  Any combination of transfers is possible  Bus-based  Simultaneous transfers from different sources in single clock cycle is impossible  Reduction in hardware  Limitation in simultaneous transfers

Three – state Bus

 The 3 – input MUX can be replaced by a 3 – state node (bus) and 3 – state buffers  Cost is further reduced  Signals can travel in 2 directions  Use same bus to carry signals into and out of registers

Serial Transfers & Micro-operations

Serial Transfers & Microoperations  Serial transfers  Used for “narrow” transfer paths  Example : Telephone or cable line  Parallel – to – Serial : at source  Serial – to – Parallel : at destination  Serial micro-operations  Example 1 : Addition  Example 2 : Error – Correction for CDs Parallel  Serial Serial  Parallel SourceDestination

Serial Transfers  Serial mode  info is transferred / manipulated one bit at a time  Serial transfer from RA to RB is done with shift registers

Serial Transfers  Serial output (SO) of A connected with serial input (SI) of B  SI of A receives 0’s  Data from A transferred to B  Initial content of B shifted out to SO of B and lost

Serial Transfers  To maintain the data in A, connect SO of A to its SI

Serial Transfers  Shift  determine when & how many times the registers are shifted  Clock pulse (Clock) can pass to C only when Shift is HIGH (1)

Serial Transfers

Serial Micro-operations  Serial addition is a low cost way to add large numbers of operands, since a “tree” of full adder cells can be made to any depth.  Other operations can be performed serially as well, such as parity generation / checking or more complex error – check codes.  Shifting a binary number left = multiplying by 2  E.g: sl 0100  1000  Shifting a binary number right = dividing by 2  E.g: sr 0100  0010

Serial Adder  The circuit shown uses 2 shift registers for operands  A (3 :0)  B (3:0)  A full adder, and one more FF (for carry) is used to compute the sum  Result stored in A register and final carry in FF

Serial Adder  SI of B can receive new inputs  In each clock pulse / cycle :  New sum bit is transferred to A  New carry transferred to FF  Both registers shifted once to the right  Process cont. until Shift = 0

Analyzing the circuit : Serial AdderA3A2A1A0B3B2B1B0 SUM (A+B) + Cin CoutCinT T1 T2 T3 T4 Example 1: Reg A : 1000 Reg B : 0101

Analyzing the circuit : Serial AdderA3A2A1A0B3B2B1B0 SUM (A+B) + Cin CoutCinT T1 T2 T3 T4 Example 2: Reg A : 1011 Reg B : 0101

Parallel Adder FA A0 B0 Cin FA A1 B1 FA A2 B2 FA A3 B3 Cout S0 S1 S2 S3 Reg A Sin Sout A0 A1 A2 A3 Reg B Sin Sout B0 B1 B2 B3 Can be the input for Reg A

Serial vs. Parallel Transfers  Space vs. Time Trade-off  Serial adder is a sequential circuit because it includes the carry from FF. but need n clock cycle to complete the addition (Less Space, more Time)  Parallel adder is a combinational circuit because it needs n FA for n bit operation. Need only one clock cycle to complete the addition. (More Space, less Time)  Gives the designer choice.  More Space – More cost  More Time – More delay (not fast)

Thank You