EE 209 Lab 7 A Walk-Off

Similar documents
EE 101 Lab 7 Crosswalk

1. Synopsis: 2. Description of the Circuit:

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Lab 5 FPGA Design Flow Based on Aldec Active-HDL. Fast Reflex Game.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Lab 17: Building a 4-Digit 7-Segment LED Decoder

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Digital Electronics II 2016 Imperial College London Page 1 of 8

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Modeling Latches and Flip-flops

Ryerson University Department of Electrical and Computer Engineering COE/BME 328 Digital Systems

Laboratory Exercise 7

Lecture #4: Clocking in Synchronous Circuits

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

Experiment # 12. Traffic Light Controller

Modeling Latches and Flip-flops

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

FSM Implementations. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall Output. Input. Next. State.

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

ECE 270 Lab Verification / Evaluation Form. Experiment 9

LAB 3 Verilog for Combinational Circuits

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Spiral Content Mapping. Spiral 2 1. Learning Outcomes DATAPATH COMPONENTS. Datapath Components: Counters Adders Design Example: Crosswalk Controller

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM)

Traffic Light Controller

Laboratory 4. Figure 1: Serdes Transceiver

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

Laboratory Exercise 7

Design and implementation (in VHDL) of a VGA Display and Light Sensor to run on the Nexys4DDR board Report and Signoff due Week 6 (October 4)

Administrative issues. Sequential logic

Lab 2: Hardware/Software Co-design with the Wimp51

DE2-115/FGPA README. 1. Running the DE2-115 for basic operation. 2. The code/project files. Project Files

Checkpoint 4. Waveform Generator

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Main Design Project. The Counter. Introduction. Macros. Procedure

ENGG2410: Digital Design Lab 5: Modular Designs and Hierarchy Using VHDL

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

LAB 3 Verilog for Combinatorial Circuits

Main Design Project. The Counter. Introduction. Macros. Procedure

Registers and Counters

Serial FIR Filter. A Brief Study in DSP. ECE448 Spring 2011 Tuesday Section 15 points 3/8/2011 GEORGE MASON UNIVERSITY.

General: Catalog Description: Grading Policy: Course Code: COE 203 Title: Digital Logic Laboratory Co-requisite(s): COE 202 (Digital Logic Design)

Programmable Logic Design I

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

CSE 140 Exam #3 Solution Tajana Simunic Rosing

COE328 Course Outline. Fall 2007

ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003

Checkpoint 2 Video Encoder

Side Street. Traffic Sensor. Main Street. Walk Button. Traffic Lights

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

EEC 116 Fall 2011 Lab #5: Pipelined 32b Adder

CPE 329: Programmable Logic and Microprocessor-Based System Design

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1

ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003

Altera s Max+plus II Tutorial

EEM Digital Systems II

Programmable Logic Design Techniques II

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

Why FPGAs? FPGA Overview. Why FPGAs?

ECE337 Lab 4 Introduction to State Machines in VHDL

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

EE 357 Lab 4 Stopwatch

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

CSC258: Computer Organization. Combinational Logic

Lab Assignment 5 I. THE 4-BIT CPU AND CONTROL

CS 254 DIGITAL LOGIC DESIGN. Universal Asynchronous Receiver/Transmitter

Traffic Light Controller. Thomas Quinn, Brandon Londo, Alexander C. Vincent, Yezan Hussein

FPGA-BASED EDUCATIONAL LAB PLATFORM

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

EECS 578 SVA mini-project Assigned: 10/08/15 Due: 10/27/15

University of Victoria Electrical and Computer Engineering CENG 241 Digital Design I Laboratory Manual

Checkpoint 1 AC97 Audio

Sequential Design Basics

CS3350B Computer Architecture Winter 2015

Experiment 7 Fall 2012

Modeling Digital Systems with Verilog

Design Problem 4 Solutions

Experiment: FPGA Design with Verilog (Part 4)

CARLETON UNIVERSITY. Facts without theory is trivia. Theory without facts is bull 2607-LRB

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

CSE 352 Laboratory Assignment 3

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

CS/EE 6710 Digital VLSI Design CAD Assignment #3 Due Thursday September 21 st, 5:00pm

Smart Night Light. Figure 1: The state diagram for the FSM of the ALS.

Laboratory Exercise 4

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

Chapter 11 State Machine Design

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Transcription:

EE 209 Lab 7 A Walk-Off Introduction In this lab you will complete the control unit and datapath for a simple crosswalk controller that was discussed in class. You should work on this lab INDIVIDUALLY! 2 What you will learn This lab is intended to teach you how to implement state machines, use datapath components and perform a non-trivial digital design. 3 Background Information and Notes. The Crosswalk Control Unit (FSM) The crosswalk system we will design in this lab is the same as the design covered in lecture. Pedestrians should be allowed to walk for 8 ticks of the clock, followed by a blinking hand (do not start walking) for 6 ticks of the clock. During these 6 ticks, a solid hand will blink on for a tick and then off for a tick while a counter counts down from 8 to decrementing every two clocks. Then the system should display a solid hand continuously for 6 ticks indicating the red light period of the intersection. The outputs of the entire design are described in the table below: Output WALK HAND NUM_ON Description Output to control when the walk icon should appear on the display. For our system we will use LED 3 and a 7- Segment display with the letter G for Go to indicate the walk state. Output to control when the hand icon should appear (either during its blinking phase or solid phase). For our system we will use LED and a 7-Segment display with the letter H for Hand to indicate the blinking or nowalk state. Output to control whether the don t walk countdown timer should be displayed. Value of the don t walk countdown timer. Table - Crosswalk System Outputs Last Revised: 3/7/207

7-Seg. 4 7-Seg. 2 7-Seg. H = HAND G = Go / Walk NUM_ON HAND WALK RESET NUM_ON HAND WALK LED7 is the clock signal. Other LEDs are unused in this lab LD7 LD0 BTNU NUM Unused Hand Go/Walk BTNL B8 BTNR SW7 Switches are unused in this lab SW0 BTND Figure - Traditional Crosswalk Display and our modified FPGA I/O display and mapping. Note: The signals going *into* the above blocks are being produced by (i.e. *outputs* of) your design. There are several possible ways this might be implemented. However, they all require a counter of some form. While we did present a possible solution in lecture, we strongly encourage you to consider alternate ways of implementing this design but you may choose any one you want. Possible options:. If we think about the entire sequence we see it requires 40 clock cycles (8 in walk + 6 in Blinking + 6 in NoWalk). We could use a counter to simply count from 0-39 and then restart. In this case, it may be that no distinct FSM is need the counter itself serves as the state. From the current count we could infer the state/outputs that we need to generate. 2. We could use 3 separate counters (one for each phase: Walk, Blinking, NoWalk). This might make the rest of the logic easier. However, it would lead to a larger design in all likelihood. However you are not going to be graded on size of your design, only correctness. 3. The lecture design 2. The Crosswalk Datapath To help implement the overall system you will need to use a 4-bit counter. We ve started this component for you in cntr4.v. You will need to complete it. A block diagram and function table are shown below. In addition, we also provide a 4-bit adder (adder4.v). This adder is likely necessary because we have an up 2 Last Revised: 3/7/207

counter, while we want a single digit counting down from 8-0. Think how you can achieve this conversion using the current count and the adder. Use these to help produce the needed outputs. CNTR4 P0 Q0 P P2 P3 PE CE CLK RST Q Q2 Q3 TC CLK RST PE CE Q* 0, - - - Q - - 0000 0 - P[3:0] 0 0 Q+ 0 0 0 Q TC = Q3 Q2 Q Q0 CE Figure 2 - Block Diagram and Function Table for 4-bit CNTR4 Counter 4 Procedure You will design and implement the crosswalk system including the control unit / FSM and the datapath. A testbench will be provided to give some confidence that your system is working. Then you will implement the design on the FPGA board to see it in action.. Download the cwalk project.zip file from Blackboard. Extract the files to a folder. 2. The crosswalk project has a completed top-level file to interface your design to the FPGA, a skeleton Verilog design file (cwalk.v) and a skeleton control unit / state machine schematic (cwalk_fsm.v). It also contains components you may use like: cntr4.v (incomplete), adder4.v (complete), and dff.v (complete). The top-level FPGA interface file (cwalk_top.v) generates a slower clock signal, the reset signal, as well as converting all the outputs to appropriate 7-Segment display values (i.e. you will output a signal like WALK and our top-level schematic will convert that to G for Go). No changes should be made to this file. 3. Complete the cntr4.v module by adding 4-bit wide 2-to- muxes such that the counter implements the function table shown in Figure 2. You may then use any number of 4-bit counter instantiations in your overall crosswalk design. 4. Try to sketch out your design on paper and consider what approach you want to use. You may choose any approach you like. It just needs to produce the correct output sequence as specified in the requirements. Spend some time on this and make sure you believe it will work before you start coding in Verilog. Last Revised: 3/7/207 3

5. Implement your design. Add comments at the top of your file describing the approach you chose to implement and a bit about how it works. If you need to create a state machine, do it in the cwalk_fsm.v. (You are welcome to change the input/outputs of the module as needed). If you don t need to create a state machine, just leave that file blank. 6. In cwalk.v, put together your entire design along with the counter(s), adder(s), state machines, etc. 7. Simulate your design using the provided testbench. Click over to Simulation, select the cwalk_tb and use it to simulate your design. (Note: This simulates your cwalk design, not the top-level design which is complete and valid). Rightclick on Simulate Behavioral Model.. Process Properties. Ensure Simulation Run Time is 500ns or more. Now double-click Simulate Behavioral Model. The testbench runs for 500 ns which is enough time to go through at least one full Walk, Blinking, Don t Walk sequence. Verify the correctness of your design, finding problems, fixing your code, and re-running the simulation as needed. 8. Click back to Implementation. Synthesize, Implement and Generate the Programming File for your design. 9. Connect the programming cable to the FPGA board and download/program your design. Ensure it works as you expect. 0. Demonstrate your design to your TA/instructor & get their initials. 5 Review None. 4 Last Revised: 3/7/207

6 Lab Report Name(s): Due: Score: (Detach and turn this sheet along with any other requested work or printouts). TA/Instructor initials: 2. Submit your top-level file cwalk.v and your FSM if you needed it: cwalk_fsm.v. 7 EE 209 Lab 7 Grading Rubric Student Name: Item Outcome Score Max. Check off by TA 3 Output correctness Appropriate counter design + FSM (if needed) WALK Output HAND Output NUM_ON Output Datapath Correctness NUM generation (i.e. Adder connections) correct 2 2 Late Deductions (- pts. per day) Open Ended Comments: SubTotal 0 Total 0 Last Revised: 3/7/207 5