ECE 448: Spring 2013 Lab 5 FPGA Design Flow Based on Aldec Active-HDL Fast Reflex Game.

Slides:



Advertisements
Similar presentations
CPE 201 Digital Design Lecture 25: Register Transfer Level Design (2)
Advertisements

Spartan-3 FPGA HDL Coding Techniques
Lab 9: Matrix Keypad : ”No Key Press” Analysis Slide #2 Slide #3 ”Press and Hold Key 5” Analysis.
ECE 382 Lesson 14 Lesson Outline Polling Multiplexing Intro to Logic Analyzer Debouncing Software Delay Routines Admin Assignment 3b due BOC today Assignment.
Top-level VHDL Designs
Lab 5 Shift Registers and Counters Presented By Neha Kumar but while we wait for that to happen…
1 EE 188L Lab #2 Test Bench Photos. 2 Vout R1 R5 R4 R3 R C2 C1 R7 R6 At this end there will be a cut-out and/or a dot next to pin 1 -15V.
Lab 3 & 4 Discussion EE414/514 VHDL Design September 25.
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
Capacitance Sensor Project
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
Global Timing Constraints FPGA Design Workshop. Objectives  Apply timing constraints to a simple synchronous design  Specify global timing constraints.
Figure 7.1. Control of an alarm system. Memory element Alarm Sensor Reset Set OnOff 
Advanced Digital Circuits ECET 146 Week 7 Professor Iskandar Hack ET 221B,
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
ECE 448: Lab 6 VGA Display (mini chess game). Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate:
Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009.
Spring Introduction  Today’s tutorial focuses on introducing you to Xilinx ISE and Modelsim.  These tools are used for Verilog Coding Simulation.
ECE 448: Lab 5 Serial Communications. Part 1: Serial Communications Part 2: Clock Management Part 3: Clock Domains Part 4: User Constraint File (UCF)
FPGA Design Flow Based on Using Seven-Segment Displays,
BYU ECEn 320 Lab 4 UART Transmitter. BYU ECEn 320 UART Transmimtter Specification VGA Serial A1 Expansion Connector PS2 A2 Expansion Connector B1 Expansion.
University of Houston ECE 5440/6370 Advanced Digital Design Lecture on Debouncing Circuit Yuhua Chen Spring 2010.
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
© 2003 Xilinx, Inc. All Rights Reserved Global Timing Constraints FPGA Design Flow Workshop.
displayCtrlr Specification
CascadedBCDCntr&Display Aim : Capture, simulate and implement a 2-digit, loadable BCD up/down counter, with chip enable I/P (CE) and chip enable O/P (CEO).
MooreC142/MAPLD Single Event Effects (SEE) Test Results on the Virtex-II Digital Clock Manager (DCM) Jason Moore 1, Carl Carmichael 1, Gary Swift.
ECE 448: Spring 11 Lab 3 Part 2 Finite State Machines.
ECE 448: Lab 5 DSP and FPGA Embedded Resources (Signal Filtering and Display)
Reaction Timer Project
ECE 448: Lab 4 VGA Display Mini-Pacman. Flexibility in the Second Part of the Semester Lab 4: VGA display (2 weeks) – 8 points Lab 5: Computer Graphics.
ECE 448: Lab 4 VGA Display. Bouncing Ball.. Organization and Grading.
Introduction to FPGA Tools
ECE 448: Lab 7 Design and Testing of an FIR Filter.
Sonar Sensor Project Polaroid Sonar Sensor Details of the Project
ECE 448: Lab 5 VGA Display. Breaking-Bricks..
Part A Final Dor Obstbaum Kami Elbaz Advisor: Moshe Porian August 2012 FPGA S ETTING U SING F LASH.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
This material exempt per Department of Commerce license exception TSU Architecture Wizard and PACE Lab 2 Introduction.
ECE 448: Lab 4 VGA Display The Frogger. Flexibility in the Second Part of the Semester Lab 4: VGA display (2 weeks) – 8 points Lab 5: Computer Graphics.
Teaching Digital Logic courses with Altera Technology
ECE 3450 M. A. Jupina, VU, 2016 Capacitance Sensor Project Goal: Creation of a digital capacitance sensor circuit where a variation in capacitance changes.
ECE 3450 M. A. Jupina, VU, 2016 Capacitance Sensor Project Goal: Creation of a digital capacitance sensor circuit where a variation in capacitance changes.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and ISim. Using Seven-Segment Displays, Buttons, and Switches.
RTL Hardware Design by P. Chu Chapter 9 – ECE420 (CSUN) Mirzaei 1 Sequential Circuit Design: Practice Shahnam Mirzaei, PhD Spring 2016 California State.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and Isim. Using Seven-Segment Displays, Buttons, and Switches.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
LAB #5 Modular Design and Hierarchy using VHDL
Introduction to the FPGA and Labs
Implementing Combinational
DE2-115 Control Panel - Part I
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
ASP-H Clocks John DeHart Applied Research Laboratory Computer Science and Engineering Department
Implementing Combinational and Sequential Logic in VHDL
SYNTHESIS OF SEQUENTIAL LOGIC
Developing More Advanced Testbenches
Block Diagrams 1.
ECE 448: Spring 2015 Lab 3 FPGA Design Flow Based on Aldec Active-HDL.
FPGA Tools Course Basic Constraints
ECE 448: Spring 2018 Lab 3 – Part 2 FPGA Design Flow Based on
Introduction to Sequential Circuits
Sequential Logic for Synthesis Simulation using ModelSim
Test Fixture (Testbench)
Implementing Combinational and Sequential Logic in VHDL
Based on Xilinx ISE & ModelSim
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
ECE 448: Spring 2018 Lab 3 – Part 2 Design of Controllers
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

ECE 448: Spring 2013 Lab 5 FPGA Design Flow Based on Aldec Active-HDL Fast Reflex Game

Part 1: Distribution of FPGA boards Part 2: Diagnostics of FPGA boards Part 3: Introduction to FPGA Design Flow based on Aldec Active-HDL Part 4: Introduction to Lab 5 Part 5: Demos of Lab 4 & late demos of Lab 3 Agenda for today

Parts 1 & 2 Distribution and Diagnostics of FPGA Boards

Part 3 Hands-on Session on FPGA Design Flow based on Aldec Active-HDL

Part 4 Introduction to Lab 5

Task 1 Experimental Testing of Lab 4 for Task 5 & Lab 4 for Task 6

LAB4 for TASK5

rst clk en CNTR UP rst clk en MISR ld rst clk en LFSR X”00” IVBloadB rst OR loadB nexti 1 0 cnz ld rst clk en LFSR X”00” IVAloadA rst OR loadA 1 0 cnz clk LAB2 AB XY sel En ‘0’‘0’ 8 clk rst 8 YSGN nexti nexto rst clk en MISR 8 clk rst 8 XSGN nexto 10 k k k ≠ 0 cnz = X”3FF” 10 done rst clk nexto OR AND not done nexto step run AND cnz LAB3e XoutAout A 8 8 B 8 8 Yout 8 Boutkout 10 k

BTNL BTNS Debouncer RED loadA Debouncer RED run D Q ‘1’‘1’ en rst clk rst clk BTNR Debouncer RED loadB rst clk rst clk rst clk rst clk BUTTON_UNIT BTNU Debouncer RED step rst clk rst clk BTND Debouncer RED next_out rst clk rst clk rst

Debouncer rst clk

Generics of the Debouncer k – size of the counter DD – debouncing period in clock cycles Please make sure that: DD  T CLK ≈ 10 ms 2 k > DD

Rising Edge Detector - RED input clk output rst

SWIVA SWITCH_UNIT IVB 8 8 8

Counter UP COUNTER UP Counter UP q(k-1..k-2) AN Counter UP SEG(6..0) Cou nter UP rst clk OC SSD_DRIVER OC – One’s Complement

Multiplexing Digits

Generics of the SSD_DRIVER 1 ms ≤ Refresh period ≤ 16 ms 1 ms ≤ 2 k  T CLK ≤ 16 ms f CLK = 100 MHz k = ? k – size of the internal counter. Refresh period = 2 k clock cycles.

CLOCK BTNL CLK_RST_1 BTNR rst clk

LAB4 for TASK6

CLK_RST_2 DCM_SP IBUFG BUFG CLOCK locked clk_ibufg clk100 rst clkin clkfb clk0 rst BTNL BTNR rst_or clkfx clk BUFG clkfx_obufg clk0_obufg ‘0’‘0’ 0 1 BUFGMUX

Task 2 Verifying Maximum Experimental Clock Frequency

CLK_RST_3 IBUFG BUFG CLOCK locked clk_ibufg clk100 rst clkin clkfb clk0 rst BTNL BTNR rst_or clkfx clk BUFG clkfx_obufg clk0_obufg 0 1 BUFGMUX SW(0) ODDR2 D0 D1 C0 C1 CE R S Q CLOCKFX ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ clkfxclkfx_180 ODDR2 D0 D1 C0 C1 CE R S Q CLOCK100 ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ clk100clk100_180 clk180 clkfx180 BUFG clk100_180 clk180_obufg BUFG clkfx_180 clkfx180_obufg

LAB5 for TASK2 BTNLBTNRBTNUBTNDBTNS loadAloadBsteprun BTNLBTNRBTNUBTNDBTNS loadAloadBsteprun BUTTON_UNIT SWITCH_UNIT SW IVAIVB LAB3e SEG AN SEGAN hex0 hex1 hex2 hex3 hex0 hex1 hex2 hex3 SSD_DRIVER XSGNYSGNXoutYoutAoutBoutk XSGNYSGNXYABk next_out LED TASK5 CLOCK CLK_RST_3 BTNR clk rst clk rst clk rst clk rst clk rst SW(0) CLOCKFX CLOCK100 BTNL

Verifying Maximum Clock Frequency The circuit should work correctly for SW(0) = 1 => clk = clk100 => f CLK = 100 MHz The circuit should fail for SW(0) = 0 => clk = clkfx => f CLK > maximum f CLK

DCM_SP_inst : DCM_SP generic map ( CLKDV_DIVIDE => 2.0, -- CLKDV divide value -- (1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,9,10,11,12,13,14,15,16). -- Divide value on CLKFX outputs - D - (1-32) -- Multiply value on CLKFX outputs - M - (2-32) -- CLKIN divide by two (TRUE/FALSE) -- Input clock period specified in nS -- Output phase shift (NONE, FIXED, VARIABLE) -- Feedback source (NONE, 1X, 2X) CLKFX_DIVIDE => …………., CLKFX_MULTIPLY => ………, CLKIN_DIVIDE_BY_2 => FALSE, CLKIN_PERIOD => 10.0, CLKOUT_PHASE_SHIFT => "NONE", CLK_FEEDBACK => "1X”, Setting frequency of clkFX during DCM_SP Instantiation

Observing CLOCK100 and CLOCKFX using Oscilloscope Using oscilloscope and two versions of your implementation (with different values of generics of DCM_SP) show the clock signal for the following three cases: A.f CLK = 100 MHz B.f CLK = maximum clock frequency returned by the tools C.f CLK = 10 MHz Document your findings using digital photos. Discuss your observations.

NET "CLOCK100" LOC = "…….." | IOSTANDARD = "LVCMOS33"; NET "CLOCKFX" LOC = "…….." | IOSTANDARD = "LVCMOS33”; New Lines in the User Constraint File (UCF) Select two arbitrary board pins that would be the most easy to observe, and have a relatively large physical distance from each other (to avoid interference).

Task 3 Fast Reflex Game

Rules of the Game (1) BCD Counter is initialized with seconds. After pressing start_stop the counter starts counting down every 0.01 second: 9.99, 9.98, 9.97, …, 0.02, 0.01, 0.00, -0.01, … The goal is to press the start_stop button again as close as possible to After the second press, the counter is stopped.

Rules of the Game (2) The last obtained result can be a. stored with the press of the store button b. skipped with the press of the skip button. After performing these operations the counter is again initialized to Only the last 4 stored results are remembered by the system. The minimum and the maximum absolute value of these last 4 stored results is calculated. The clear button clears the storage, and initializes the counter to

Meaning of Buttons clearstart_stop next_out store skip BTNLBTNR BTNU BTND BTNS

Rules of the Game (3) The next_out button allows displaying 1. current value of the counter 2. the last stored result 3. the result with the minimum absolute value 4. the result with the maximum absolute value. After each press of the next_out button, the mode of display changes to the next one in the wrap-around fashion. The current mode is also indicated with an appropriate number of the rightmost LEDs turned on (1 for the current value of the counter, 2 for the last stored result, etc.)

CD_mod_9 b(3) X”1”X”1” 4 4 b(4) en bout init ld rst clk D(3) CD_mod_9 X”0”X”0” 4 4 en bout init ld rst clk D(2) CD_mod_9 X”0”X”0” 4 4 en bout init ld rst clk D(1) CD_mod_9 b(0)=bin X”0”X”0” 4 4 en bout init ld rst clk D(0) b(2) b(1) minus rst init clk set DFF 4-digit BCD Counter Down BCD_CD clk rst CD_mod_9 – Counter Down mod 9 bin – borrow in bout – borrow out minimum minimum = 1  Counter = dir minus dir minus dir minus dir minus dir = 0 : count down dir = 1 : count up

Result Storage & Processing - RSP en clk rst 13 REG en clk rst 13 REG en clk rst 13 REG en clk rst 13 REG store result last MAX ABS max MIN ABS min output 13 sel_out min maxlast result clk rst MAXABS – Maximum Absolute Value MINABS – Minimum Absolute Value

BTNL BTNS Debouncer RED clear Debouncer RED rst clk rst clk BTNR Debouncer RED next_out rst clk rst clk rst clk rst clk BUTTON_UNIT BTNU Debouncer RED store rst clk rst clk BTND Debouncer RED skip rst clk rst clk start_stop

CLOCK BTNL CLK_RST_4 BTND rst clk

Top-Level of Fast Reflex Game CU_mod_N: Counter Up mod N

Part 5 Demos of Lab 4 & Late Demos of Lab 3