Digital Logic & Design Dr. Waseem Ikram Lecture 37.

Slides:



Advertisements
Similar presentations
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Advertisements

Modulo-N Counters Module M10.4 Section 7.2.
Shift Registers Module M11.1 Section 7.3.
Give qualifications of instructors: DAP
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 6 – Part 1.
Lecture 22: Sequential Circuits Today’s topic –Clocks and sequential circuits –Finite state machines 1.
Digital Logic Design Brief introduction to Sequential Circuits and Latches.
1 EE365 Sequential-circuit analysis. 2 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered.
1 EE121 John Wakerly Lecture #10 Some shift-register stuff Sequential-circuit analysis.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Using State Machines as Control Circuits Lecture L9.4.
Multiplexers Lecture L6.4 Section 6.4.
Latches Module M10.1 Section 7.1. Sequential Logic Combinational Logic –Output depends only on current input Sequential Logic –Output depends not only.
Designing State Machines Lecture L9.2 Handout Section 9.2.
Counters as State Machines Lecture L9.1 Handout Section 9.1.
Designing State Machines SQRT controller Lecture L9.2a Section 9.2.
Latches Section 4-2 Mano & Kime. Sequential Logic Combinational Logic –Output depends only on current input Sequential Logic –Output depends not only.
Pulse-Width Modulated DAC Lecture 11.3 Section 11.5.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
Latches Lecture L8.1 Section 7.1 – Book Sect. 8.1– Handout.
Flip-Flops Lecture L8.2 Section 7.1 – Book Sect. 8.1– Handout.
BY: TRAVIS HOOVER 2/22/2011 CS 147 DR. LEE JK flip-flops.
Sequential Circuits. Combinational Circuits + Storage element output depends both on previous state and input Fig. 5-1.
Quiz What are the results of the following 4-bit bitwise logical operations? NOT OR NOR AND
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Complete Example.
CEC 220 Digital Circuit Design Dice Game Wed, April 06 CEC 220 Digital Circuit Design Slide 1 of 15.
S3 INNOVATION ELECTRONICS. LESSON TITLE: ELECTRONICS Learning Intention: To understand when to use different types of logic gates Activity: Building own.
State Machine Design State Machine Design Digital Electronics
Lecture No. 29 Sequential Logic.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
Lecture No. 23 Sequential Logic. Digital Logic & Design Dr. Waseem Ikram Lecture No. 23.
Digital Logic & Design Dr. Waseem Ikram Lecture No. 26.
Lecture No. 14 Combinational Functional Devices. Digital Logic &Design Dr. Waseem Ikram Lecture 14.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Digital Logic & Design Dr. Waseem Ikram Lecture No. 35.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
Logic Gates.
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Digital Logic & Design Dr. Waseem Ikram Lecture 39.
Digital Logic & Design Dr. Waseem Ikram Lecture 05
Digital Logic & Design Dr. Waseem Ikram Lecture No. 28.
ECEN 248 Lab 9: Design of a Traffic Light Controller
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
Digital Logic & Design Dr. Waseem Ikram Lecture No. 30.
Malik Najmus Siraj Digital Logic Design Malik Najmus Siraj
RTL Design Methodology
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Digital Logic & Design Dr. Waseem Ikram Lecture 38.
Lesson 16: State-Based Sequential Design
Counters as State Machines
Digital Logic & Design Dr. Waseem Ikram Lecture No. 34.
ECE 3130 – Digital Electronics and Design
Lecture No. 24 Sequential Logic.
Recap D flip-flop based counter Flip-flop transition table
Digital Logic & Design Dr. Waseem Ikram Lecture No. 31.
Digital Logic & Design Dr. Waseem Ikram Lecture No. 16.
Digital Logic & Design Dr. Waseem Ikram Lecture 40.
Reference: Chapter 5 Sequential Circuits Moris Mano 4th Ediditon
State Machine Design State Machine Design Digital Electronics
Digital Logic & Design Dr. Waseem Ikram Lecture No. 36.
Programmable Logic Devices
Objectives Construct truth tables for the following logic gates:
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
RTL Design Methodology
Digital System Design ASMD based Design
Presentation transcript:

Digital Logic & Design Dr. Waseem Ikram Lecture 37

SR1 latch which stores the status of the REQ1, FLOOR1 and OPEN buttons

Simplified State table for Elevator Control for REQ1, FLOOR1 and OPEN inputs Present State Next State SR1=0 SR1=1 W1(000) x C1(100) C1 W1 UP(110) W2(001) C2 DO C2(101) DO(111)

SR2 latch which stores the status of the REQ2, FLOOR2 and OPEN buttons

Simplified State table for Elevator Control for REQ2, FLOOR2 and OPEN inputs Present State Next State SR2=0 SR2=1 W1(000) C1 UP C1(100) UP(110) x W2(001) C2(101) C2 W2 DO(111)

Modified Block diagram of the Elevator State Machine

The Next State Table based on SR1, SR2 and ARRIVAL inputs Present State Next State SR1=0 SR1=1 SR2=0 SR2=1 ARRIVAL=0 ARRIVAL=1 W1(000) x C1(100) UP(110) W2(001) C2(101) DO(111)

Pin Declarations of the Elevator Input and Output signals CLK, !OLE Pin 1,11; REQ1, REQ2 Pin 2,3; FLOOR1, FLOOR2, OPEN, ARRIVE Pin 4, 5, 6, 7; SR1, SR1_ Pin 16, 17 ISTYPE ‘com.buffer’; SR2, SR2_ Pin 18, 19 ISTYPE ‘com.buffer’; DOOR, MOTION, DIR Pin 12, 13, 14 ISTYPE ‘reg.buffer’;

State Definition of the Elevator Controller CONSTATE = [DOOR, MOTION, DIR]; WAIT1 = ^B000; CLOSE1 = ^B100; UP = ^B110; WAIT2 = ^B001; CLOSE2 = ^B101; DOWN = ^B111;

State diagram for the Elevator Controller State_diagram CONSTATE State WAIT1: if (SR2) then UP else CLOSE1; State CLOSE1: if (SR2) then UP else if SR1 then WAIT1 else CLOSE1; State UP: if (ARRIVE) then WAIT2 else UP; State WAIT2: if (SR1) then DOWN else CLOSE2; State CLOSE2: if (SR1) then DOWN else if SR2 then WAIT2 else CLOSE2; State DOWN: if (ARRIVE) then WAIT1 else DOWN;

Equations for the latches SR1 and SR2 Equation Definition CONSTATE.CLK = Clock; SR1 = REQ1 # !DIR.FB & OPEN # DIR.FB & FLOOR1 # !SR1_; SR1_ = (!DOOR.FB & !MOTION.FB & !DIR.FB) # !SR1; SR2 = REQ2 # !DIR.FB & OPEN # DIR.FB & FLOOR2 # !SR2_; SR2_ = (!DOOR.FB & !MOTION.FB & DIR.FB) # !SR2;

The Traffic signals and sensors at a Traffic Intersection

Flow chart of conditions which switch the state from NSG to NSY

Pin Declarations for the Input and Output pins to the Controller circuit CLOCK, !OLE pin 1, 11; NSSR, EWSR, LTIME, STIME pin 2, 3, 8, 9; Q0, Q1, Q2 pin 17, 16, 15 ISTYPE ‘reg.invert’; TMRST pin 14 ISTYPE ‘com.invert’;

State definitions for the Traffic Light Controller TRSTATE = [Q2, Q1, Q0]; NSG = [ 0 , 0, 0]; NSY = [ 0, 0, 1]; NSY2 = [ 0, 1, 1]; NSR = [ 0, 1, 0]; EWG = [ 1, 1, 0]; EWY = [ 1, 1, 1]; EWY2 = [ 1, 0, 1]; EWR = [ 1, 0, 0];

State Diagram for the Traffic Light Controller State Diagram TRSTATE State NSG: if (!STIME) then NSG else if (LTIME) then NSY else if (EWSR & !NSSR) then NSG else if (EWSR & NSSR) then NSY else if (!NSSR) then NSG else NSY; State NSY: goto NSY2; State NSY2: goto NSR; State NSR: goto EWG; State EWG: if (!STIME) then EWG else if (LTIME) then EWY else if (NSSR & !EWSR) then EWG else if (EWSR & NSSR) then EWY else if (!EWSR) then EWG else EWY; State EWY: goto EWY2; State EWY2: goto EWR; State EWR: goto NSG;

Equation Definition CONSTATE.CLK = Clock; SR1 = REQ1 # !DIR.FB & OPEN # DIR.FB & FLOOR1 # !SR1_; SR1_ = (!DOOR.FB & !MOTION.FB & !DIR.FB) # !SR1; SR2 = REQ2 # !DIR.FB & OPEN # DIR.FB & FLOOR2 # !SR2_; SR2_ = (!DOOR.FB & !MOTION.FB & DIR.FB) # !SR2;

Recap

Elevator Controller

Elevator Controller PLD Programming

Traffic Light Controller

Traffic Light Controller PLD Programming

Digital Logic Design Lecture 37