Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.

Similar presentations


Presentation on theme: "ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board."— Presentation transcript:

1 ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board

2 Part 1: Simple Demo Part 2: Digilent Basys2 FPGA Board Part 3: UCF Files Part 4: Generating and uploading bitstream using FPGA Design Flow based on Aldec Active-HDL Part 5: Generating and uploading bitstream using FPGA Design Flow based on Xilinx ISE Part 6: Synthesis using Synplify Premier DP Agenda for today

3 Part 1 Simple Demo

4 Part 2 Digilent Basys2 FPGA Board

5 Basys2 100,000-gate Xilinx Spartan 3E FPGA Atmel AT90USB2 Full-speed USB2 port providing board power and programming/data transfer interface Xilinx Platform Flash ROM to store FPGA configurations 8 LEDs, 4-digit 7-segment display, 4 buttons, 8 slide switches PS/2 port and 8-bit VGA port User-settable clock (25/50/100MHz), plus socket for 2nd clock Four 6-pin header expansion connectors

6 Basys2 Switches (8) Buttons (4) 7 Segment Displays (4) VGA connector ON/OFF Switch Expansion ports LEDs (8)

7 Basys2 I/O Circuits

8 Seven Segment Display By lighting different combinations of LEDs, different figures appear For Instance CA, CB, CC make ‘7’ Common anode means that writing a ‘0’ to CA- DP illuminates the led, where a ‘1’ turns it off

9 Seven Segment Display SSRegCtrl has a 16 bit input that is divided into four 4- bit digits AN(0:3) select which 7 segment display to output to Digilent recommends a digit period of between 1kHz and 60Hz

10 Part 3 User Constraint File (UCF)

11 File contains various constraints for Xilinx – Clock Periods – Clock Boundary Crossings (hard to do! That’s why we use a CoreGen’ed FIFO) – Circuit Locations – Pin Locations Every pin in the top unit needs to have a pin in the UCF

12 Basys 2 I/O Circuits

13 User Constraint File (UCF) Top Level Unit (VHDL) entity top_level is port( -- LEDs led : out std_logic_vector(7 downto 0); -- Seven Segment Display seg : out std_logic_vector(7 downto 0); an : out std_logic_vector(3 downto 0); -- Rotary button and switches sw : in std_logic_vector(7 downto 0); btn : in std_logic_vector(3 downto 0)); end entity top_level; UCF # Connected to Basys2 onBoard 7seg display NET "seg " LOC = "L14"; # Bank = 1, Signal name = CA NET "seg " LOC = "H12"; # Bank = 1, Signal name = CB NET "seg " LOC = "N14"; # Bank = 1, Signal name = CC NET "seg " LOC = "N11"; # Bank = 2, Signal name = CD NET "seg " LOC = "P12"; # Bank = 2, Signal name = CE NET "seg " LOC = "L13"; # Bank = 1, Signal name = CF NET "seg " LOC = "M12"; # Bank = 1, Signal name = CG NET “seg " LOC = "N13"; # Bank = 1, Signal name = DP NET "an " LOC = "K14"; # Bank = 1, Signal name = AN3 NET "an " LOC = "M13"; # Bank = 1, Signal name = AN2 NET "an " LOC = "J12"; # Bank = 1, Signal name = AN1 NET "an " LOC = "F12"; # Bank = 1, Signal name = AN0 # Pin assignment for SWs NET "sw " LOC = "N3"; # Bank = 2, Signal name = SW7 NET "sw " LOC = "E2"; # Bank = 3, Signal name = SW6 NET "sw " LOC = "F3"; # Bank = 3, Signal name = SW5 NET "sw " LOC = "G3"; # Bank = 3, Signal name = SW4 NET "sw " LOC = "B4"; # Bank = 3, Signal name = SW3 NET "sw " LOC = "K3"; # Bank = 3, Signal name = SW2 NET "sw " LOC = "L3"; # Bank = 3, Signal name = SW1 NET "sw " LOC = "P11"; # Bank = 2, Signal name = SW0 # Pin assignments for the Buttons NET "btn " LOC = "A7"; # Bank = 1, Signal name = BTN3 NET "btn " LOC = "M4"; # Bank = 0, Signal name = BTN2 NET "btn " LOC = "C11"; # Bank = 2, Signal name = BTN1 NET "btn " LOC = "G12"; # Bank = 0, Signal name = BTN0 # Pin assignment for LEDs NET “led " LOC = "G1" ; # Bank = 3, Signal name = LD7 NET “led " LOC = "P4" ; # Bank = 2, Signal name = LD6 NET “led " LOC = "N4" ; # Bank = 2, Signal name = LD5 NET “led " LOC = "N5" ; # Bank = 2, Signal name = LD4 NET “led " LOC = "P6" ; # Bank = 2, Signal name = LD3 NET “led " LOC = "P7" ; # Bank = 3, Signal name = LD2 NET “led " LOC = "M11"; # Bank = 2, Signal name = LD1 NET “led " LOC = "M5" ; # Bank = 2, Signal name = LD0

14 Pin Definitions

15 Part 4 Generating and uploading bitstream using FPGA Design Flow based on Aldec Active-HDL

16 FPGA Design process (1) Design and implement a simple unit permitting to speed up encryption with RC5-similar cipher with fixed key set on 8031 microcontroller. Unlike in the experiment 5, this time your unit has to be able to perform an encryption algorithm by itself, executing 32 rounds….. Library IEEE; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity RC5_core is port( clock, reset, encr_decr: in std_logic; data_input: in std_logic_vector(31 downto 0); data_output: out std_logic_vector(31 downto 0); out_full: in std_logic; key_input: in std_logic_vector(31 downto 0); key_read: out std_logic; ); end AES_core; Specification (Lab Assignments) VHDL description (Your Source Files) Functional simulation Post-synthesis simulation Synthesis On-paper hardware design (Block diagram & ASM chart)

17 FPGA Design process (2) Implementation Configuration Timing simulation On chip testing

18 Design Process control from Active-HDL

19 Part 5 Generating and uploading bitstream using FPGA Design Flow based on Xilinx ISE

20 Part 6 Synthesis using Synplify Premier DP


Download ppt "ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board."

Similar presentations


Ads by Google