Documente Academic
Documente Profesional
Documente Cultură
| EB's Blog
EB's Blog
FPGA
Ok, the rst design Im going to try with Arty will be the most simple one that I can come up
with. The idea is just to test the basic Vivado design ow.
http://eb.dy.fi/2015/11/arty-hello-world/ 1/12
5/16/2017 Arty Hello World! | EB's Blog
http://eb.dy.fi/2015/11/arty-hello-world/ 2/12
5/16/2017 Arty Hello World! | EB's Blog
Here is the project summary showing the board and FPGA details.
http://eb.dy.fi/2015/11/arty-hello-world/ 3/12
5/16/2017 Arty Hello World! | EB's Blog
Next I will need to describe my design. Lets have a look at the Arty reference manual.
http://eb.dy.fi/2015/11/arty-hello-world/ 4/12
5/16/2017 Arty Hello World! | EB's Blog
Hmm, looks like I could directly wire the push buttons BTN0-3 to the leds LD4-7. Shouldnt be
too complicated.
Adding sources
Lets add the design source: in the Sources window right click Design Sources and select Add
Sources and Add or create design sources. Click the plus-button and select: Create File.
Ill select VHDL as the le type and the le name will be HelloWorld.
After clicking Finish a new window opens: De ne Module. Lets de ne an entity HelloWorld
(and related architecture Behavioral) with one 4-bit input port (push_buttons_4bits) and
one 4-bit output port (led_4bits).
http://eb.dy.fi/2015/11/arty-hello-world/ 5/12
5/16/2017 Arty Hello World! | EB's Blog
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3
4 entity HelloWorld is
5 Port ( push_buttons_4bits : in STD_LOGIC_VECTOR (3 downto 0);
6 led_4bits : out STD_LOGIC_VECTOR (3 downto 0));
7 end HelloWorld;
8
9 architecture Behavioral of HelloWorld is
10
11 begin
12 led_4bits <= push_buttons_4bits;
13 end Behavioral;
http://eb.dy.fi/2015/11/arty-hello-world/ 6/12
5/16/2017 Arty Hello World! | EB's Blog
However, before that we need to specify the pins for each of our input and output ports.
Pin mapping
In the Flow Navigator under Synthesized Design click Schematic. This will show our synthesized
design which consists of 4 input buffers and 4 output buffers (as expected).
Right click the input port and select I/O Port Bus Properties. In the properties window select
the I/O Ports tab. For each port we need to specify the site (the pin name) and the I/O standard.
We can get that information from the part0_pins.xml le that was part the the board package
(the pin names were also marked in the component schematic shown earlier).
http://eb.dy.fi/2015/11/arty-hello-world/ 7/12
5/16/2017 Arty Hello World! | EB's Blog
Do the same for the output port led_4bits. The updated properties are shown below:
So now we have locked (constrained) the input and output ports to the correct pins.
Implementation
Click Run Implementation in the Flow Navigator. Vivado will ask to save the pin constraints.
Lets do that.
Name the constraint le HelloWorld ( le type is XDC). The constraint le is just an ordinary text
le. It can be opened from the Sources window.
http://eb.dy.fi/2015/11/arty-hello-world/ 8/12
5/16/2017 Arty Hello World! | EB's Blog
Bitstream generation
When the implementation phase ends you can generate the Bitstream i.e. the con guration le
for the FPGA.
the hardware.
Assuming the Arty has been connected to the PC with an USB cable we can select Open
Target and then Program Device. Just specify the Bitstream le.
Were done! Pressing one of the buttons BTN0-3 will light up the corresponding led LD4-7.
https://reference.digilentinc.com/_media/arty_master.zip
Then add this le as the constraint le and uncomment and edit the push button and led ports.
1 ##LEDs
2
3 set_property -dict { PACKAGE_PIN H5 IOSTANDARD LVCMOS33 } [get_ports
4 set_property -dict { PACKAGE_PIN J5
http://eb.dy.fi/2015/11/arty-hello-world/ IOSTANDARD LVCMOS33 } [get _ports
10/12
5/16/2017 Arty Hello World! | EB's Blog
Here is also a local copy of the master constraint le in case the digilent link stops working.
arty_master
Jesus Carmona
JANUARY 7, 2016 AT 00:28
Hi I just bought an Arty board (it came with a Voucher for a Vivado locked to my board)
I tried following your example but I got stuck at the moment of Selecting the Part/Board
when creating the project In my case I do not get the option to select the Arty board I
only get the Artix-7 Evaluation Platform and some other boards but not the ARTY
Do you know how could I include this board in the Vivado environment?
Thanks
EB
JANUARY 8, 2016 AT 19:02
Hi! I think all you need to do is to install the board de nition le. You can download the
the board package from the Digilent site:
https://reference.digilentinc.com/_media/vivado:board_ les_09252015.zip
And then extract the arty folder and put it into the Vivado board repository in
C:\Xilinx\Vivado\2015.2\data\boards\board_ les. For more information please take a
look at my previous post http://eb.dy. /2015/11/installing-vivado-for-arty/.
Chris
APRIL 28, 2016 AT 18:56
http://eb.dy.fi/2015/11/arty-hello-world/ 11/12
5/16/2017 Arty Hello World! | EB's Blog
You also have to restart Vivado after you copy the arty directory to the board_ les
directory, otherwise the arty board will not show up in the dialog box.
Vadim
MAY 10, 2016 AT 12:59
Thanks EB! Your posts are easy to follow and very informative.
Just got HelloWorld working on my Arty within minutes!
D. M. Akbar
DECEMBER 1, 2016 AT 09:08
http://eb.dy.fi/2015/11/arty-hello-world/ 12/12