Lab 1
Lab 1
Laboratory Exercise 1
1
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
B. Vivado Tools
2
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
3
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step1: Start Vivado & Create Project
1. Insert the USB we provide into your computer
2. Find the program F:/Vivado/2017.4/bin/vivado.bat
3. Click twice “vivado.bat” to open Vivado (If your filename extension isn’t shown on
your filename, please find vivado whose 類型 is Windows 批次檔案)
4. Create Project
5. Click Next
4
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step2: Enter project name and location
1. The Project location is set at will
2. Click Next
5
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step 4: Copy Constraint and Source files to your project location.
Copy files to project location is a good habit:
When modifying files, you won’t modify them which are utilized by other projects
6
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
7
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step 7: Generate Bitstream.
1. Click “Generate Bitstream” under PROGRAM AND DEBUG. This includes synthesis
and implementation. (What is Bitstream? See Appendix)
2. Click “Yes” and “OK”, then wait Vivado running Design Flow (This may take some
time. If synthesis failed, please check your previous steps are all corrected.).
3. If design flow is completed, the status of Synthesis and Implementation will show
“Complete” ,and then it will pops out “Bitstream Generation Completed” window
(You can ignore all warnings in this step)
4. Select “Open Hardware Manager”, then press OK.
8
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step 8: Program into FPGA
1. Press “Open Target”, select “open new target”
9
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
Step 9: Test your design!
Now you can use SW15~SW8 as input A, SW7~SW0 as input B, both are expressed in
binary and unsigned. Buttons are used for different modes. This is a calculator done by
Boolean Logic!
Input A and B are expressed in binary, the result will Scroll.
Seven-segment as display
Inputs from the Push Buttons (btnU, btnD, btnR, btnL, btnC) will allow the user to select
different arithmetic operations that will be computed on the inputs A and B.
10
Electronic Circuits Experiment Department of Electrical Engineering
National Taiwan University
V. Appendix
FPGA Bitstream
An FPGA bitstream is a file that contains the programming information for an FPGA. A
Xilinx FPGA device must be programmed using a specific bitstream in order for it to behave
as an embedded hardware platform. This bitstream is typically provided by the hardware
designer who creates the embedded platform.
Programming an FPGA is the process of loading a bitstream into the FPGA. During the
development phase, the FPGA device is programmed using utilities such as Vivado® or
using menu options in SDK. These tools transfer the bitstream to the FPGA on board. In
production hardware, the bitstream is usually placed in non-volatile memory, and the
hardware is configured to program the FPGA when powered on.
Reference:
https://www.xilinx.com/html_docs/xilinx2018_1/SDK_Doc/SDK_concepts/concept_fpgabi
tstream.html
11