Unformatted text preview:

Contains material © Digilent, Inc. 6 pages Lab #3: Programming the BaSYS Board Revised 1_22_11 Overview This lab exercise introduces the Xilinx ISE/WebPack Computer Aided Design (CAD) tools that allow us to program the board. We‟ve already used the schematic capture entry and the ISE simulator. We will build on our knowledge of these tools. Before beginning this module, you should… -Be familiar with reading and constructing basic logic circuits; -Understand logic equations, and how to implement a logic circuit from a logic equation given in minterm notation, decimal format; After completing this module, you should… -Be able to input a combinational circuit using the Xilinx ISE schematic editor; -Be able to examine the output of a logic simulator to verify whether a given circuit has been designed correctly. -Be able to program the BaSYS board using the USB programmer cable, given a constraints file. This module requires: -A Windows PC -The Xilinx ISE/WebPack software -A Digilent BaSYS boardLab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 2 BaSYS board From previous labs, you should already be familiar with creating a new project using the Xilinx ISE tools, using schematic capture to enter the circuit, and run a combinatorial simulation using the ISE simulator. In this lab, you will create a circuit and download it to the BaSYS board. Shown below is a diagram of the BaSYS board layout. Note that it has a Xilinx Spartan XC3S100E FPGA soldered onto it. For inputs, there are o eight toggle switches, (labeled SW(7) – SW(0), read left to right) o four push button switches, and o other input modes. For outputs there are o four seven-segment displays, o eight LEDs, (labeled LD(7)-LD(0) labeled left to right), and o other output modes. Configuration modes o Directly from the PC or laptop (volatile memory) o Indirectly from the platform flash (static memory) 8 Switches 8 LEDs 4 Buttons 4 SSD Seven Segment Display 4 JTAG headers Spartan3E FPGA chip VGA output PS/2 output USB output Power SwitchLab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 3 Introduction – DIGTAL ROULETTE A deck of cards has 52 cards with four sets (Hearts, Spades, Clubs, Diamonds) and values of Ace through Ten, Jack, Queen, and King. In digital roulette, the player will win if he/she draws a TWO, THREE or QUEEN. Implementation Detail Assume you are making this card game program. How do you implement this game with HDL? Once you have a card, you need to check the card whether 2, 3, or 12 and give a signal WIN or LOSE. Assuming that the cards can be represented in binary, four bits are used to represent the cards. For this game, the suit is not important, so it does not be encoded. The number cards can be represented with their binary equivalent and the face cards can be represented as the decimal values (Jack => 11, Queen => 12, King => 13). These values can be encoded to the binary equivalent as well. Thus, using o TWO = A‟B‟CD‟ (0010(2) = 2(10)) o THREE = A‟B‟CD (0011(2) = 3(10)) o TWELVE = ABC‟D‟ (1100(2) = 12(10)) o WIN = TWO + THREE + TWELVE (‘ is NOT or Inverter, + is OR ) You might have question what is the relationship between left hand side and right hand side in the equation. We call this minterm notation canonical format. We want to have a WIN signal when we have 2, 3, and 12. Decimal value 2 can be represented in binary form, 0010, 3 in 0011, and 12 in 1100, respectively. These equations are written in minterm notation canonical format and can be minimized further. We will learn about it later in this course. Minimizing the equations will reduce the amount of circuitry needed for the functions.Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 4 Schematic Capture 1. Create a new project and new schematic file using some name, i.e., lab3 2. Using the Lab2 manual as a reference if needed, enter the circuits into the project placing all of the functions on the same schematic page. 3. You should have four circuits with four outputs. Same names are required for programming on FPGA chip (BaSYS board). a. Inputs: A, B, C, D b. Outputs: TWO, THREE, TWELVE, WIN 4. Hint for the last function, WIN. 5. After entering the circuit, synthesize it by clicking „Synthesize – XST‟ menu on the process tab. 6. Take a screenshot of the schematic design (entire program screen) and put it on the lab report.Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 5 Circuit Simulation 1. Create a new test bench waveform using some name, i.e. lab4_test 2. By left clicking of the mouse on light blue regions, enter the waveform like following figure. Make sure you save the file after making waves. As you might see, first wave (read vertically) represent 2 because ABCD = 0010(2)=2(10) , second wave 3 (0011), third wave 12 (1100), and final wave 5 (0101). Final signal is just comparison with other signals. 3. Simulate the wave by using „Simulate Behavioral Model‟ under the „Xilinx ISE Simulator‟ option on the Process tab. Make sure you first click the test bench wave form file, i.e., lab3_test.tbw. 4. Look at the results signal, and check the signal when 2, 3, and 12 produce its own signal and WIN signal also. If not, check you schematic and fix it. 5. Finally, take a screenshot of the results (the signal on black screen named „Simulation‟). Prove that this is your work by capturing entire screen so that the program shows your name on the bar.Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 6 Creating a Programming File 1. After done simulation, the program is ready to generate programming file (.bit). 2. (Important) In order to set up the hardware, two steps should be done. a. Add user constraint file (for this lab, BaSYS_Lab3.ucf or BaSYS2_Lab3.ucf). We will use original BaSYS.ucf file from next lab. User constraint file maps NET name in schematic into pin number represented as LOC on the figure below. b. Right Click on „Implementation‟ on Process tab, and go to property menu. You will see the figure like following. Check „Allow Unmatched LOC constraints‟ option. This option tells the hardware that there are some pins that we do not use so as to ignore


View Full Document
Download Programming the BaSYS Board
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Programming the BaSYS Board and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Programming the BaSYS Board 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?