Lab 3 Finite State Machines Movie Ticket Dispensing Machine

Similar documents
Lab 3 Finite State Machines Automated Teller Machine

Lab 3 Sequential Logic for Synthesis. FPGA Design Flow.

Lab 6 Using PicoBlaze. Fast Sorting.

Lab Assignment 2. Implementing Combinational and Sequential Logic in VHDL

Lab 2 Implementing Combinational Logic in VHDL. Advanced Testbenches.

An easy to read reference is:

ECE 4305 Computer Architecture Lab #1

Lab 5. Using Fpro SoC with Hardware Accelerators Fast Sorting

Tutorial on FPGA Design Flow based on Xilinx ISE WebPack and ModelSim. ver. 2.0

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

ELEC 204 Digital System Design LABORATORY MANUAL

CCE 3202 Advanced Digital System Design

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Tutorial on FPGA Design Flow based on Aldec Active HDL. ver 1.7

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Lab Assignment 1. Developing and Using Testbenches

Tutorial: Working with the Xilinx tools 14.4

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack andisim. ver. 1.0

ISE Design Suite Software Manuals and Help

FPGA Design Flow 1. All About FPGA

Exercise Sheet 3 (10 Points)

Tutorial on FPGA Design Flow based on Aldec Active HDL. ver 1.6

Timing Analysis in Xilinx ISE

EE209 Lab Change We Can Believe In

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.5

Laboratory #Intro to Xilinx ISE and CR-2 Kit ECE 332

Laboratory Memory Components

EITF35 - Introduction to Structured VLSI Design (Fall ) 7. Assignment 3 - Arithmetic Logic Unit (ALU)

Nexys 2/3 board tutorial (Decoder, ISE 13.2) Jim Duckworth, August 2011, WPI. (updated March 2012 to include Nexys2 board)

COS/ELE 375 Verilog & Design Tools Tutorial

The Design, Simulation, Verification and Implementation of Vending Machine Based on FPGA

University of Hawaii EE 361L. Getting Started with Spartan 3E Digilent Basys2 Board. Lab 4.1

ECE 491 Laboratory 1 Introducing FPGA Design with Verilog September 6, 2004

EE 1315: DIGITAL LOGIC LAB EE Dept, UMD

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

Building Combinatorial Circuit Using Behavioral Modeling Lab

CCE 3202 Advanced Digital System Design

LINE BUTTONS LCD SCREEN

ELEC 4200 Lab#0 Tutorial

Midterm Exam ECE 448 Spring 2019 Wednesday, March 6 15 points

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Getting Started with Xilinx WebPack 13.1

Practical 4: RTC on FPGA

Lab 6 : Introduction to Verilog

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

Finite State Machines

Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

Lab Exercise 4 System on chip Implementation of a system on chip system on the Zynq

Xilinx ChipScope ICON/VIO/ILA Tutorial

Nexys 2 board tutorial (Decoder, ISE 12.2) Jim Duckworth, August 2010, WPI. Digilent Adept Programming Steps added by Zoe (Zhu Fu)

Experiment 3. Digital Circuit Prototyping Using FPGAs

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.3

LABORATORY # 6 * L A B M A N U A L. Datapath Components - Adders

Lab 2: Barrel Shifter Design

Finite State Machines

Chapter 9: Integration of Full ASIP and its FPGA Implementation

Vivado Tutorial. Introduction. Objectives. Procedure

Xilinx Project Navigator Reference Guide

Simulation Lab 7 Use ISE to Auto-Generate Testbench Simulations

Design a three-input, two-output sequential digital circuit which functions as a digital locking mechanism. LOCK ALARM

Verilog Simulation Mapping

AccelDSP tutorial 2 (Matlab.m to HDL for Xilinx) Ronak Gandhi Syracuse University Fall

Circuit Design and Simulation with VHDL 2nd edition Volnei A. Pedroni MIT Press, 2010 Book web:

How to use the IP generator from Xilinx to instantiate IP cores

Digital Design LU. Lab Exercise 1

PlanAhead Release Notes

Counters, Timers and Real-Time Clock

Circuit design with configurable devices (FPGA)

DESIGN STRATEGIES & TOOLS UTILIZED

FPGA Design Flow. - from HDL to physical implementation - Victor Andrei. Kirchhoff-Institut für Physik (KIP) Ruprecht-Karls-Universität Heidelberg

Using Xilinx ChipScope Pro ILA Core with Project Navigator to Debug FPGA Applications. UG750 (v12.3) November 5, 2010

FPGA Design Tutorial

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

LAB 5 Implementing an ALU

Lab 6: Intro to FPGAs

Getting started with the Xilinx Project Navigator and the Digilent BASYS 2 board.

TSIU03, SYSTEM DESIGN LECTURE 2

CSE/ESE 260M Introduction to Digital Logic and Computer Design. Lab 3 Supplement

Lab 5 Mandelbrot Fractal Viewer

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Xilinx Tutorial Basic Walk-through

Vivado Tutorial. Introduction. Objectives. Procedure. Lab Workbook. Vivado Tutorial

Multi-Output Circuits: Encoders, Decoders, and

ECE 436 Laboratory 4 TARGETING THE XESS PROTO-BOARD AND PHYSICAL TESTING WITH A LOGIC ANALYZER

1. Synopsis: 2. Merging Algorithm:

Tutorial: Working with Verilog and the Xilinx FPGA in ISE 9.2i

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

1. Introduction EE108A. Lab 1: Combinational Logic: Extension of the Tic Tac Toe Game

EITF35 - Introduction to Structured VLSI Design (Fall 2017) Course projects

Programmable Logic Design I

CAD SUBSYSTEM FOR DESIGN OF EFFECTIVE DIGITAL FILTERS IN FPGA

Introduction. About this tutorial. How to use this tutorial

VHDL introduction Notes

Lab #1: Introduction to Design Methodology with FPGAs part 1 (80 pts)

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Transcription:

Lab 3 Finite State Machines Movie Ticket Dispensing Machine Design, implement, verify, and test a Movie Ticket Dispensing Machine based on the following specification: The machine should allow the choice between the following movie options: F1r (Film 1, regular) F1d (Film 1, 3D) F2r (Film 2, regular) F3d (Film 3, 3D). The number of tickets requested can be any number between 1 and 9. Every regular movie ticket costs $12, whereas every 3D movie ticket costs $18. Film 1 is available in both versions. If the user decides to buy more than one ticket, the second ticket will receive a 25% discount. Third ticket onwards, all tickets will be 50% off the original price. The Movie Ticket Dispensing Machine accepts the following bills: $1, $5, $10, and $20. The total value of all entered bills cannot exceed $99. The machine is capable of Accepting user choices Calculating the total price Dispensing tickets Returning change. The exact way of performing these tasks using the Digilent Nexys 3 board is described below: Step 1: Choosing a movie The machine displays the first option F1r (Film 1, regular) The user makes selection using the buttons Up (BTNU) and Down (BTND) of the FPGA board, by scrolling through the wrap-around list of all available ticket options F1r F1d F2r F3d

Each time the user is pressing Button Up or Button Down the code of an appropriate movie is displayed on the three leftmost seven-segment displays. The rightmost seven-segment display is left blank. The final selection is confirmed using the center button called Enter (BTNS). After making the selection, LED0 is switched on, and the default number of tickets, 1, is displayed on the right-most seven-segment display. Step 2: Choosing the ticket quantity The machine displays a default number of tickets "1" on the right-most seven segment display. By using buttons Up (BTNU) and Down (BTND), the user can choose the number of tickets between 1 and 9. An attempt to reduce the number of tickets below 1 or increase it above 9 should not be allowed, and the number of tickets on the seven-segment display should remain the same. The movie selection should remain to be displayed based on step 1, and thus, the total information appearing on the display may look for example as follows: F1d3. The final selection is confirmed using the button Enter (BTNS). After making the selection, LED1 is switched on (with LED0 remaining in the on state), and the total price of all tickets, taking all discounts into account, is displayed using all four seven segment displays. For example, this price may look as follows: 40.50 Step 3: Entering Bills The Movie Ticket Dispensing Machine should accept the following dollar amounts: 1 Dollar - Button BTNU 5 Dollar - Button BTND 10 Dollar - Button BTNL 20 Dollar - Button BTNR. After each bill is entered the total value of all bills entered so far is displayed. For example, the amount entered so far may be equal to: 45.00. The total is not allowed to exceed $99 (i.e., any subsequent entry is ignored). The final selection is confirmed using the button Enter (BTNS).

If the total amount entered is smaller than the total price of all tickets, the total amount entered should be displayed blinking for 3 seconds, and the machine should return to the Entering bill mode. If the total amount entered is greater or equal than the total price of all tickets: the tickets should be dispensed by showing a final movie selection, e.g., F1d3 blinking for 5 seconds the amount of change should be displayed afterwards, e.g., 04.50 LED2 should be switched on (with LED0 and LED1 remaining in the on state). Additional requirements and hints: Reset Condition: Switch 0 should be used as an asynchronous reset active high. Hint: Extend your BCD_AS circuit designed as a part of Lab Assignment 2 Task 1 to a 4-digit BCD_AS. Use this adder to calculate the total price of the tickets total value of all bills entered change to be returned to the user. Bonus Task 1: Add an additional capability of using the machine as a clock, in parallel with its regular operation. Switch 1 should be used to switch between the regular operation (SW1=OFF) and the clock display mode (SW1=ON). The clock should display the current time in the military (24-hour) mode, e.g., 13.30 represents 1:30pm. After reset, the clock should be set to 00.00 representing midnight. In order to enter the current time: Switch 2 should be set to ON, and then buttons Up and Down should be used to set an hour part of the current time in the range 00..23 buttons Left and Right should be used to set a minute part of the current time in the range 00..59. After the Switch 2 is set to OFF, the clock operates normally in the background, independently of the state of Switch 1. If the current time is between 00:00 and 16:00 a 20% discount should be applied to all prices, on top of the regular discount dependent on the number of tickets purchased. Bonus Task 2: Add sound effects to the Movie Ticket Dispensing Machine, e.g., by using an external buzzer.

Steps to accomplish required and bonus tasks: 1. Draw one or more Algorithmic State Machine (ASM) charts implementing the required functionality. Please note that multiple state machines, working in parallel, can be used to achieve the required behavior. 2. Translate the ASM charts to VHDL. 3. Develop a testbench with two versions of timing constants, one used for simulation, and the other used for the actual operation of the circuit on the board. 4. Perform functional simulation of your code. 5. Synthesize your code using Xilinx XST. 6. Prepare the correct UCF (User Constraints File) file. 7. Implement your circuit using Xilinx ISE. 8. Check thoroughly all implementation reports. Pay attention to timing, resource usage, and pin allocations. 9. Perform post-synthesis and timing simulations of your circuit using Aldec Active-HDL or ISim. 10. Perform static timing analysis. 11. Check very carefully your pin allocations listed in the report files, and only if these pin allocations are correct, download your bitstream to the FPGA board. 12. Test the operation of your circuit experimentally using the Nexys 3 FPGA Board. Deliverables 1. All ASM charts. 2. All source files used for synthesis and implementation of your circuit. 3. Testbench. 4. User constraint files. 5. All synthesis and implementation report files. 6. RTL netlist. 7. Simulation waveforms from the functional, post-synthesis, and timing simulations, proving the correct operation of your circuit, and demonstrating the delay of its critical path in the PDF format. 8. Report file from the static timing analysis. 9. Your own report containing at least the following additional information: Resource utilization. Minimum clock period and maximum clock frequency after synthesis and after implementation. List of any deviations from the original specification. Difficulties encountered and lessons learned.

Important Dates Hands-on Sessions and Introductions to the Experiment Demonstration and Deliverables Due Monday 02/10/2014, 02/17/2014 Wednesday 02/17/2014, 02/19/2014 Thursday 02/17/2014, 02/20/2014, 02/24/2014 03/03/2014 03/03/2014