Getting Started with the Basys 3 (Legacy)

Warning!

This tutorial is out of date. Refer to theBasys 3 Abacus Demofor the most recent equivalent project.


为此供电

要在Basys3上供电,您将需要一条微型USB电缆。在开始之前,请确保JP1上的跳线位于QSPI位置。将此电缆插入Basys3上的JTAG插槽中,将另一端插入计算机,然后将电源开关翻转为On位置。这将启动Basys3的盒子演示。

可以找到有关此演示的更多信息here


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 clickinghere。You'll also need the constraints file which can be downloadedhere

More information on the Abacus project can be foundhere


1. Download and Install Vivado

1.1)首先,按照我们的指南安装最新版本的Vivadohere

2. Creating a Project

2.1)现在我们已经安装了Vivado,我们将创建一个项目。

2.2)这打开了Vivado的新项目向导。点击Next您会看到此屏幕。

2.3)命名您的项目(没有空格!),然后在单击之前选择您的项目保存目录Next。You will now see this screen.

2.4)选择RTL项目,然后单击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.

2.5)我们将导入预构建的Verilog文件,因此请单击添加文件,导航到以前保存项目文件的位置,然后选择全部。应该注意的是,如果您检查Copy sources into projectBox,Vivado将创建这些来源的单独副本,并将其放置在您的项目目录中。点击Next。This window lets you choose existing IPs (Intellectual Property) cores if you have them.

2.6)单击Next您会看到这个窗口。

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添加文件,,,,navigate to where you saved your Basys3_Master.xdc file, select it, and clickNext

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

2.9)您会在板上的Artix-7芯片上找到所需的所有信息。

2.10)找到我们的董事会设置以下过滤器
– Family: Artix-7
- 子家庭:Artix-7
- 软件包:CPG236
- 速度等级:-1
Then choose the top part labeledXC7A35TCPG236-1and clickNextand thenFinish

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

3. Working with Vivado

3.1)在主页上,您将看到您先前导入的文件Sourcesbox.

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

3.3)在运行程序之前,我们必须首先使用我们导入的basys3_master.xdc文件将信号映射到销钉。为此,我们将打开Basys3_Master.xdc。在这个文件中,我们将看到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.

3.4)首先,我们要确保我们的信号名称匹配.xdc文件中的信号名称。可以通过将XDC文件中的信号名称与顶部模块中的信号名称进行比较来确认。These are case sensitive!

在XDC文件中显示信号:



在顶部模块文件中显示相同的信号:

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

可以通过选择我们正在使用的信号的行并解开注释(CTRL+/)来无需注册这些约束。在这种情况下,我们正在使用CLK,BTNC,BTNU,BTND,BTNR,BTNR,BTNL,SW [0]通过SW [15],LED [0]通过LED [15],SEG [0],SEG [6][0]通过[3]和DP。浏览XDC文件,并不服从与这些信号相对应的线。


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

4.编程Basys3

4.1)有两种方法可以对您的Basys3 fpga进行编程:使用.bit文件和使用.bin文件。使用.bit文件,我们使用JTAG编程电缆将位文件加载到FPGA中。使用.bin文件的编程将使用QSPI每次供电时对其进行编程。这意味着您无需每次使用JTAG连接器对其进行重新编程。我们将指定我们要通过单击来生成.bin文件工具→项目设置→Bitstream。In this window we will check the box next tobin_file

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

4.3)当Vivado综合您的项目时,您将看到合成完成的窗口。

4.4)单击Open Synthesized Design然后按Ok。You should now see this window

5.1) To improve programming speed, in the main toolbar selectTools→Edit Device Properties…Under General, set启用BITSREAM压缩to “TRUE”.

5.2)在配置下,设置配置率(MHz)to “33”.

5.3)在配置模式下,选择大师SPI X4

5.4)按Ok,,,,save您的合成设计(CTRL+S),然后单击Generate Bitstream在左侧的流导航器中。

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

5.6)单击OkVivado将生成您的.bit文件,并将显示此框。

5.7)单击打开硬件管理器and clickOK。You will see this screen.

5.8)此时,请确保您的Basys 3通过USB插入并打开。现在单击Next两次,您将看到此屏幕。

5.9)设置JTAG Clock Frequency到“ 30000000”,选择设备,然后单击Nextfollowed byFinish

6.使用.bit文件编程Basys3

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

6.2) Click程序device(在绿色条中)然后XC7A35T_0,在Bitstream文件框中选择.bit文件,然后单击程序

6.3)这将通过JTAG连接器编程您的BASYS3。

7.使用.bin文件编程Basys3

7.1)首先,确保JP1上的跳线位于QSPI位置。在“硬件管理器”窗口中,在硬件右键下单击您的设备,然后单击Add Configuration Memory Device…

7.2)此窗口将弹出。搜索“跨度”,然后选择32位设备(下面突出显示)。点击OK在下一个窗口上,询问您是否要编程配置存储设备。

7.3)选择.bin文件在其中要求配置文件,最后单击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, gohere
,,,,,,,,