LAB 3 – Review of the Assignment. -- Clarifications Vikram Murali. TA : CSE 140L Prof. CK Cheng.

Slides:



Advertisements
Similar presentations
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Advertisements

Sequential Circuits Storage elements
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Slide 1 7. Verilog: Combinational always statements. VHDL: Combinational Processes: To avoid (I.E. DO NOT What in your HDL code?) Cases that generate Synthesis.
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
Our First Real System.
ECE 353 Computer Systems Lab II VHDL AND LABORATORY TOOLS TUTORIAL Professors Maciej Ciesielski & T. Baird Soules.
DISCUSSION CSE 140L 3 rd November 2010 Vikram Murali.
EE 316 Computer Engineering Junior Lab Project 1: Traffic Light Controller.
1 COMP541 State Machines Montek Singh Feb 6, 2007.
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
1 Lecture 14: FSM and Basic CPU Design Today’s topics:  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/24  will cover Chapters.
1 Synchronous Sequential Circuit Design. 2 Sequential circuit design In sequential circuit design, we turn some description into a working circuit – We.
Lecture 8: Sequential Networks and Finite State Machines CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Bug Session One. Session description In this session, pupils are introduced to a programming sequence which will make a light pattern on their Bug. Objectives.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Advanced Digital Circuits ECET 146 Week 7 Professor Iskandar Hack ET 221B,
Unit 14 Derivation of State Graphs
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
Implementing software in IEC Languages in IEC IEC uses the following languages Instruction List – Assembly level programming using.
ECE 3130 – Digital Electronics and Design Lab 6 State Machines Fall 2012 Allan Guan.
Digital Logic Design Lecture # 21 University of Tehran.
Introduction to State Machine
State Table Problem #1 An electronic lock is controlled by a keypad, which has three buttons labeled A, B, and R. The keypad is restricted such that, at.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
1Sequential circuit design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA by Erol Sahin and Ruken Cakici.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
PLC programming Part 3: Problems with solutions. Topics  Every problem is devided into three parts:  Technology description contains the general properties.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Lecture 5. Verilog HDL #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
11 Making Decisions in a Program Session 2.3. Session Overview  Introduce the idea of an algorithm  Show how a program can make logical decisions based.
Finite State Machines Mealy machine inputs Outputs next state function
Introduction to the FPGA and Labs
EECE6017C Lab 1 Introduction to Altera tools and Circuit Simulation
Week #7 Sequential Circuits (Part B)
Sequential Networks and Finite State Machines
The first change to your project files that is needed is to change the device to the correct FPGA. This is done by going to the Assignments tab on the.
AS Computer Studies Finite State Machines 1.
Clocks A clock is a free-running signal with a cycle time.
COMP211 Computer Logic Design Introduction to the DE2 Board
COMP541 Sequential Logic – 2: Finite State Machines
ECEN 248 Lab 9: Design of a Traffic Light Controller
Synchronous Sequential Circuit Design
ELEC 1041 Digital Electronics Tutorial: Word Problems
CSE 140L Discussion Finite State Machines.
ECE 3130 – Digital Electronics and Design
Lecture 24 Logistics Last lecture Today HW7 due today
CSE 370 – Winter Sequential Logic-2 - 1
Lab 1. Introduction to the DE2 Board
ECE 352 Digital System Fundamentals
Instructor: Alexander Stoytchev
Lecture 24 Logistics Last lecture Today HW7 due today
Counters.
Lecture 4. Introduction to the DE2 Board
CSE 140 Lecture 9 Sequential Networks
Instructor: Alexander Stoytchev
ECE 352 Digital System Fundamentals
Verilog Synthesis & FSMs
EGR 2131 Unit 12 Synchronous Sequential Circuits
Digital Designs – What does it take
ECE 352 Digital System Fundamentals
Finite State Machine Continued
Instructor: Michael Greenbaum
Presentation transcript:

LAB 3 – Review of the Assignment. -- Clarifications Vikram Murali. TA : CSE 140L Prof. CK Cheng.

Part 1.. FSM Traffic Light Controller. Designing an FSM for a simple signal system NS and EW signals NS = Green. EW = Red -> Default State

Part 1 Contd.. Walk NS and Walk EW  Input Signals. Walk EW = ON, Walk NS = Off, system changes from default state EW = Red, NS = Yellow  Orange  Red. When NS = Red, EW immediately turns green. Holds for two clock cycles. Then if Walk EW = 1, stays here. Else

Part 1 Contd.. NS = Red, EW = Yellow  Orange  Red. When EW = Red, NS immediately turns green. We have reached the default state.

Part 1.. Demonstration Implement the state machine, and then show how the signals change around for different input signals (i.e. Walk Signals) Be sure you can explain the transitions. This state machine is quite simple anyways.

Part 1.. Report - Draw the FSM of your traffic light controller (Moore). - Include the state/output table of your traffic light controller - Include schematic diagrams of your circuit - No need to include functional and timing diagrams. - Pretend your system is currently NS = green and EW = red. Someone comes along and presses the EW button. Then someone presses the NS button one second later. Describe what you see and explain why. Can you make the green light on EW hold forever? Explain.

Part 2.. The Train.

Part 2.. Contd.. Inputs : S1, S2, S3, S4. -- Sx = 0 => train far, -- Sx = 1 => train near. Outputs : SW 1, SW 2, Dir A, Dir B. -- SW 1 and SW 2 : switch controls -- SW1=SW2=0  Shared track connected to track A, else track B. -- Dir A and Dir B : control train motion. -- whether or not it happens. -- and in what direction. -- Dir A or Dir B = 00 => Stop. -- Dir A or Dir B = 10 => Causes the train in that direction to GO. -- Dir A or Dir B = 01 => Causes trains to Reverse.

Part 2.. Contd.. The train’s destiny is in your hands. Well, yes : the state transitions, outputs. -- You have to do it based on the problem statement, That’s the assignment ! RECAP : 4 I/Ps, 4 O/Ps, Problem statement. State transitions ? O/Ps ? Ensure the trains don’t collide.

Part 2.. Report. - Draw the FSM of your train controller - Include the VHDL code of your train - Write a 1/2 page (more if you want) description of what your VHDL code is doing for tcontrol. Start from the top and go towards the end. Convince us that you know what each major segment of the VHDL is doing. As we already know, the major segments are the ENTITY part, the ARCHITECTURE PART, the "PROCESS (clock) part", and the "WITH state SELECT" part. (This must be easy as Each of these was already discussed in detail in the discussion class). Relate the FSM with the VHDL code by explaining how the VHDL implements the FSM you came up with. -Let's have some fun with our train. Switch 1 and 2 are set incorrectly so that the incoming trains will derail. Try it! Describe what happens.

Part 2.. Bonus Points. Demonstrate some wacky or interesting train pattern. Vary the speeds or change the outputs, states, etc. See what you can do! Make the trains go in the reverse directions. Try : reversing Train B onto A and seeing what happens, or doing head-on collisions, etc. You can get B onto A's track or vice versa, or you can do funny train patterns. Have fun and be creative!! Your states might no longer make sense, such as the case when both A and B are on the same track, and one of the trains hits a sensor. You can fix this by adding the correct states, or you can try varying the speeds so that one train goes way faster than the other, ends up on the same track, and then rams the other train (before your train controller realizing something is wrong and freezing your trains). This one is for you guys to have fun and try various things, so don't worry about making a system that actually is correct!. It is fine if the trains are still no longer running on the tracks. But try to explain to us what is happening.

Part 2.. Demonstration Show that the trains run collision free on their tracks (on the monitor). Test the setup by varying SW 1,2,3 and 4 to control the speeds of the trains. (SW here means switches on the board). Why ? This will bring out any mistakes you may have committed in your state machines.

Part 3.. Sequence Detector. Design a simple sequence detector to output a 1 whenever a combination of 0110 is encountered in the input sequence. Give your inputs using push button switches and implement this problem statement as both Mealy and Moore machines in VHDL. Since you already know the framework, we are not going to give you any files here. So again : You need to make your state machines for both Mealy and Moore models for this detector, implement them in VHDL (Verilog also very much acceptable) and run it on Quartus, program it on your board and show us that and how it works.

Part 3.. Demonstration Just show a 1 (on one of the LEDs may be) when a 0110 is input using push button switches. Remember our clock is 1 hz. Period = 1second. Can use an input vector in your VHDL file if you find timing the presses of the push buttons weird. Can you detect other input sequences (say a 101) ? (This is not a requirement. But those who are on for an early finish might want to try.

Part 3..Report. - Your Mealy and Moore state machines. - Include your State transition tables. - VHDL/Verilog code for the sequence detector (both Mealy and Moore). - Mention the differences observed between the two models. Which do you think is better and why ? Explain. - Design the circuit using logic mininisation method. Get the final implementation on paper {like problem 1.} No need to use the board! Now compare both methods. Do you see how much more comfortable using HDL is ?

Deadlines Due : 19 th November Demonstration : Again using sign up sheets. Keep checking the class webpage : “News and Updates column” for more details.

Thank You again ! ……You were great listeners.