ECE 3401 Lecture 11. Sequential Circuits

Similar documents
ECE 3401 Lecture 12. Sequential Circuits (II)

Flip-flop and Registers

Registers, Register Transfers and Counters Dr. Fethullah Karabiber

Logic Design. Flip Flops, Registers and Counters

Chapter 5 Sequential Circuits

Chapter 5 Sequential Circuits

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

CHAPTER 4: Logic Circuits

CSC Computer Architecture and Organization

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

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

CHAPTER 4: Logic Circuits

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

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks

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

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

Sequential Logic Counters and Registers

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

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

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Problems with D-Latch

Registers & Counters. BME208 Logic Circuits Yalçın İŞLER

Flip-Flops and Registers

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

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

ASYNCHRONOUS SEQUENTIAL CIRCUIT CONCEPTS

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

ELCT201: DIGITAL LOGIC DESIGN

Outputs Combinational circuit. Next state. Fig. 4-1 Block Diagram of a Sequential Circuit

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

Counters

CHAPTER1: Digital Logic Circuits

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

ECE 263 Digital Systems, Fall 2015

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

CHAPTER 6 COUNTERS & REGISTERS

LATCHES & FLIP-FLOP. Chapter 7

Chapter. Synchronous Sequential Circuits

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Administrative issues. Sequential logic

Feedback Sequential Circuits

Chapter 3 Unit Combinational

Combinational vs Sequential

Chapter 5 Sequential Systems. Introduction

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

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

LSN 12 Shift Registers

Engr354: Digital Logic Circuits

Asynchronous (Ripple) Counters

Sequential Circuits: Latches & Flip-Flops

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

RS flip-flop using NOR gate

Analysis of Sequential Circuits

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

ELCT201: DIGITAL LOGIC DESIGN

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

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Rangkaian Sekuensial. Flip-flop

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

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

Unit 11. Latches and Flip-Flops

ECE 341. Lecture # 2

D Latch (Transparent Latch)

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Sequential Circuits. Introduction to Digital Logic. Course Outline. Overview. Introduction to Digital Logic. Introduction to Sequential Circuits

Digital Fundamentals: A Systems Approach

Universal Asynchronous Receiver- Transmitter (UART)

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Synchronous Sequential Logic

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

IT T35 Digital system desigm y - ii /s - iii

Debugging of VHDL Hardware Designs on Altera s DE2 Boards

Sequential Logic Circuit

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Modeling Latches and Flip-flops

Registers and Counters

Serial In/Serial Left/Serial Out Operation

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

Chapter 3 Unit Combinational

Introduction to Sequential Circuits

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Counter dan Register

Digital Circuits ECS 371

6. Sequential Logic Flip-Flops

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Module -5 Sequential Logic Design

ELE2120 Digital Circuits and Systems. Tutorial Note 8

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

Vignana Bharathi Institute of Technology UNIT 4 DLD

Overview of Chapter 4

Logic Design II (17.342) Spring Lecture Outline

Transcription:

EE 3401 Lecture 11 Sequential ircuits Overview of Sequential ircuits Storage Elements Sequential circuits Storage elements: Latches & Flip-flops Registers and counters ircuit and System Timing Sequential circuit description and analysis: State tables & State diagrams 1

Sequential ircuits A Sequential circuit contains: Storage elements: Latches or Flip-Flops ombinational Logic: implements a multiple-output switching function Next state function: Next State = f(inputs, State) Output function: two types Mealy : Outputs = g(inputs, State) Moore: Outputs = h(state) Inputs State ombinational Logic Storage Elements Outputs Next State Latches R (reset) S (set) S (set) Basic S-R latch R (reset) Basic S-R latch S R locked S-R latch latch 2

Edge-Triggered Flip-Flop The edge-triggered flip-flop is the masterslave flip-flop S R The change of is associated with the negative edge at the end of the pulse - negative-edge triggered flip-flop Triggered Flip-flop Behavior Example Use the characteristic tables to find the output waveforms for the flip-flops shown: lock Triggered? 3

Modeling of Flip-Flops Library IEEE; use IEEE.Std_Logic_1164.all; Flip-flop controlled by a clock pulse edge. entity FLOP is port (, LK : in std_logic; : out std_logic); end FLOP; architecture A of FLOP is process wait until LK event and LK= 0 ; <= ; end process; end A; Or: process (clk) if (clk= 0 ) then <= ; end if; end process; irect Inputs At power up or at reset, sequential circuit usually is initialized to a known state before it s operation one outside of the clocked behavior of the circuit, i.e., asynchronously. irect R/S inputs S For the example flip-flop shown 0 applied to R resets the flip-flop to the 0 state 0 applied to S sets the flip-flop to the 1 state R 4

Positive Edge-Triggered Flip-flop with Asynchronous Set/Reset library IEEE; use IEEE.std_logic_1164.all; entity ASYN_FF is port (, LK, SETN, RSTN : in std_logic; : out std_logic); end ASYN_FF; architecture RTL of ASYN_FF is process (LK, RSTN, SETN) if (RSTN = `1`) then <= `0`; elsif SETN ='1' then <= '1'; elsif (LK event and LK = 1 ) then <= ; end if; end process; end RTL; It has a sensitivity list If / elsif structure The last elsif has an edge No unconditional else branch Registers Register: the simplest storage component in a computer, a bit-wise extension of a flip-flop. Registers can be classified into Simple Registers Parallel-Load Registers Shift Registers 5

Simple Registers Fig.1 A 4-bit Register: top schematic, bottom graphical symbol. I 3 I 2 I 1 I 0 3 3 2 2 1 1 0 0 clk 3 2 1 0 lk I 3 I 2 I 1 I 0 3 2 1 0 A simple register consists of N flip-flops driven by a common clock signal. Has N inputs and N outputs in addition to the clock signal. Fig.2 A 4-bit register with asynchronous preset and clear Preset clk clear I 3 I 2 I 1 I 0 3 2 1 0 Preset I 3 I 2 I 1 I 0 3 3 2 2 1 1 0 0 clk lear 3 2 1 0 6

Library ieee; USE ieee.std_logic_1164.all; ENTITY simple_register IS GENERI ( N : INTEGER := 4); PORT ( I : IN ST_LOGI_VETOR (N-1 OWNTO 0); lock, lear, Preset : IN ST_LOGI; : OUT ST_LOGI_VETOR (N-1 OWNTO 0)); EN simple_register; ARHITETURE simple_memory OF simple_register IS BEGIN PROESS (Preset, lear, lock) BEGIN IF Preset = 0' THEN <= (OTHERS => 1');; ELSIF lear = '0' THEN <= (OTHERS => '0'); ELSIF (lock'event AN lock = '1') THEN <= I; EN IF; EN PROESS; EN simple_memory; Parallel Load Registers In the previous registers, new data is stored automatically on every rising edge of the clock. In most digital systems, the data is stored for several clock cycles before it is rewritten. For this reason it is useful to be able to control WHEN the data will be entered into a register. Use a control signal called Load or Enable.This allows loading into a register known as a parallelload register. 7

VHL ode for Parallel-load Register Library ieee; USE ieee.std_logic_1164.all; ENTITY load_enable IS GENERI ( N : INTEGER := 4); PORT ( : IN ST_LOGI_VETOR (N-1 OWNTO 0); lock, Resetn, load : IN ST_LOGI; : BUFFER ST_LOGI_VETOR(N-1 OWNTO 0)); EN load_enable; ARHITETURE rtl OF load_enable IS SIGNAL state : std_logic_vector(n-1 OWNTO 0); BEGIN PROESS (Resetn, lock) IS BEGIN IF Resetn = '0' THEN state <= (OTHERS => '0'); ELSIF (lock'event AN lock = '1') THEN IF load = '1' THEN state <= ; ELSE state <= state; EN IF; EN IF; EN PROESS; <= state; EN rtl; Timing diagram for parallel-load register 8

Serial-in/Parallel-out Shift Register Parallel Load Shift Register 9

ounters ounter: a special type of register that incorporates an incrementer or decrementer, which allows it to count upward or downward. We shall examine VHL code for the following counters: Up counter own counter VHL for Up-ounter Library ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; ENTITY upcount IS GENERI ( N : INTEGER := 4 ); PORT ( lock, Resetn, Enable : IN ST_LOGI; : BUFFER ST_LOGI_VETOR (N-1 OWNTO 0)); EN upcount; ARHITETURE cnt OF upcount IS SIGNAL count : ST_LOGI_VETOR (N-1 OWNTO 0); BEGIN PROESS (Resetn, lock) BEGIN IF Resetn = '0' THEN count <= ( OTHERS => 0 ); ELSIF (lock'event AN lock = '1') THEN IF Enable = '1' THEN count <= count +1; ELSE count <= count; EN IF; EN IF; EN PROESS; <= count; EN cnt; 10

Timing iagram for Up-ounter Synchronous ounters Internal Logic Incrementer: +0 or +1 ontraction of a ripple carry adder with one operant fixed at 000X Symbol for Synchronous ounter TR 4 Incrementer 1 2 EN 0 1 3 2 3 O Symbol 11

Synchronous ounters (ontd.) ontraction of carry-lookahead adder Reduce path delays alled parallel gating Lookahead can be used on Os and ENs to prevent long paths in large counters EN 0 1 1 2 2 3 3 O Logic iagram-parallel Gating ounter with Parallel Load Load ount Action Load 0 0 Hold Stored Value 0 1 ount Up Stored Value 1 X Load ount 0 0 Add path for input data enabled for Load = 1 Load TR4 1 1 Add logic to: When Load = 1 disable count logic (feedback from outputs) When Load = 0 and ount = 1 enable count logic ount 0 1 2 3 0 1 2 3 O 2 2 3 3 lock arry Output O 12

B ounter architecture Behavioral of bcd_counter is signal regcnt : std_logic_vector(3 downto 0); count: process(reset,clk) is if ( reset='1' ) then regcnt <= "0000"; elsif ( clk'event and clk='1') then regcnt <= regcnt+1; if (regcnt = "1001") then regcnt <= "0000"; end if; end if; end process; end Behavioral; 13