hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

Similar documents
Digital Systems Laboratory 1 IE5 / WS 2001

LSN 12 Shift Registers

Flip-flop and Registers

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Universal Asynchronous Receiver- Transmitter (UART)

Feedback Sequential Circuits

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Introduction. Serial In - Serial Out Shift Registers (SISO)

CS/EE Homework 6

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Sequential Logic Design CS 64: Computer Organization and Design Logic Lecture #14

Logic Design. Flip Flops, Registers and Counters

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Digital Fundamentals: A Systems Approach

Lecture 8: Sequential Logic

Counter dan Register

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Flip-Flops and Registers

Registers and Counters

Experiment 8 Introduction to Latches and Flip-Flops and registers

1. Convert the decimal number to binary, octal, and hexadecimal.

ECE 3401 Lecture 11. Sequential Circuits

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Registers and Counters

Chapter 2. Digital Circuits

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Chapter 3 Unit Combinational

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Module -5 Sequential Logic Design

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Registers and Counters

Clock Domain Crossing. Presented by Abramov B. 1

Advanced Digital Logic Design EECS 303

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Chapter 5 Flip-Flops and Related Devices

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

ECE 263 Digital Systems, Fall 2015

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

CprE 281: Digital Logic

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Digital Fundamentals

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Digital Fundamentals: A Systems Approach

EITF35: Introduction to Structured VLSI Design

ECE 545 Digital System Design with VHDL Lecture 1B. Digital Logic Refresher Part B Sequential Logic Building Blocks

Decade Counters Mod-5 counter: Decade Counter:

Counters

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

RS flip-flop using NOR gate

Chapter 8 Registers & Counters

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Asynchronous (Ripple) Counters

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

RS flip-flop using NOR gate

Computer Organization & Architecture Lecture #5

Sequential Design Basics

MODULE 3. Combinational & Sequential logic

UNIT IV. Sequential circuit

CHAPTER 1 LATCHES & FLIP-FLOPS

MC9211 Computer Organization

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part B Sequential Logic Building Blocks

ASYNCHRONOUS COUNTER CIRCUITS

Chapter 6 Registers and Counters

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

DIGITAL REGISTERS. Serial Input Serial Output. Block Diagram. Operation

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

D Latch (Transparent Latch)

Chapter 11 Latches and Flip-Flops

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Unit 11. Latches and Flip-Flops

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

L5 Sequential Circuit Design

CHAPTER 6 COUNTERS & REGISTERS

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Introduction to Microprocessor & Digital Logic

CHAPTER 4: Logic Circuits

Vignana Bharathi Institute of Technology UNIT 4 DLD

Combinational vs Sequential

CSE 352 Laboratory Assignment 3

CHAPTER 4 RESULTS & DISCUSSION

Chapter 4: One-Shots, Counters, and Clocks

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Logic Design II (17.342) Spring Lecture Outline

ECE 3401 Lecture 12. Sequential Circuits (II)

ECE 545 Digital System Design with VHDL Lecture 2. Digital Logic Refresher Part B Sequential Logic Building Blocks

Modeling Latches and Flip-flops

Transcription:

8 Shift Registers A Johnson counter contains the basic structure of a shift register which is made up by a chain of D- FFs. Beginning with the LSB of a register (a number of D-FFs) each D-FF output can be connected to the data input of the D-FF with next higher weight. This chain of D-FFs includes the ability to shift the bits of the register to the left (LSB to MSB) or to the right (MSB to LSB). For example, a sequence of bits can be converted into a word by shifting the bits into a register and moving the bits along at each clock edge. After a sufficient number of clock edges, namely the number n of D-FFs, the n bits of a word are available as a single word. This is known as a serial-in and parallel-out register. Applications of shift registers will be found in serial communication interfaces. The receiver input device will clock in a data stream of sequenced bits and a parallel word will be accessed by internal processes. A sender will clock out a parallel stored word over a serial register output. Simple multiply and division operations can be performed by a shift register. A multiplication by two will be done with a shift left by one bit. Digital Circuits I 8-

Direction of shift is described by the weight of bits: Shift right: from MSB to LSB Shift left: from LSB to MSB The direct chaining of flip-flops is allowed because each time the clock gates of all flip-flops are opened the inputs are connected to stable output signal levels. If the output transition occurs after a certain propagation delay the clock gates are deactivated. Device example: 8-bit shift register SN74xx9 (8 stages). Serial shift input (LSB) is an AND gate. Shift right result Q is available in uncomplemented and complemented form. serial serial Input 5 stages output. clock edge 2. clock edge 3. clock edge 4. clock edge Digital Circuits I 8-2

8. 3-bit Serial-to-Parallel Converter In serial communications, such a shift register is used to receive a serial bit stream and support connected components with a parallel data word: bitfi n-bit. Serial data is read in at the shift input SE which appears at the REG register outputs. Control signal X distinguishes operational modes: X = : shift right, register outputs deactivated. X = : no shift, register outputs enabled Remember: Never delay clock lines with combinational logic! This example is just a symbolic schematic. Give suggestions for a professional solution! Digital Circuits I 8-3

VHDL description of an n-bit serial-to-parallel converter Parameterised register width with generic-statement. 2 processes: - clock edge gated internal shift register INTREG, - combinational output logic controlled by signal X and register state. Shift operation done with a for-loop. Loop subscript I does not need to be declared explicitly. Shift right: INTREG(I) <= INTREG(I-) entity SRG_NBIT is generic(n : natural :=3); -- number of bits equal to 3 port( CLK, SE, RESET, X: in bit; REG: out bit_vector(n- downto )); -- register with N flip-flops end SRG_NBIT; Digital Circuits I 8-4

architecture BEHAVE of SRG_NBIT is signal INTREG: bit_vector(n- downto ); begin P: process(clk, RESET) -- shift register begin if RESET='' then INTREG <= (others => '') after ns; elsif (CLK='' and CLK'event) then -- positive edge if X='' then -- professional synchronous enable!!!!! for I in N- downto loop -- shift to MSB (left) INTREG(I) <= INTREG(I-) after ns; end loop; INTREG() <= SE after ns; -- shift input copied into LSB end if; end if; end process P; P2: process(x, INTREG) -- output enable, combinational logic begin if X='' then REG <= INTREG after ns; else REG <= (others=>'') after ns; end if; end process P2; end BEHAVE; Digital Circuits I 8-5

All flip-flops are clocked at the same time. Shift is enabled if X =. Output is enabled if X = ''. Reliable shift functionality because of: Propagation delay t plh is larger than hold time t H. Simulation waveform of a 3-bit serial-to-parallel converter Digital Circuits I 8-6

8.2 Parallel-to-Serial Converter Shift registers are used as parallel-to-serial converters in transmitter components of transceiver devices: n-bitfi -bit A parallel load input E[2:] and a shift output SA = Q(2) is needed. Control of operation mode by signal X: X='' : shift left, inputs disabled, LSB will always be loaded with X='' : inputs are enabled, parallel data are stored with the next clock. All stages are identical therefore only one stage has to be designed fi Consider stage Q E X Combinational Logic D X Q E D D : 2 X E 4 6 X 5 7 E 3 X Q Q Digital Circuits I 8-7

Synthesized schematic of a 3-bit parallel-to-serial converter Next state forming logic interfaces between adjacent stages are identical. The LSB stage is driven by (Pulldown Resistor) The MSB will be first seen at the SA output. Digital Circuits I 8-8

VHDL code for a 3-bit parallel-to-serial converter entity PAR_SER is generic(n : natural :=3); -- number of bits, initialised with 3 port( CLK, RESET, X: in bit; E: in bit_vector(n- downto ); -- parallel data input SA: out bit); -- shift output end PAR_SER; architecture VERHALTEN of PAR_SER is signal INTREG: bit_vector(n- downto ); begin P: process(clk, RESET) -- shift register begin if RESET='' then INTREG <= (others => '') after ns; elsif (CLK='' and CLK'event) then -- rising edge if X='' then INTREG <= INTREG(N-2 downto ) & after ns; -- shift left else end if; end if; end process P; SA <= INTREG(N-); end VERHALTEN; INTREG <= E after ns; -- parallel data load -- MSB: shift output Digital Circuits I 8-9

Simulation waveforms of the parallel-to-serial converter Digital Circuits I 8-

8.3 Linear Feedback Shift Register (LFSR) A shift register with a feedback path via XOR gates to the LSB input generates pseudorandom test patterns that are useful in testing both combinational and sequential machines. A 4-bit LFSR which has an XOR feedback of bit numbers 2 and 3, will be initialised with 䀡 and it sequences through 5 of the 6 states. It is not allowed to enter the 䀡 state since that is a hang state because XOR will not generate a which is the start of the pseudorandom sequence. Register width 4 6 7 8 9 2 XOR- feedback register output subscripts 2,3 4,5 3,6 2,4 6,7 4,8 6,9 8, 5,7, 4-bit pseudorandom counting pattern Q 3 Q 2 Q Q Q/h Y 2 4 9 3 6 D A 5 B 7 F E C 8 Digital Circuits I 8-

Schematic and simulation waveform of a 4-bit LFSR Digital Circuits I 8-2