Linear Feedback Shift Registers (LFSR)

Slides:



Advertisements
Similar presentations
Hybrid Infrared and Visible Light Projection for Location Tracking
Advertisements

Abdullah Said Alkalbani University of Buraimi
Date of Birth Design Problem
Counters and Registers
ECE 555 Lecture 16: Design for Testability
CSE 370 Sample Final Exam Questions. 1) Logic Minimization CD AB F = Σm(0,6,7,8,9,11,15) + d(1,13)
- 1 - Using an SMT Solver and Craig Interpolation to Detect and Remove Redundant Linear Constraints in Representations of Non-Convex Polyhedra Christoph.
Register Transfer and Microoperations Part2
Principles & Applications
Fast Algorithms for Finding Nearest Common Ancestors Dov Harel and Robert Endre Tarjan Fast Algorithms for Finding Nearest Common Ancestors SIAM J. COMPUT.
15 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
1 Floating Point Representation and Arithmetic (see Patterson Chapter 4)
A Simple ALU Binary Logic.
B261 Systems Architecture
XFEL 2D Pixel Clock and Control System Train Builder Meeting, DESY 18 February 2010 Martin Postranecky, Matt Warren, Matthew Wing.
CS 105 Tour of the Black Holes of Computing
Monika Gope Lecturer IICT, KUET
Basic Finite State Machines 1. 2 Finite State Machines Binary encoded state machines –The number of flip-flops is the smallest number m such that 2 m.
1 Non-uniform Crossover in Genetic Algorithm Methods to Speed up the Generation of Test Patterns for Sequential Circuits Michael Dimopoulos - Panagiotis.
1 Interconnect and Packaging Lecture 3: Skin Effect Chung-Kuan Cheng UC San Diego.
Truth Tables & Logic Expressions
Discrete Mathematical Structures: Theory and Applications
Digital Systems Introduction Binary Quantities and Variables
Basics Combinational Circuits Sequential Circuits
Digital Logical Structures
Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built.
Logic Gates Flip-Flops Registers Adders
Exclusive-OR and Exclusive-NOR Gates
Module 3 Combinational and Sequential Logic Circuit By: Cesar Mendoza.
B AB CD C A D m0m1m3m2 m4 m5m7m6 m12 m8m9m11 m10 m13 m15m14 Input combo mintermExpressio n 0000m0A’B’C’D’ 0001m1A’B’C’D 0010m2A’B’CD’
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
V. Vaithianathan, AP/ECE
CS1022 Computer Programming & Principles
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Digital Logic & Design Lecture No. 3. Number System Conversion Conversion between binary and octal can be carried out by inspection.  Each octal digit.
10. Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ELECTRONICS TECHNOLOGY Digital Devices I Karnaugh Maps
and M-ary Quadrature Amplitude Modulation (M-QAM)
1/15/2015 Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Introduction to Binary, Octal and Hexadecimal Numbers Thaddeus Konar.
Number Systems Decimal Binary Denary Octal Hexadecimal Click the mouse or Press the space bar to Continue.
Internet Engineering Czesław Smutnicki Discrete Mathematics – Combinatorics.
Registers and Counters
Syed Safi Uddin Qadri BETL/F07/0112 GSM Stream Cipher Algorithm Presented To Sir Adnan Ahmed Siddiqui.
Copyright 2001, Agrawal & BushnellVLSI Test: Lecture 261 Lecture 26 Logic BIST Architectures n Motivation n Built-in Logic Block Observer (BILBO) n Test.
Copyright 2005, Agrawal & BushnellVLSI Test: Lecture 21alt1 Lecture 21alt BIST -- Built-In Self-Test (Alternative to Lectures 25, 26 and 27) n Definition.
Design for Testability Theory and Practice Lecture 11: BIST
Embedded Systems Hardware:
Shift Registers and Counters By Lakshmi Things that appear hard are normally trivial, If you do the obvious in the obvious way. After all, how “tough”
Embedded Systems Hardware: Storage Elements; Finite State Machines; Sequential Logic.
BIST AND DATA COMPRESSION 1 JTAG COURSE spring 2006 Andrei Otcheretianski.
Finite State Machines. Binary encoded state machines –The number of flip-flops is the smallest number m such that 2 m  n, where n is the number of states.
ECE 553: TESTING AND TESTABLE DESIGN OF DIGITAL SYSTEMS
Test pattern generator is BIST scan chains TESTGENERATOR COMPACOMPACCTTOORRCOMPACOMPACCTTOORRCTOR Control.
More Digital circuits. Ripple Counter The most common counter The problem is that, because more than one output is changing at once, the signal is glichy.
Linear Feedback Shift Register. 2 Linear Feedback Shift Registers (LFSRs) These are n-bit counters exhibiting pseudo-random behavior. Built from simple.
Reaction Timer Project
TOPIC : Signature Analysis. Introduction Signature analysis is a compression technique based on the concept of (CRC) Cyclic Redundancy Checking It realized.
A4 1 Barto "Sequential Circuit Design for Space-borne and Critical Electronics" Dr. Rod L. Barto Spacecraft Digital Electronics Richard B. Katz NASA Goddard.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
TOPIC : RTD, SST UNIT 5 : BIST and BIST Architectures Module 5.2 Specific BIST Architectures.
1 Modeling Synchronous Logic Circuits Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
FIRST REVIEW.
Hardware Testing and Designing for Testability
VLSI Testing Lecture 14: Built-In Self-Test
CPE/EE 428/528 VLSI Design II – Intro to Testing (Part 3)
Instructor: Alexander Stoytchev
Lecture 26 Logic BIST Architectures
Presentation transcript:

Linear Feedback Shift Registers (LFSR)

LFSR Applications Pattern Generators Counters Built-in Self-Test (BIST) Encryption Compression Checksums Pseudo-Random Bit Sequences (PRBS)

Basic 4-bit LFSR XOR-Based These circuits can also be built equivalently with XNOR states, with the “dead” state being all ‘1’s instead of all ‘0’s.

Basic 4-bit LFSR, XOR-Based Simulation Reset Operation | time = 1000.0ns ~RST=0 Q=1XXX | time = 2000.0ns ~RST=0 Q=11XX | time = 3000.0ns ~RST=0 Q=111X | time = 4000.0ns ~RST=0 Q=1111 | time = 5000.0ns ~RST=0 Q=1111 | time = 6000.0ns ~RST=0 Q=1111 | time = 7000.0ns ~RST=0 Q=1111 | time = 9000.0ns ~RST=1 Q=1111 | time = 10000.0ns ~RST=1 Q=0111 0 | time = 11000.0ns ~RST=1 Q=0011 1 | time = 12000.0ns ~RST=1 Q=0001 2 | time = 13000.0ns ~RST=1 Q=1000 3 | time = 14000.0ns ~RST=1 Q=0100 4 | time = 15000.0ns ~RST=1 Q=0010 5 | time = 16000.0ns ~RST=1 Q=1001 6 | time = 17000.0ns ~RST=1 Q=1100 7 | time = 18000.0ns ~RST=1 Q=0110 8 | time = 19000.0ns ~RST=1 Q=1011 9 | time = 20000.0ns ~RST=1 Q=0101 10 | time = 21000.0ns ~RST=1 Q=1010 11 | time = 22000.0ns ~RST=1 Q=1101 12 | time = 23000.0ns ~RST=1 Q=1110 13 | time = 24000.0ns ~RST=1 Q=1111 14 Range is 0  14; 2n states

Number of Taps For many registers of length n, only two taps are needed, and can be implemented with a single XOR (XNOR) gate. For some register lengths, for example 8, 16, and 32, four taps are needed. For some hardware architectures, this can be in the critical timing path. A table of taps for different register lengths is included in the back of this module.

One-to-Many and Many-to-One Implementation (a) has only a single gate delay between flip-flops.

Effects of Errors If using a sequence of 2n-1 then there is a potential lockup state For XOR LFSRs, lock up state = all 0’s. For XNOR LFSRs, lock up state = all 1’s. Probability of lockup is “relatively” low for large n, as a result of SEU # of lockup states = 1 total # of states = 2n Solutions: use a modified LFSR with 2n states implement a watchdog timer

Avoiding the Lockup State Will Use XOR Form For Examples We have an n-bit LFSR, shifting to the “right” n

Avoiding the Lockup State Will Use XOR Form For Examples The all ‘0’s state can’t be entered during normal operation but we can get close. Here’s one of n examples: 1 n We know this is a legal state since the only illegal state is all 0’s. If the first n-1 bits are ‘0’, then bit 0 must be a ‘1’.

Avoiding the Lockup State Will Use XOR Form For Examples Now, since the XOR inputs are a function of taps, including the bit 0 tap, we know what the output of the XOR tree will be: ‘1’. It must be a ‘1’ since ‘1’ XOR ‘0’ XOR ‘0’ XOR ‘0’ = ‘1’. 1 n So normally the next state will be: 1 n

Avoiding the Lockup State Will Use XOR Form For Examples But instead, let’s do this, go from this state: 1 n To the all ‘0’s state: 1 n

Avoiding the Lockup State Will Use XOR Form For Examples And then from the newly legal state: n Back to our regular sequence: 1 n

Avoiding the Lockup State Will Use XOR Form For Examples Implementation. First, detect the “almost” state: X n The NOR of these n-1 bits will provide a ‘1’ when they are all ‘0’s and serve as a marker.

Avoiding the Lockup State New Sequence of States 1 a) n b) n 1 c) n

Avoiding the Lockup State Modification to Circuit 2n-1 states 2n states NOR of all bits except bit 0 Added this term a) “000001” : 0 Xor 0 Xor 0 Xor 1 Xor 1  0 b) “000000” : 0 Xor 0 Xor 0 Xor 0 Xor 1  1 c) “100000” :

Making TCO For Long Counters At High Speeds (1) While the shift and XOR operations are fast, performance may be limited by the decoding of the terminal count out (TCO) The decoding of the TCO can be pipelined to keep the maximum clock frequency high Decoding of the all 1’s (or all 0’s) state can be done by counting the consecutive number numbers of 1’s (0’s) shifted.

Making TCO For Long Counters At High Speeds (2) • • • 1 2 n Count n 1’s (0’s) TCO Basic Scheme

Making TCO For Long Counters At High Speeds - Analysis (3) Algebraically Assume all bits = ‘1’ XOR function has a fan-in of either 2 or 4 Next bit shifted in will be a zero TCO can’t end too late The previous bit shifted out was a ‘0’ Otherwise bit 1 wouldn’t be a ‘1’ TCO can’t start too early Logically A string of n+1 1’s  an extra lockup state

Making TCO For Long Counters At High Speeds - Analysis (4) Period of LFSR is proportional to 2n Comparison of LFSR is proportional to n Comparison of TCO counter is proportional to log2n Example n = 64 f = 1 MHz t = 584,942.4 years

Making TCO For Long Counters At High Speeds - Example (5)

Making TCO For Long Counters At High Speeds - Example (6) |time = 7000.0ns ~RST=0 Q=1111 TCNT=0 COUNT=0\H |time = 8000.0ns ~RST=0 Q=1111 TCNT=0 COUNT=0\H |time = 9000.0ns ~RST=1 Q=1111 TCNT=0 COUNT=0\H |time = 10000.0ns ~RST=1 Q=0111 TCNT=0 COUNT=1\H 0 |time = 11000.0ns ~RST=1 Q=0011 TCNT=0 COUNT=0\H 1 |time = 12000.0ns ~RST=1 Q=0001 TCNT=0 COUNT=0\H 2 |time = 13000.0ns ~RST=1 Q=1000 TCNT=0 COUNT=0\H 3 |time = 14000.0ns ~RST=1 Q=0100 TCNT=0 COUNT=1\H 4 |time = 15000.0ns ~RST=1 Q=0010 TCNT=0 COUNT=0\H 5 |time = 16000.0ns ~RST=1 Q=1001 TCNT=0 COUNT=0\H 6 |time = 17000.0ns ~RST=1 Q=1100 TCNT=0 COUNT=1\H 7 |time = 18000.0ns ~RST=1 Q=0110 TCNT=0 COUNT=2\H 8 |time = 19000.0ns ~RST=1 Q=1011 TCNT=0 COUNT=0\H 9 |time = 20000.0ns ~RST=1 Q=0101 TCNT=0 COUNT=1\H 10 |time = 21000.0ns ~RST=1 Q=1010 TCNT=0 COUNT=0\H 11 |time = 22000.0ns ~RST=1 Q=1101 TCNT=0 COUNT=1\H 12 |time = 23000.0ns ~RST=1 Q=1110 TCNT=0 COUNT=2\H 13 |time = 24000.0ns ~RST=1 Q=1111 TCNT=1 COUNT=3\H 14 |time = 25000.0ns ~RST=1 Q=0111 TCNT=0 COUNT=0\H 0 |time = 26000.0ns ~RST=1 Q=0011 TCNT=0 COUNT=0\H 1

Taps for Maximum Length LFSR Counters (1)

Taps for Maximum Length LFSR Counters (2)

References The Art of Electronics, 2nd Edition, Horowitz and Hill, 1989, pp. 665-667 P. Alfke, “Efficient Shift Registers, LFSR, Counters, and Long Pseudo-Random Sequence Generators,” XAPP 052, July 7,1996 (Version 1.1) HDL Chip Design, Douglas J. Smith, Doone Publications, 1996.