ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on

Slides:



Advertisements
Similar presentations
Analysis of Clocked Sequential Circuits
Advertisements

Sumitha Ajith Saicharan Bandarupalli Mahesh Borgaonkar.
Lab 09 :D Flip Flop, Shift Registers and Switch Bounce: Slide 2 Slide 3 The D Flip Flop. 4-Bit Shift Register. Slide 4 Shift Register De-bounce System:
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 8, 2007.
DIGITAL DESIGN WITH VHDL Exercise 1 1Muhammad Amir Yousaf.
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
Capacitance Sensor Project
Introduction to Counter in VHDL
Advanced Digital Circuits ECET 146 Week 5 Professor Iskandar Hack ET 221G, Me as I typed this slides.
FPGA Design Flow Based on Using Seven-Segment Displays,
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
© 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).
ECE 448: Spring 11 Lab 3 Part 2 Finite State Machines.
Reaction Timer Project
Digital Logic Design.
ECE 448: Spring 2013 Lab 5 FPGA Design Flow Based on Aldec Active-HDL Fast Reflex Game.
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 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and ISim. Using Seven-Segment Displays, Buttons, and Switches.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and Isim. Using Seven-Segment Displays, Buttons, and Switches.
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.
LAB #5 Modular Design and Hierarchy using VHDL
Introduction to the FPGA and Labs
Free Projects For CENG 3430 CENG3430 Free Projects v.7c.
EECE6017C Lab 1 Introduction to Altera tools and Circuit Simulation
Implementing Combinational
DE2-115 Control Panel - Part I
ECE 3130 Digital Electronics and Design
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
Lab 1: Using NIOS II processor for code execution on FPGA
ECE 3130 Digital Electronics and Design
Revision2 for CENG34340 (Self study exercise no need to submit)
Using Xilinx ChipScope Pro Tools
Instructor: Alexander Stoytchev
COMP211 Computer Logic Design Introduction to the DE2 Board
Digital Fundamentals Floyd Chapter 6 Tenth Edition
Instructor: Alexander Stoytchev
ECET 230 Innovative Education--snaptutorial.com
ECET 105Competitive Success/snaptutorial.com
CENG3430 Rapid Prototyping of Digital Systems
Implementing Combinational and Sequential Logic in VHDL
ECE 448: Lab 4 VGA Display Mini-Pacman Game.
FPGA Project I: Up/Down Counter w/ Async Reset
Introduction to ModelSim Implementing Sequential
CSE 171 Lab 11 Digital Voltmeter.
Developing More Advanced Testbenches
ECNG1006 – Digital Component
Block Diagrams 1.
ECE 448: Spring 2015 Lab 3 FPGA Design Flow Based on Aldec Active-HDL.
ECE 448: Spring 2018 Lab 3 – Part 2 FPGA Design Flow Based on
Using Fpro SoC with Hardware Accelerators
ECE 3130 – Digital Electronics and Design
EE4OI4 Engineering Design
Sequential Logic for Synthesis Simulation using ModelSim
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Founded in Silicon Valley in 1984
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2017
Based on Xilinx ISE & ModelSim
Lab 1. Introduction to the DE2 Board
ECE 352 Digital System Fundamentals
Digital System Design Combinational Logic
Lecture 4. Introduction to the DE2 Board
Pipelined Array Multiplier Aldec Active-HDL Design Flow
Using FPro SoC with customized hardware cores
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
ECE 448: Spring 2018 Lab 3 – Part 2 Design of Controllers
(Lecture by Hasan Hassan)
Seven-Segment LED Display & Finite-State Machines
Presentation transcript:

ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on Xilinx Vivado and Vivado Simulator. Using Seven-Segment Displays, Buttons, and Switches.

Agenda for today Part 1: Testing of FPGA boards Part 2: Seven Segment Displays Part 3: User Constraints File Part 4: Buttons and Switches Part 5: Introduction to FPGA Design Flow based on Xilinx Vivado and Vivado Simulator Part 6: Introduction to Lab 3 Part 7: Class Exercise Part 8: Demo Lab Assignment 2 2

Part 1 Testing of FPGA Boards 3

Seven Segment Displays Part 2 Seven Segment Displays 4

Seven Segment Displays 5

4-Digit Seven Segment Display

Patterns for Decimal Digits

Patterns for Hexadecimal Digits

Connection to FPGA Pins

Multiplexing Digits

Time-Multiplexed Seven Segment Display

SSD_DRIVER seg(6..0) Counter UP q(k-1..k-2) Counter UP Counter UP clk an OC Counter UP rst OC – One’s Complement

Size of the counter 1 ms ≤ 2k * TCLK ≤ 16 ms fCLK = 100 MHz k = ?

Xilinx Design Constraints (XDC) Part 3 Xilinx Design Constraints (XDC) 14

Xilinx Design Constraints (XDC) File contains various constraints for Xilinx Clock Period Circuit Locations Pin Locations Every pin in the top-level unit needs to have a pin in the XDC

Basys 3 General I/O Devices

BASYS 3 XDC – Seven Segment Display set_property PACKAGE_PIN W7 [get_ports {seg[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[0]}] set_property PACKAGE_PIN W6 [get_ports {seg[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[1]}] set_property PACKAGE_PIN U8 [get_ports {seg[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[2]}] set_property PACKAGE_PIN V8 [get_ports {seg[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[3]}] set_property PACKAGE_PIN U5 [get_ports {seg[4]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[4]}] set_property PACKAGE_PIN V5 [get_ports {seg[5]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[5]}] set_property PACKAGE_PIN U7 [get_ports {seg[6]}] set_property IOSTANDARD LVCMOS33 [get_ports {seg[6]}]

BASYS 3 XDC – Seven Segment Display #set_property PACKAGE_PIN V7 [get_ports dp] #set_property IOSTANDARD LVCMOS33 [get_ports dp] set_property PACKAGE_PIN U2 [get_ports {an[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {an[0]}] set_property PACKAGE_PIN U4 [get_ports {an[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {an[1]}] set_property PACKAGE_PIN V4 [get_ports {an[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {an[2]}] set_property PACKAGE_PIN W4 [get_ports {an[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {an[3]}]

BASYS 3 XDC - LEDs # LEDs set_property PACKAGE_PIN U16 [get_ports {led[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[0]}] set_property PACKAGE_PIN E19 [get_ports {led[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[1]}] set_property PACKAGE_PIN U19 [get_ports {led[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}] set_property PACKAGE_PIN V19 [get_ports {led[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[3]}] set_property PACKAGE_PIN W18 [get_ports {led[4]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[4]}] set_property PACKAGE_PIN U15 [get_ports {led[5]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[5]}]

BASYS 3 XDC - LEDs set_property PACKAGE_PIN U14 [get_ports {led[6]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[6]}] set_property PACKAGE_PIN V14 [get_ports {led[7]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[7]}] set_property PACKAGE_PIN V13 [get_ports {led[8]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[8]}] set_property PACKAGE_PIN V3 [get_ports {led[9]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[9]}] set_property PACKAGE_PIN W3 [get_ports {led[10]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[10]}] set_property PACKAGE_PIN U3 [get_ports {led[11]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[11]}] set_property PACKAGE_PIN P3 [get_ports {led[12]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[12]}]

BASYS 3 XDC - LEDs set_property PACKAGE_PIN N3 [get_ports {led[13]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[13]}] set_property PACKAGE_PIN P1 [get_ports {led[14]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[14]}] set_property PACKAGE_PIN L1 [get_ports {led[15]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[15]}]

BASYS 3 XDC CLOCK # Clock signal set_property PACKAGE_PIN W5 [get_ports clk] set_property IOSTANDARD LVCMOS33 [get_ports clk] create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports clk]

Part 4 Switches and Buttons 23

Basys 3 Slide Switches

BASYS 3 XDC – Switches # Switches set_property PACKAGE_PIN V17 [get_ports {sw[0]}] set_property IOSTANDARD LVCMOS33 [get_ports{sw[0]}] set_property PACKAGE_PIN V16 [get_ports {sw[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[1]}] set_property PACKAGE_PIN W16 [get_ports {sw[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[2]}] set_property PACKAGE_PIN W17 [get_ports {sw[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[3]}] set_property PACKAGE_PIN W15 [get_ports {sw[4]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[4]}] set_property PACKAGE_PIN V15 [get_ports {sw[5]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[5]}] set_property PACKAGE_PIN W14 [get_ports {sw[6]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[6]}] set_property PACKAGE_PIN W13 [get_ports {sw[7]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[7]}]

BASYS 3 XDC – Switches (2) set_property PACKAGE_PIN V2 [get_ports {sw[8]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[8]}] set_property PACKAGE_PIN T3 [get_ports {sw[9]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[9]}] set_property PACKAGE_PIN T2 [get_ports {sw[10]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[10]}] set_property PACKAGE_PIN R3 [get_ports {sw[11]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[11]}] set_property PACKAGE_PIN W2 [get_ports {sw[12]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[12]}] set_property PACKAGE_PIN U1 [get_ports {sw[13]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[13]}] set_property PACKAGE_PIN T1 [get_ports {sw[14]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[14]}] set_property PACKAGE_PIN R2 [get_ports {sw[15]}] set_property IOSTANDARD LVCMOS33 [get_ports {sw[15]}]

Buttons 28

Connection of Buttons to FPGA Pins

Debouncing Buttons key bounce, tBOUNCE key bounce, tBOUNCE Bouncing period typically smaller than 10 ms

to Generate Short Pulses (1) Using DEBOUNCE_RED to Generate Short Pulses (1) RED – Rising Edge Detector

to Generate Short Pulses (2) Using DEBOUNCE_RED to Generate Short Pulses (2)

Debouncer Debouncer reset output input clk

Debouncer

k and DD Generics k - width of the counter used to measure the debouncing period DD - debouncing period in clock cycles Values of generics given on the next slide assume that the clock frequency = 100 MHz and thus clock period = 10 ns.

k and DD Generics Option 1 (value used for simulation only): DD = 100 assuming bouncing period < 1 μs = 1000 ns condition: DD*10ns = 1000 ns => DD = 100 k=7 because 2^7 > 100 Option 2 (values used for synthesis, implementation, and experimental testing): DD = 1000000 assuming bouncing period = 10 ms condition: DD*10ns = 10ms => DD = 1,000,000 k=20 because 2^20 > 1,000,000

Rising Edge Detector - RED Turn a step function into an impulse Allows a step to run a circuit for only one clock cycle

Rising Edge Detector reset input q output clk clk input q output

Connection of Buttons to FPGA Pins

BASYS 3 XDC – Buttons #Buttons set_property PACKAGE_PIN U18 [get_ports btnC] set_property IOSTANDARD LVCMOS33 [get_ports btnC] set_property PACKAGE_PIN T18 [get_ports btnU] set_property IOSTANDARD LVCMOS33 [get_ports btnU] set_property PACKAGE_PIN W19 [get_ports btnL] set_property IOSTANDARD LVCMOS33 [get_ports btnL] set_property PACKAGE_PIN T17 [get_ports btnR] set_property IOSTANDARD LVCMOS33 [get_ports btnR] set_property PACKAGE_PIN U17 [get_ports btnD] set_property IOSTANDARD LVCMOS33 [get_ports btnD]

Part 5 Hands-on Session on FPGA Design Flow based on Xilinx Vivado and Vivado Simulator 41

Automated Teller Machine Part 6 Introduction to Lab 3 Automated Teller Machine ATM 42

ATM Services Balance Inquiry (BAL) Cash Withdrawal (COUT) Deposit Cash (CIN) Deposit a Check (CHEC) Change PIN (CPIN)

Step 1: Entering a PIN Number Default Enter PIN using switches Move to STEP 2

Step 2: Choosing an Option Default BTNU (UP) BTNL LEFT BTNR (RIGHT) BTND DOWN BTNS (Enter)

Balance Inquiry If “Balance Inquiry” chosen first time For Every other “Balance Inquiry”, display the available balance on 7-segment display To go to Step 2   BTNS (Enter)

Amount entered using Buttons Cash Withdrawal $10 $50 $100 $20 Amount entered using Buttons

Cash Withdrawal If amount entered is not a multiple of $20 or greater than $500, display For Insufficient funds, Display If amount entered is a valid amount, it should blink for 5 seconds on the 7-segment display, and the remaining amount is displayed afterwards.

Amount entered using Buttons Cash Deposit $10 $50 $100 $20 Amount entered using Buttons

Cash Deposit Total deposit amount is displayed on the seven segment display, starting from 0. Available Balance = Previous Balance + Deposit Amount If available balance is greater than the allowed balance ($1500), display and reset the deposit amount to 0. If amount entered is a valid amount, it should blink for 5 seconds on the 7-segment display, and the Available Balance is displayed afterwards.

Check Deposit Check value specified in BCD notation entered using Switches. Available Balance = Previous Balance + Deposit Amount If available balance is greater than the allowed balance ($1500), display and reset the deposit amount to 0. If amount entered is a valid amount, it should blink for 5 seconds on the 7-segment display, and the Available Balance is displayed afterwards.

Change PIN New 8-bit PIN entered using Switches If new PIN matches the old PIN, display Otherwise update the new PIN

Part 7 Lab Exercise 53

16-bit Binary Up-Down Counter

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

Part 8 Lab Assignment 2: Demo