analysis with T flip-flops Follow the same procedure for JK flip-flops next state is determined by characteristic table or characteristic equation

Similar documents
Chapter 5. Introduction

EECS 3201: Digital Logic Design Lecture 9. Ihab Amer, PhD, SMIEEE, P.Eng.

Chapter 5 Synchronous Sequential Logic

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Unit-5 Sequential Circuits - 1

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

FSMD%Block%Diagram. FSM$Datapath*Systems. Datapath%Elements


Chapter. Synchronous Sequential Circuits

Lecture 11: Synchronous Sequential Logic

B.Tech CSE Sem. 3 15CS202 DIGITAL SYSTEM DESIGN (Regulations 2015) UNIT -IV

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

Digital Logic Design I

Sequential Design Basics

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

Unit 11. Latches and Flip-Flops

Part II. Chapter2: Synchronous Sequential Logic

Synchronous Sequential Logic

Dr.Mohamed Elmahdy Winter 2015 Eng.Yasmin Mohamed. Problem Set 6. Analysis and Design of Clocked Sequential Circuits. Discussion: 7/11/ /11/2015

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Universidad Carlos III de Madrid Digital Electronics Exercises

Chapter 5: Synchronous Sequential Logic

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Chapter 5 Synchronous Sequential Logic

ELCT201: DIGITAL LOGIC DESIGN

Sequential Logic Circuits

Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic

Synchronous Sequential Logic

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

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

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

Flip-Flops and Registers

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

Flip-Flops and Sequential Circuit Design

ELE2120 Digital Circuits and Systems. Tutorial Note 7

Synchronous Sequential Logic. Chapter 5

Other Flip-Flops. Lecture 27 1

Logic Design. Flip Flops, Registers and Counters

Analysis of Clocked Sequential Circuits

Engr354: Digital Logic Circuits

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

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

Introduction to Computer Engineering EECS dickrp/eecs203/

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Synchronous Sequential Logic

Combinational / Sequential Logic

Last time, we saw how latches can be used as memory in a circuit

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

MC9211 Computer Organization

LAB 7. Latches & Flip Flops

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

Administrative issues. Sequential logic

ELCT201: DIGITAL LOGIC DESIGN

CAD FOR VLSI DESIGN - I Lecture 32. V. Kamakoti and Shankar Balachandran


Course Administration

Modeling Latches and Flip-flops

P U Q Q*

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

Lecture 8: Sequential Logic

Note that none of the above MAY be a VALID ANSWER.

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

ENGR 303 Introduction to Logic Design Lecture 10. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

ENGN3213 Digital Systems and Microprocessors Sequential Circuits

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

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

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Modeling Latches and Flip-flops

CHAPTER 4: Logic Circuits

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

Chapter 5 Sequential Circuits

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

Synchronous Sequential Logic

CHAPTER 4: Logic Circuits

Experiment 8 Introduction to Latches and Flip-Flops and registers

INTRODUCTION TO SEQUENTIAL CIRCUITS

Combinational vs Sequential

Advanced Digital Logic Design EECS 303

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

CHAPTER 1 LATCHES & FLIP-FLOPS

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

Two types of state machine as classified by output formation

Problems with D-Latch

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

Introduction to Sequential Circuits

AIM: To study and verify the truth table of logic gates

ELCT201: DIGITAL LOGIC DESIGN

Chapter 5 Sequential Circuits

Counters

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

Experiment # 12. Traffic Light Controller

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

ECE 263 Digital Systems, Fall 2015

L5 Sequential Circuit Design

Logic Design II (17.342) Spring Lecture Outline

Transcription:

5 차시 1

analysis with T flip-flops Follow the same procedure for JK flip-flops next state is determined by characteristic table or characteristic equation Q( t 1) T Q T' Q TQ'

Figure 5.20 Sequential circuit with T flip-flop

input and output equations T T A B Bx x y AB state equations A( t 1) ( Bx)' A ( Bx) A' B( t 1) x B AB' Ax' A' Bx

Flip-Flop Inputs Ta Tb 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 T T A B Bx x y AB A( t 1) ( Bx)' A ( Bx) A' AB' Ax' A' Bx B( t 1) x B

Mealy and Moore models Mealy model : output=f(present state,input) Moore model : output=f(present state) outputs are synchronized with the clock

5.6 HDL for sequential circuits Behavioral modeling two behavioral statement : initial, always initial (or always) begin within a module, block of statement end multiple initial or always statements in a module executes concurrently

initial : useful for generating input signals ex) free-running clock initial begin clock=1 b0; repeat (30) #10 clock=~clock; end initial begin clock=1 b0; #300 $finish; end always #10 clock=~clock;

always : controlled by delays, certain condition, or by events to occur events that initiates the execution (level sensitive or edge triggered) always @ (event control expression) procedural assignment statements blocking, and non-blocking always @ (A or B or reset) always @ (posedge clock or negedge reset)

Examples) always @ (A or B or reset) always @ (posedge clock or negedge reset) blocking B = A C = B+1 non-blockng B <= A C <= B+1

flip-flops and latches //Description of D latch (fig. 5-6) module D_latch (Q,D,control); output Q; input D,control; reg Q; always @ (control or D) if (control) Q=D; //D flip-flop module D_FF (Q,D,CLK); output Q; input D,CLK; reg Q; always @ (posedge CLK) Q=D; //D flip-flop with asynchronous reset module DFF (Q,D,CLK,RST); output Q; input D,CLK,RST; reg Q; always @ (posedge CLK or negedge RST) if(~rst) Q=1 b0; else Q=D;

//T flip-flop from D flip-flop module TFF (Q,T,CLK,RST); output Q; input T,CLK,RST; wire DT; assign DT=Q^T; //instantiate D flip-flop DFF TF1 (Q,DT,CLK,RST); //D flip-flop with asynchronous reset module DFF (Q,D,CLK,RST); output Q; input D,CLK,RST; reg Q; always @ (posedge CLK or negedge RST) if(~rst) Q=1 b0; else Q=D; //JK flip-flop from D flip-flop module JKFF (Q,J,K,CLK,RST); output Q; input J,K,CLK,RST; wire JK; assign JK=(J&~Q) (~K&Q); //instantiate D flip-flop DFF TF1 (Q,JK,CLK,RST); Q( t 1) Q( t 1) Q T JQ' K' Q

Describe the flip-flop using the characteristic table //functional description of JK flip-flop module JK_FF (J,K,CLK,Q,Qnot); output Q,Qnot; input J,K,CLK; reg Q; assign Qnot=~Q; always @ (posedge CLK) case ({J,K}) 2 b00:q=q; 2 b01:q=1 b0; 2 b10:q=1 b1; 2 b11:q=~q; endcase

state diagram parameter S0=2 b00, S1=2 b01, S2=2 b10, S3=2 b11; always @ (Prstate or x) //Determine the next state case (Prstate) S0 : if (x) Nxtstate=S1; else Nxtstate=S0; S1 : if (x) Nxtstate=S3; else Nxtstate=S0; S2 : if (x) Nxtstate=S0; else Nxtstate=S2; S3 : if (x) Nxtstate=S2; else Nxtstate=S0; endcase always @ (Prstate or x) //Evaluate output case (Prstate) S0 : y=0; S1 : if (x) y=1 b0; else y=1 b1; * Mealy state diagram S2 : if (x) y=1 b0; else y=1 b1; S3 : if (x) y=1 b0; else y=1 b1; endcase

//Moore state diagram module Moore_mdl (x,ab,clk,rst); input x,clk,rst; output [1:0] AB; reg [1:0] state; parameter S0=2 b00, S1=2 b01, S2=2 b10, S3=2 b11; always @ (posedge CLK or negedge RST) if (~RST) state=s0; else case (state) S0 : if (~x) state=s1; else state=s0; S1 : if (x) state=s2; else state=s3; S2 : if (~x) state=s3; else state=s2; S3 : if (~x) state=s0; else state=s3; endcase assign AB=state; //output * Moore state diagram

structural description combinational circuit : data-flow statement flip-flop operation : behavioral statement sequential circuit : combination of dataflow and behavioral statement flip-flops are described with an always statement combinational parts are described with assign statement and boolean equation combined by instantiation

//structural description of sequential circuit module Tcircuit (x,y,a,b,clk,rst); input x.clk,rst; output y,a,b; wire TA,TB; //flip-flop input equations assign TB=x; TA=x&B; //output equation assign y=a&b; //instantiate T flip-flops T_FF BF (B,TB,CLK,RST); T_FF AF (A,TA,CLK,RST); //T flip-flop module T_FF (Q,T,CLK,RST) output Q; input T,CLK,RST; reg Q; always @ (posedge CLK or negedge RST) if(~rst) Q=1 b0; else Q=Q^T; //stimulus for testing sequential circuit module testtcircuit; reg x,clk,rst; //input wire y,a,b; //output Tcircuit TC (x,y,a,b,clk,rst); initial begin RST=0; CLK=0; #5 RST=1; repeat (16) #5 CLK=~CLK; end initial begin x=0; #15 x=1; repeat (8) #10 x=~x; end