0% found this document useful (0 votes)
120 views20 pages

GettingStartedBasys3 PDF

1. To power on the Basys3 board, connect a micro-USB cable from the board to your computer and flip the power switch. This will start a demo program. 2. To program the Basys3 with Vivado, first download and install Vivado. Then create a project, import the provided Verilog files and constraints file. Map the signals to pins by uncommenting the constraints file. 3. Run synthesis, open the synthesized design, generate a bitstream, and program the board to run the demo.

Uploaded by

Minh Toàn Tạ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
120 views20 pages

GettingStartedBasys3 PDF

1. To power on the Basys3 board, connect a micro-USB cable from the board to your computer and flip the power switch. This will start a demo program. 2. To program the Basys3 with Vivado, first download and install Vivado. Then create a project, import the provided Verilog files and constraints file. Map the signals to pins by uncommenting the constraints file. 3. Run synthesis, open the synthesized design, generate a bitstream, and program the board to run the demo.

Uploaded by

Minh Toàn Tạ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 20

Getting Started with the Basys 3 [Reference.

Digilentinc] Page 1 sur 20

Getting Started with the Basys 3

Powering it On
To power on the Basys3, you will need a micro-USB cable. Before you begin, ensure that the jumper on
JP1 is in the QSPI position. Plug this cable into the JTAG slot on the Basys3, plug the other end into
your computer, and flip the power switch to the On position. This will start the out of box demo for
the Basys3.
More information on this demo can be found here (https://reference.digilentinc.com/basys3/gpiodemo).

Getting Started with Vivado


This video will give you step by step instructions to get started with your Basys3.
The files needed for this demo can be downloaded by clicking here
(https://reference.digilentinc.com/_media/basys3/abacus_verilog_srcfiles_10_1_2014.zip). You'll also need the
constraints file which can be downloaded here
(https://reference.digilentinc.com/_media/basys3/basys3_master.zip).

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 2 sur 20

More information on the Abacus project can be found here


(https://reference.digilentinc.com/basys3/abacus#running_the_basys3_abacus_demo).

1. Download and Install Vivado


1.1) First, install the latest version of Vivado by following our guide here
(https://reference.digilentinc.com/vivado/installation).

2. Creating a Project

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 3 sur 20

2.1) Now that we have Vivado installed, we're going to create a project.

2.2) This opens Vivado's New Project wizard. Click Next and you'll see this screen.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 4 sur 20

2.3) Name your project (no spaces!) and choose your project saving directory before clicking
Next. You will now see this screen.

2.4) Select RTL Project and click Next. In this window, you can select any other source files or
directories that you'll want to use in your projects. We can also select which language we'll be
programming in.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 5 sur 20

2.5) We'll be importing the pre-built Verilog files so click Add Files, navigate to where you saved
the project files from before, and select them all. It should be noted that if you check the Copy
sources into project box, Vivado will create separate copies of these sources and place them
within your project directory. Click Next. This window lets you choose existing IPs (Intellectual
Property) cores if you have them.

2.6) Click Next and you'll see this window.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 6 sur 20

2.7) This is where we'll import our Xilinx Design Constraints file (XDC) to map the HDL signals
to the Artix-7 pins. Click on Add Files, navigate to where you saved your Basys3_Master.xdc file,
select it, and click Next.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 7 sur 20

2.8) At this point you'll see the part selection screen.

2.9) You'll find all of the information you need on the Artix-7 chip on your board.

2.10) To find our board set the following filters


– Family: Artix-7
– Sub-Family: Artix-7
– Package: cpg236
– Speed grade: -1
Then choose the top part labeled xc7a35tcpg236-1 and click Next and then Finish.

This will create your project and bring you to the Vivado project home page.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 8 sur 20

3. Working with Vivado


3.1) On the home page, you will see the files that you imported earlier in the Sources box.

3.2) Double clicking a file will open it in the window to the right. Basys3_Abacus_Top is the top
module for the abacus demo we will be running. Clicking the [+] button will reveal the lower level
modules used in it.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 9 sur 20

3.3) Before we run our program, we must first map the signals to pins using the
Basys3_Master.xdc file we imported. To do this, we will open Basys3_Master.xdc. Inside this file,
we will see how Vivado maps signals to pins. Each line should be commented out at this point
(with the # character), so it should look something like this.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 10 sur 20

3.4) First, we want to make sure our signal names match the ones in the .xdc file. This can be
confirmed by comparing the signal name in the XDC file with the signal name in the top module.
These are case sensitive!

Showing a signal in the XDC file:

Showing the same signal in the top module file:

3.5) Once these are confirmed, we will uncomment whichever constraints we are using in the .xdc
file.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 11 sur 20

These constraints can be uncommented by selecting the lines of the signals we are using and un-
toggling the comments (Ctrl+/). In this case, we are using clk, btnC, btnU, btnD, btnR, btnL, sw[0]
through sw[15], led[0] through led[15], seg[0] through seg[6], an[0] through an[3], and dp. Go through
the xdc file and uncomment the lines corresponding to these signals.

After uncommenting the xdc file, save it and we can start programming your Basys3.

4. Programming the Basys3

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 12 sur 20

4.1) There are two ways to program your Basys3 FPGA: using a .bit file and using a .bin file.
Using a .bit file, we use the JTAG programming cable to load the bit file into the FPGA.
Programming with a .bin file will use the QSPI to program the FPGA each time it is powered on.
This means you will not have to reprogram it using the JTAG connector each time. We will
specify that we want to generate a .bin file by clicking Tools→Project Settings→Bitstream. In
this window we will check the box next to bin_file.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 13 sur 20

4.2) To begin, we will run the synthesis by clicking Run Synthesis beneath Synthesis in the Flow
Navigator on the left side of Vivado.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 14 sur 20

4.3) When Vivado is done synthesizing your project, you will see the Synthesis Completed
window.

4.4) Click Open Synthesized Design and then press Ok. You should now see this window

5. Setting the device properties (Recommended)

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 15 sur 20

5.1) To improve programming speed, in the main toolbar select Tools→Edit Device
Properties… Under General, set Enable Bitsream Compression to “TRUE”.

5.2) Under Configuration, set Configuration Rate (Mhz) to “33”.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 16 sur 20

5.3) Under Configuration Modes, select Master SPI x4

5.4) Press Ok, save your synthesized design (Ctrl+S) and then click Generate Bitstream in the
Flow Navigator on the left side.

5.5) This will open a box stating that you have not implemented your design.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 17 sur 20

5.6) Click Ok and Vivado will generate your .bit file and will show you this box.

5.7) Click Open Hardware Manager and click OK. You will see this screen.

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 18 sur 20

5.8) At this point, make sure your Basys 3 is plugged in via USB and turned on. Now click Next
twice and you will see this screen.

5.9) Set the JTAG Clock Frequency to “30000000”, select the device, and click Next followed
by Finish.

6. Programming the Basys3 using a .bit file


6.1) First, make sure that the jumper JP1 is in the JTAG position. You should see something like
this:

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 19 sur 20

6.2) Click Program device (in the green bar) then xc7a35t_0, select your .bit file in the bitstream
file box, and click Program.

6.3) This will program your Basys3 through the JTAG connector.

7. Programming the Basys3 using .bin file


7.1) First, make sure the jumper on JP1 is in the QSPI position. In the Hardware Manager
window, under hardware right click your device and click Add Configuration Memory
Device…

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016
Getting Started with the Basys 3 [Reference.Digilentinc] Page 20 sur 20

7.2) This window will pop up. Search for “Spansion” and select the 32 bit device (highlighted
below). Click OK on the next window asking if you want to program the configuration memory
device.

7.3) Select the .bin file where it asks for a configuration file and finally click OK.

Vivado will now erase the old configuration file, and reprogram your Basys3 with the Abacus
demo file. From now on, when you power cycle the Basys3, the abacus demo will load at startup.
For information on operating the abacus demo, go here
(https://reference.digilentinc.com/basys3/abacus#running_the_basys3_abacus_demo).
learn (https://reference.digilentinc.com/tag/learn?do=showtag&tag=learn), programmable-logic
(https://reference.digilentinc.com/tag/programmable-logic?do=showtag&tag=programmable-logic), tutorial
(https://reference.digilentinc.com/tag/tutorial?do=showtag&tag=tutorial), basys-3
(https://reference.digilentinc.com/tag/basys-3?do=showtag&tag=basys-3)

https://reference.digilentinc.com/learn/programmable-logic/tutorials/basys-3-getting-s... 10/10/2016

You might also like