Unformatted text preview:

Contains material © Digilent, Inc. 6 pages Lab #3: Programming the BaSYS Board Revised 9_28_10 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 This lab requires you to use the knowledge of creating a project done in lab 3. Refer to lab3, if needed to create a project correctly. 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. The USB connector is highlighted below. We will not use the JTAG header for programming this semester. The Done LED will light after the FPGA is finished being programmed. For inputs, there are - eight toggle switches, (labeled SW7 – SW0, read left to right) - four push button switches, and - other input modes. For outputs there are - two seven-segment displays, - eight LEDs, (labeled LD7-LD0 labeled left to right), and - other output modes. Since there are three input variables associated with the functions, we will plan on three switches and use switches SW2-SW0 for this lab; Since there are four functions, we will use four LEDs – one to each output; we will use LD(3)-LD(0). Use SW(2), SW(1), and SW(0) for the input names. Likewise, use LD(3) for function F, LD(2) for function G, LD(1) for function H, and LD(0) for function I. There are many other features on the BaSYS board that we will utilize as the semester progresses. You may want to read the reference manual for the board, link found on the lab schedule webpage to learn more about the BaSYS board and its capabilities.Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 3 Schematic Capture a) Using the Procedures for Project Initialization and Schematic Capture Data Entry as a reference if needed, using schematic capture, input the following functions: F(SW(2:0)) = ∑m(0,2,4,6,7) = LD(3) G(SW(2:0)) = ∑m(1,3,5) = LD(2) H(SW(2:0)) = ∑m(0,1,2,3,5,7) = LD(1) I (SW(2:0)) = ∑m(4,6) = LD(0) You should write the equations in minterm notation canonical format and minimize. Minimizing the equations will reduce the amount of circuitry needed for the functions. Enter the circuits into the project placing all of the functions on the same schematic page. You should have four circuits with four outputs. When a group of wires are used to transport data with the same name, it is called a bus. The wires are named with the same name, but given different numbers to indicate the wire, i.e.SW(2), SW(1), SW(0). For this lab, we will be using the toggle switches (SW(2)-SW(0)) and LEDS (LD(3)-LD(0)). We want to use a bus structure for these inputs and outputs. This is done as follows: Draw a separate line by itself using the “Add wire” icon. Add an I/O marker to one end and label it as SW(2:0). This notation indicates that SW(2) is the most significant bit wire and SW(0) is the least significant bit wire. This labeling will make the wire be a thick line rather than just the thin line normally seen. Note that you must to use SW for the name as this is the name in the constraints file. Add three bus taps to separate the bus into four different wires. The bus tap icon is next to the Add I/O Marker icon. You can rotate the bus tap to the angle desired – use CTRL-B and look in the options window to see the rotations available. Use Add wire icon, and draw a wire to the end of each bus tap. Label each of the bus taps an individual wire, i.e. SW(0), SW(1), SW(2) using CTRL-D. Label the wires as above. Note that since these are single wires, the wire width is thin. Use SW(2), SW(1) and SW(0) as names. We will need to use the “SW” name for the toggle switches. This is the name listed in the constraints file (basys.ucf or basys2.ucf).Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 4 Repeat this process for the LEDs drawing a separate line not connected to anything else. Use the same methods for the LD I/O markers, additional bus taps and bus names. Use LD(3:0) for the I/O marker. Use LD(3) for function F, LD(2) for function G, LD(1) for function H, and LD(0) for function I. Write out the equations for F,G,H, and I. Minimizing the equations will reduce the complexity of circuits that you need to draw. Input the circuits for the functions F, G, H and I drawing wires for the inputs and outputs and using the names SW(0), SW(1), LD(0), etc.. Save the file. Circuit Simulation The simulation will be similar to that shown in the Procedures for Testbench Waveform Setup and Simulation but the inputs and outputs will be shown in hexadecimal. You can change this by expanding the rows. You may need to zoom in to see the values. You can also right-click on the names and change the output format. Change the input SW(2:0) to decimal unsigned. Expand the LD(3:0) to see each row individually. Compare the simulation for each of the functions for accuracy against your original equations.Lab #3: Programming the BaSYS Board Contains material © Digilent, Inc. 5 Compiling the schematic and creating a programming file Once the schematic is complete, return to the project navigator by choosing


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?