DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Similar documents
Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Module 3: Floyd, Digital Fundamental

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Asynchronous Counters. Asynchronous Counters

Systems I: Computer Organization and Architecture

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Counters & Shift Registers Chapter 8 of R.P Jain

Counters and Decoders

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Lecture-3 MEMORY: Development of Memory:

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design Sequential circuits

Memory Elements. Combinational logic cannot remember

The components. E3: Digital electronics. Goals:

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

DEPARTMENT OF INFORMATION TECHNLOGY

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Contents COUNTER. Unit III- Counters

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Lecture 8: Synchronous Digital Systems

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Counters are sequential circuits which "count" through a specific state sequence.

BINARY CODED DECIMAL: B.C.D.

Flip-Flops, Registers, Counters, and a Simple Processor

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

CHAPTER 11 LATCHES AND FLIP-FLOPS

Upon completion of unit 1.1, students will be able to

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Lesson 12 Sequential Circuits: Flip-Flops

ECE380 Digital Logic

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

CS311 Lecture: Sequential Circuits

Chapter 2 Logic Gates and Introduction to Computer Architecture

Counters. Present State Next State A B A B

Let s put together a Manual Processor

Sequential Logic Design Principles.Latches and Flip-Flops

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Layout of Multiple Cells

Cascaded Counters. Page 1 BYU

Lab 1: Study of Gates & Flip-flops

Theory of Logic Circuits. Laboratory manual. Exercise 3

Copyright Peter R. Rony All rights reserved.

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Sequential Logic: Clocks, Registers, etc.

Decimal Number (base 10) Binary Number (base 2)

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Engr354: Digital Logic Circuits

Digital Electronics Detailed Outline

CSE140: Components and Design Techniques for Digital Systems

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

CHAPTER 3 Boolean Algebra and Digital Logic

Registers & Counters

Chapter 5. Sequential Logic

ASYNCHRONOUS COUNTERS

Operating Manual Ver.1.1

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Fig1-1 2-bit asynchronous counter

Sequential Circuit Design

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Chapter 9 Latches, Flip-Flops, and Timers

CpE358/CS381. Switching Theory and Logical Design. Class 10

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

CHAPTER 11: Flip Flops

Combinational Logic Design Process

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Master/Slave Flip Flops

Fundamentals of Digital Electronics

Systems I: Computer Organization and Architecture

(Refer Slide Time: 00:01:16 min)

LFSR BASED COUNTERS AVINASH AJANE, B.E. A technical report submitted to the Graduate School. in partial fulfillment of the requirements

Digital Controller for Pedestrian Crossing and Traffic Lights

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

MICROPROCESSOR AND MICROCOMPUTER BASICS

Digital Fundamentals

7. Latches and Flip-Flops

DATA SHEETS DE COMPONENTES DA FAMÍLIA LÓGICA TTL GATES AND INVERTERS POSITIVES NAND GATES AND INVERTERS DESCRIÇÃO

Lecture 10: Sequential Circuits

Transcription:

DIGITAL TECHNICS II Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED 2nd (Spring) term 22/23 5. LECTURE: REGISTERS. Storage registers 2. Shift registers 3. Register application examples 4. Register counters Texts: Benesóczky, pp. 9-33. Zsom II, pp. 64-89. Rőmer, 6-22 old. Rőmer: Problems, pp. 5-55., pp. 24-29. 2

REGISTERS: AN INTRODUCTION Registers are devices which are used to store and/or shift data entered from external sources. They are constructed by connecting a number of flip-flops in cascade. A single flip-flop can store bit of data, thus an n-bit register will require n flip-flops. In a digital system such registers are generally used for temporary storage of data. Az információt csak folyamatos, megadott tűréshatáron belüli tápfeszültség érték mellett tudják megőrizni. LOADING (INPUT) AND READING (OUTPUT) METHODS () parallel loading and reading series/parallel input series output In case of series input and/or series output the data are transferred from one position to the next one, therefore there circuit connections between the neighbouring positions. 4 2

LOADING (INPUT) AND READING (OUTPUT) METHODS (2) Series input, parallel or series output series input and output series/parallel input/output 5 REGISTERS: PROPERTIES AND CLASSIFICATION Classification according to internal structure and operation/function: - storage register; - shift register Storage register: it takes data from parallel inputs and copies it to the corresponding output when the registers are clocked. It can be used as a kind of history, retaining old information as the input in another part of the system, until ready for new information, whereupon, the registers are clocked, and the new data is let through. It is usually built using D flip-flops. 3

STORAGE REGISTERS Gate level Chip level 7 STORAGE REGISTER WITH ENABLE 4

REGISTER, LATCH A registers are composed of D or DG flip-flops usually having common clock/gate and clear inputs (MSI IC: 4- or 8-bit). D flip-flop: register, DG flip-flop: latch. data outputs data outputs clock edge triggered gate static data inputs Register (common clock) data inputs Latch (common G input) USES OF STORAGE REGISTERS arithmetical units; temporary storage between counter and display; code and signal conversion operations; input/output storage registers in μps; intermediate storage functions in arithmetic/logic units (ALU); various types of other temporary storage functions. 5

SHIFT REGISTERS The shift function of a register allows the stored data to be moved serially from stage to stage or into or out if the register. Types of data movement: - serial shift right or left - parallel shift in to and out The shift is executed by the synchronizing or clock signal. Register are used for conversion of data form serial to parallel and vice versa. Also used as counters. In shift registers the flip-flop types used should not be transparent. Usually master-slave types are used. SHIFT REGISTERS: CHARACTERISTIC EUATIONS Right shift register: Left shift register: i n = i+ n- i n = i- n- Bi-directional shift register Right sift (M=) - left shift (M = ): _ i n = M i- n- + M i+ n- 6

SHIFT REGISTER In a shift register the information stored in the FFs shift to right or left for each clock pulse. Can be used to series-to-parallel or to parallelto series conversion. Parallel outputs Series input Series output 3 SHIFT REGISTER: TRUTH TABLE CLK 2 3 4 D - - - 2 D2 D - 3 D3 D2 D - 4 D4 D3 D2 D 5 D5 D4 D3 D2 6 D6 D5 D4 D3 7 D7 D6 D5 D4... 4 7

RIGHT SHIFT REGISTER: J-K FLIP FLOPS DATA IN J A A B C D J A J A J A CP K A _ CP K A _ CP K A _ CP K A _ CLK CLR 5 SHIFT REGISTER: D FLIP FLOPS Data input Clock Synchronously operated 4-bit right shift register built from D flip-flops. 6 8

LEFT SHIFT REGISTER Clock Data input Synchronously operated 4-bit left shift register built from D flip-flops. 7 SHIFT REGISTER: STATE TRANSITION DIAGRAM State transition diagram initial state 9

BI-DIRECTIONAL SHIFT REGISTER a b c d SS shift right (SHR) shift left (SHL) load (LOAD) hold (HOLD) Functional diagram of bidirectional shift register with load and hold facility UNIVERSAL SHIFT REGISTER 2

DESIGN OF UNIVERSAL SHIFT REGISTER 2 A LEFT-RIGHT SHIFT REGISTER WITH PARALLEL READ AND WRITE

REGISTERS: DESIGN ASPECTS Collection of flip-flops with similar controls and logic Stored values somehow related (e.g. form binary value) Share clock, reset, and set lines Similar logic at each stage 23 SERIES/PARALLEL INPUT/OUTPUT REGISTER Parallel outputs Series output Series input Parallel inputs 24 2

UNIVERSAL SHIFT REGISTER 25 DESIGN OF UNIVERSAL SHIFT REGISTER 26 3

Serial addition of two numbers. B (M-S) CLR Cp B n A REGISTER APPLICATION m n Σ (bin) m Sum Overflow. Clearing of register B (CLR B); 2. Loading first addend to register A (Cp A); 3. Result (sum) transferred into register B (Cp B); 4. Loading next addend to register A (Cp A); 5. Repeat 3. and 4. till there is a new addend. Cp A 27 EXAMPLE: REGISTER COPY OPERATION Uses both sequential and combinatorial logic 4

CIRCULAR REGISTER () data X3 X2 X X shift/clock A circular register is formed by connecting (feeding back) the output of the last flip-flop to the (D-) input of the first flip-flop. In the circular register the clock keeps the binary information rotating. The bit pattern can be loaded in a parallel way. SHIFT REGISTER COUNTERS Shift register counter a circuit formed by a shift registers and combinational logic. The state diagram for this state machine is cyclic. This circuit does not necessarily count in ascending or descending order. Ring counter the simplest shift register counter. This circuit uses a n-bit shift register to obtain a counter with n states 5

RING COUNTER The circular register can be operated as a ring counter. The counter is initially preset, e.g. by loading into the first flipflop. Then the modulus of the counter is equal to the number of flip-flops N. Appropriately changing the pre-loaded bit pattern, the modulus can be decreased. Encoding: a b c d E.g. depending on the preloaded code word, an 4-bit ring counter can exhibit six different cycles. 4-BIT RING COUNTER CYCLES State transition diagram of the 4-bit ring counter: six possible cycles 6

SELF CORRECTING RING COUNTER D D D D & Self correction from illegal state: e.g. Operating cycle:,,, A self correcting counter is designed so that all abnormal states have transitions leading to normal states. SELF CORRECTING RING COUNTER State transition diagram of the 4-bit self-correcting ring counter 7

RING COUNTER APPLICATIONS Signal series generated by ring counter state can be used for control purposes. Similar signal series can also be generated by a counterdecoder system, however in such case greater then one Hamming distance codes can be present on the decoder input. This can lead to the occurrence of functional hazards. 35 RING COUNTER APPLICATION A ring counter, instead of counting with binary numbers, counts with words that have a single high bit. These are ideal for timing a sequence of digital operations. An application: time-division multiplexor 2 3 D D D2 D3 & & & & OUT: D D D2 D3 D D 8

JOHNSON (MÖBIUS) COUNTER Twisted-ring, Möbius or Johnson counter is a n-bit shift register whose serial input receives the complement of serial output. This counter has 2n states. The feedback circuit is a single inverter. Beginning from a state of full s, the counter at first fills up itself with s, then with s. The modulus is 2N. Encoding: a, b, c, d:,,,,,,, JOHNSON COUNTERS A Johnson counter is a special case of a shift register, where the output of the last stage is inverted and fed back to the first stage. A pattern of bits equal to the length of the shift register thus circulates indefinitely. These counters are sometimes called walking ring counters. 9

JOHNSON (MÖBIUS) COUNTER State decoding: two-input AND gate and inverters. E.g. () a d () ab etc. The ouputs obtained in this waydo not contain hazards, because the codes are one-step codes. 39 SELF-CORRECTING JOHNSON COUNTER From any initial state returns to the normal cycle. Operation: The Johnson counter sooner or later takes up the state XX. This activates the LOAD function, setting the normal operation cycle. & 4 2

JOHNSON COUNTER + + + \Reset J S CLK K R J S 2 J S 3 J S 4 CLK CLK CLK K R K R K R Shift + Shift 2 3 4 8 possible states, single bit change per state, useful for avoiding glitches (hazards) STRAIGHT AND TWISTED RING COUNTERS 42 2

CIRCULAR REGISTER (2) & The 8-bites circular register has 2 states with the feedback shown. Starting form the state..., after the 4th then after the 6th clock cycle its state will be. CIRCULAR REGISTER (3): PSEODO RANDOM NUMBER GENERATOR = A B C D If the feedback network is an XOR gate, then using appropriate outputs of the register, the modulus of the counter will be 2 N -. For the circuit shown, with the given initial value the modulus will be the maximum possible i.e.5. 22

PSEUDO RANDOM NUMBER GENERATOR = A B C D Sequence: (), (8), (4), (2), (9), (2), (6), (), (5), (), (3), (4), (5), (7), (3). Important property: the sequence of codes is rather random. (c.f. Benesóczky Z., Digitális tervezés funkcionális elemekkel) PSEUDO RANDOM NUMBER GENERATOR Important property: the sequence of codes is rather random. (), (8), (4), (2), (9), (2), (6), (), (5), (), (3), (4), (5), (7), (3). No. of stages No. of states Serial No. of FFs to fed back 3 7 3, 2 4 5 4, 3 (shown above) 5 3 5, 3 6 63 6, 5 7 27 7, 6 (c.f. Benesóczky Z., Digitális tervezés funkcionális elemekkel...) 23

4-BIT FIBONACCI LFSR A 4-bit Fibonacci LFSR with its state diagram. The XOR gate provides the feedback that shift bits left to right. The maximum sequence consists of every possible state except rhe state. 47 6-BIT FIBONACCI LFSR 48 24