Digital Design 2010 DE2 1

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

Module 3: Floyd, Digital Fundamental

Asynchronous Counters. Asynchronous Counters

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

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

Counters and Decoders

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

Digital Logic Design Sequential circuits

Cascaded Counters. Page 1 BYU

Sequential Logic Design Principles.Latches and Flip-Flops

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

Systems I: Computer Organization and Architecture

Lecture 8: Synchronous Digital Systems

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

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

A New Paradigm for Synchronous State Machine Design in Verilog

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

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

Counters & Shift Registers Chapter 8 of R.P Jain

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

Memory Elements. Combinational logic cannot remember

BINARY CODED DECIMAL: B.C.D.

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

Lecture-3 MEMORY: Development of Memory:

Contents COUNTER. Unit III- Counters

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DEPARTMENT OF INFORMATION TECHNLOGY

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

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

Counters. Present State Next State A B A B

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

ASYNCHRONOUS COUNTERS

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CS311 Lecture: Sequential Circuits

Chapter 8. Sequential Circuits for Registers and Counters

Microprocessor & Assembly Language

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

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

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

CHAPTER 11: Flip Flops

Master/Slave Flip Flops

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Lecture 7: Clocking of VLSI Systems

Sequential Logic: Clocks, Registers, etc.

Asynchronous counters, except for the first block, work independently from a system clock.

Registers & Counters

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

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

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

CHAPTER 3 Boolean Algebra and Digital Logic

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Chapter 9 Latches, Flip-Flops, and Timers

Systems I: Computer Organization and Architecture

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

The components. E3: Digital electronics. Goals:

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

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

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

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

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

Multiple clock domains

Lesson 12 Sequential Circuits: Flip-Flops

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

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

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

Design Verification & Testing Design for Testability and Scan

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

Flip-Flops and Sequential Circuit Design

CSE140: Components and Design Techniques for Digital Systems

Manchester Encoder-Decoder for Xilinx CPLDs

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

Modeling Registers and Counters

Modeling Latches and Flip-flops


NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

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

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

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

State Machines in VHDL

8254 PROGRAMMABLE INTERVAL TIMER

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Wiki Lab Book. This week is practice for wiki usage during the project.

Lecture 11: Sequential Circuit Design

Sequential Circuit Design

Lecture 10: Sequential Circuits

Layout of Multiple Cells

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

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

The 104 Duke_ACC Machine

Chapter 5. Sequential Logic

Sequential 4-bit Adder Design Report

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Binary Adders: Half Adders and Full Adders

Transcription:

1 Modul 4 Shift Registers 2 DE2 1

Ashift register shifts its stored data by one bit position at each tick of the clock. If there are n flip flops then the first bit given at SERIN will appear at SEROUT after nclock ticks. This is aserial in serial out shift register. This type of shift register can be used to delay a signal by n counts. 3 111 1 1 1 Data is shifted one position at each tick of the clock 4 DE2 2

1 1 1 111 5 1 1 1 1 1 1 6 DE2 3

Why 2 12 possible combinations? There are 2 12 possible combinations of current state and input. LIN is input for left shift where as RIN is input for right shift. It is also called universal shift register as it can be made to use what ever way we like or desire, it can shift data in both direction left or right using RIN & LIN. 7 These registers are seldom used these days because they are typically build in PLD and FPGA, earlier shown registers are all unidirectional as the data only flows in one direction, 74194 is bidirectional shift register by using the Shift right or Shift Left control inputs. It is highly condensed function table. 8 DE2 4

1 S1 1 1 S2 S4 1 S3 1 Serial or Parallel conversion is a data application however, they can be used as non-data application. Typically, ashift register can be combined with combinational logic to form a state machine whose state diagram is cyclic, it is called shift-register counter. This is constructed as aring counter which provides 4 different states, once RESET is asserted the circuit loads 1 and after RESET is un-asserted with each clock tick the counter moves from 1 1 1 1 and as QA is connected to LIN so it will repeat the sequence. 9 Load Ring counter has one major issue, if by chance any bit is changed due to some reason it will behave inconsistently and will move in undesired states. For example due to a hardware problem (S1= ), then it will remain in that state for ever. In general an nbit ring counter visits n states in acycle. 1 DE2 5

The counter has 4 output so the possible states are 16, we can see that there are 12 states which are undesirable states, so one has to avoid that system should not go into these and may have to design with a minimal risk approach so that the system goes to a safe state. 11 A B C D 1 1 1 1 1 1 1 1 1 1 1 1 1 X X X X X X X X Self correcting design will lead all undesired states to normal desired states. For an n bit ring counter, correction can be achieved within (n 1) clock ticks. Here we are using 3 input NOR gate to self correct the abnormality. 12 DE2 6

3 2 1 1 It can be seen from the diagram that no mater what state you start in after 3 clock ticks you will end up into the normal state. This also means that RESET is not necessary for such a circuit, however typically RESET is part of the circuit as the ring counter can start at the same state with all other circuit in the system. 13 One important property of ring counters is that the outputs are glitch free due to exactly only one ff change its output in each state. A B C D 1 1 1 NOR gates are more difficult to construct than the NAND gates in CMOS/TTL, so we change the circuit with a NAND gate and we also pull down D input and pull up A, B and C to have a single circulating. 14 DE2 7

It may be desired to provides individual digit outputs rather than a binary or BCD output. Which can be achieved by adding a decoder circuit to the binary counter. Fortunately, Johnson counter is the simplest answer to this problem. If the complemented serial output is fed back to the ring counter it becomes a Johnson counter and will have 2n states. It is also named as Twisted Ring or Moebius 15 Note an important property of this counter? 16 DE2 8

Johnson counter also suffers the same problem of undesirable states occurrence which for an nbit Johnson counter are 2 n -2n. 17 The total number of abnormal (undesired) states are =2 n 2n =16 8=8. This circuit loads 1 when ever the current state is xx. Self correction in Johnson counter is within n 2 ticks (compared to n 1 of the ring counter). 18 DE2 9

The problem with standard shift register counter is that it has far less normal states, so a linear feedback shift register has 2 n 1 states, almost maximum. It is also called maximum length sequence generator. It is based on a finite field theory, which says that for any value of n, there exist at least one feedback equation that makes the counter go through all nonzero 2 n 1 states before repeating. 19 X1 X 1 1 1 1 Theshiftregisterispresetto1atthestart,nowtaketheexampleofn=2,sototalstates should be 4 1 = 3, now using the exclusive OR gate it can be seen that the system goes (sequence through) to the following states: 1, 1 1, 1 and repeat again. So the equation X2 = X1 X. 2 DE2 1

21 The counter cycle through 7 states before returning to the starting state. It is possible to design a circuit so that it can go to all possible 2 n (8) states, however, in this particular case it will not be possible because of how connections are made, also next state for all zero s will be zero s. 22 DE2 11

This modified circuit can cycle through all possible 2 n states. 23 The circuit shown is a realization of 74194 the only difference is that its CLR_L is synchronous where as in the original it is asynchronous. 24 DE2 12

We can see that each phase (Pi_L) last for 2 ticks of the clock, this can be easily constructed using a ring counter. 25 It is possible by inserting an extra flip flop to count the 2 ticks of each phase. 26 DE2 13

The input clock MCLK is divided by 2 through a FF so producing the output after every 2 clock cycle. 27 This is also similar meaning the output is produced after every 2 clock, difference is that output remains in that state for only one clock period and is shifted by one clock time period, what kind of ring counter can produce such an outputs? 28 DE2 14

This function table give us a behavioural description of a shift register, in addition to load, hold and shift function it can do arithmetic functions as well. Shift left is different than shift right as in SL right input is and for SR we replicate sign bit. 29 An iterative circuit is a combinational circuit so all its primary and boundary inputs must be applied simultaneously, and all its primary and boundary outputs are available after the combinational delay. 3 DE2 15

Shaded block is the iterative comparator and the flip flop provides the boundary input. 31 32 DE2 16

Serial Binary adder for any length is shown. 33 Most digital systems can be divided into two components: Control Unit & Data Unit. Synchronous systems are simple in design and they are reliable, however, there are certain issues which can result difficulty in achieving reliability. Control Unit: Responsible for starting and stopping actions in data units, testing various conditions and making decision under various situations. Data Unit: Storing, Routing and may be combining data. In general Control Unit is designed as state machines. 34 DE2 17

All flip flops are clocked with the same common clock signal and PRESET/CLEAR inputs are not used. Race and Hazard are not an issue in synchronous system. 35 36 DE2 18

There are various situations when such a thing happens, for example a long route to reach to FF2 or may be it is routed through a buffer to increase the fan out. 37 Even in the controllable clock skew problem may not be solved if there is unbalanced load on different buffers, so it is recommended that designer must ensure such balance. 38 DE2 19

CAD has routed clock leading to skew problem, also in ASIC design there are different types of wire connections (Polysilicon & Metal), which obviously have different properties so it can also lead to same problem. 39 Designer must use fastest type of wire connection for Clock and also use a tree like structure to avoid skew problem. 4 DE2 2

In some situations a designer may gate the clock with clock enable, which may produce a glitch on GCLK. 41 Basically, CLKEN must be stable during the entire duration when CLOCK_L is low. 42 DE2 21

Theoretically, it is possible to build the entire computer system as a synchronous machine but practically, it is impossible. A simple synchronizer can be build to synch the system with the main synchronous system. 43 Due to the reason stated earlier, the synchronizer may not see the ASYNCIN and CLOCK at the same time leading to inconsistent result as shown above. 44 DE2 22

It may be a combinational circuit as shown above. 45 46 DE2 23

Metastability occurs when the setup and hold time of a ff is violated. One can force the ff into a valid logic state using input signals that meet the specifications for pulse width, setup time etc. Second wait so the ff comes out of that meta stable state, question is how long to be waited. t r = t clk - t comb - t setup (t clk : Clock period time, t comb : PD time of combinational logic, t setup :Set up time of ffs. 47 48 DE2 24

49 t r =t clk -t comb -t setup (t clk : Clock period time, t comb : PD time of combinational logic, t setup : Set up time of ffs.) 5 DE2 25

51 The clock is slowed down, usually division of 2 or 3 gives a good synchronizer. 52 DE2 26

There could be similar skew problem for CLOCKN signal so a better option is given above, where it synched with the CLOCK. 53 In an n cycle synchronizer, the larger is the value of n longer it takes by the synchronous system to see the change happened in the asynchronous input, this is the price paid by reliable systems. So rather than dividing, cascading the synchronizers works better. 54 DE2 27

Generates/recovers a 1 MHz signal which is in phase with the input. As Sync is asserted for 1 ns per byte, it may not be possible to consistently detect the signal with a much slower clock of 33.3 MHz (3 ns), so data is to be hold temporarily and shifted later with a SLOAD signal which is asserted exactly one 3 ns SCLK period (SLOAD basically serves as a new data available signal). Through the recovered signal of 1 MHz, data is shifted bit by bit into a serial to parallel shift register We also need to detect the data for byte boundaries and once it is detected it generates a SYNCH signal at every 8 RCLK ticks. (for 1 ns per byte) 55 56 DE2 28

57 58 DE2 29

59 6 DE2 3