Jump to content
  • 0

Hello world like example for Digilent Nexys A7?


aeon20

Question

Hi everyone, I'm a beginner and I'd like to just get up and running with my Nexys A7. This is my first FPGA board, and I'm a complete beginner. I don't have any particular goal in mind at the moment beyond learning and getting some very simple example running. I prefer to learn by actual code that works, modifying it and using that as a basis for learning, rather than just reading a comprehensive manual.

What should I do? I thought I'd find a hello world example, but it seems hard to find anything at all that gives a step-by-step tutorial for how to get anything to run on the Nexys A7.

If anyone could share a tutorial for how to do something very simple, such as turn on a LED on the board, that would be awesome.

I have Vivado installed on Ubuntu 18.04, the application seems to be working. My board is a Nexys A7 with an Artix-7 100T CSG324.

Link to comment
Share on other sites

22 answers to this question

Recommended Posts

@aeon20,

I have found that two specific steps help me avoid missing a lot of silly bugs when using Verilog.

  • Place a line: `default_nettype none // at the top of every Verilog file.  If vendor IP fails as a result, you might wish to place: `default_nettype wire // at the end of your file
  • Run : verilator -Wall -cc module.v // This will do a more intensive lint-type check for more subtle errors--thing like wrong bit widths, assigning to inputs, etc.  It's also very fast, and it can return more than one error at a time.  Indeed, it's much faster than Vivado since, usually by the time Vivado starts, Verilator has completed its check.  Even better, Vivado will only ever return one error at a time whereas Verilator may return many.  (Makes me wonder if Vivado expects that the engineers using it are getting paid by the hour ...)

Dan

Link to comment
Share on other sites

I'm stoked.

I finally have a working development environment, and the hardware manager recognizes my board.

 

I'm following the tutorial Bianca provided: https://reference.digilentinc.com/vivado/getting_started/2018.2

This is my .xdc file (and a bunch of other commented out lines, but I omitted those):

## Clock signal
set_property -dict { PACKAGE_PIN E3    IOSTANDARD LVCMOS33 } [get_ports { clk }]; #IO_L12P_T1_MRCC_35 Sch=clk100mhz
create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports { clk }];
## LEDs
set_property -dict { PACKAGE_PIN H17   IOSTANDARD LVCMOS33 } [get_ports { led }]; #IO_L18P_T2_A24_15 Sch=led[0]

However, it fails at "Run implementation". I've tried to Google this but it doesn't help me. I've attached a screenshot:

 

fpga_hello_world_fail.jpg

Link to comment
Share on other sites

Hi @aeon20,

ERC 3090 means that there was an error while initializing DPCOMM. There are a number of reasons why this could happen. Thankfully there is a way to enable an error log. Can you please do the following:

1. Execute "export ADEPT_RT_LOGDETAIL=1"

2. Execute "export ADEPT_RT_LOGFILE=~/adept_erc.log"

3. Re-run your modified version of digi_enum.py and post the output of the log file here.

thank you,

Jon 

Link to comment
Share on other sites

I found these dependencies in /tools/Xilinx/SDK/2018.3/lib/lnx64.o and copied all *.so from there to /usr/lib/x86_64-linux-gnu/

Updated the dynamic linker:

 ldconfig

And now djtgcfg runs, but it fails:

# djtgcfg --verbose enum
ERROR: failed to enumerate devices, erc = 3090

This is very hard. :(

Link to comment
Share on other sites

/tools# !find
find ./ -iname "*install*.sh"
./Xilinx/SDK/2018.3/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_digilent.sh
./Xilinx/SDK/2018.3/data/webtalk/webtalk_install.sh
./Xilinx/Vivado/2018.3/ids_lite/ISE/bin/lin64/install_fnp.sh
./Xilinx/Vivado/2018.3/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_digilent.sh
./Xilinx/Vivado/2018.3/data/webtalk/webtalk_install.sh
./Xilinx/Vivado/2018.3/lnx64/tools/eclipse/plugins/org.eclipse.cdt.debug.application_1.1.0.201712051550/scripts/install.sh

These are the install.sh scripts that I have available.

It also seems like djtgcfg has quite a few dependencies which I don't have. libdabs is just one of them.

# ldd djtgcfg
        linux-vdso.so.1 (0x00007ffec3794000)
        libdabs.so.2 => not found
        libdpcomm.so.2 => not found
        libdmgr.so.2 => not found
        libdepp.so.2 => not found
        libdjtg.so.2 => not found
        libdpio.so.2 => not found
        libdspi.so.2 => not found
        libdstm.so.2 => not found
        libdpcutil.so.2 => not found
        libjtsc.so.2 => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb459cd2000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb459934000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb45971c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb45932b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb45a05b000)

 

Link to comment
Share on other sites

Quote

Did you install the Digilent runtime and utilities by running install.sh in *.gz files.

I've now manually installed the FTDI drivers too.

However, I don't understand the quoted statement.

What install.sh files am I supposed to run?

Link to comment
Share on other sites

17 hours ago, jpeyron said:

Hi @aeon20,

Here is a forum thread that deals with the error you are having with djtgcfg enum. Also if you haven't yet I would suggest rebooting your PC.

thank you,

Jon

I've read the other thread. It is not clear to me what install.sh files should be executed, and how. Any arguments? Should I just find all install.sh files in the directory tree of the Xilinx installation, and run them?

I've tried to reboot, yes. I can also mention that this is a brand new Ubuntu 18.04 install.

Link to comment
Share on other sites

13 minutes ago, jpeyron said:

Hi @aeon20,

 The cable drivers do not get automatically installed in linux when you install Vivado.

1) Here is a xilinx AR showing how install the xilinx/digilent cable drivers. If you have not already. Make sure to be root.

2) Make sure that you have added yourself to the dialout group. Here is a forum thread that shows how to add yourself to the dialout group.

3) Please download Adept 2 here.

                    a) Use Adept 2 from the command line with the command "djtgcfg enum" . What is the terminal text response?

4) Were you root when you installed Vivado?

Thanks for the help.

1) I tried doing this. This is what I get: https://pastebin.com/X7EuZK32

2) I am added to the dialout group. However, I also tried as root, so it shouldn't matter.

3)

# djtgcfg enum
djtgcfg: error while loading shared libraries: libdabs.so.2: cannot open shared object file: No such file or directory

Then I tried to apt-cache search for this, nothing. Tried also to search for how to resolve this, seems like I'm supposed to run yet another install.sh script, but I'm not sure which. Tried

root@aeon:/tools/Xilinx/Vivado/2018.3/ids_lite/ISE/bin/lin64# ./install_fnp.sh
Unable to locate anchor service to install, please specify correctly on command line

4) Yes, I'm doing all of this as root.

Link to comment
Share on other sites

Hi @aeon20,

 The cable drivers do not get automatically installed in linux when you install Vivado.

1) Here is a xilinx AR showing how install the xilinx/digilent cable drivers. If you have not already. Make sure to be root.

2) Make sure that you have added yourself to the dialout group. Here is a forum thread that shows how to add yourself to the dialout group.

3) Please download Adept 2 here.

                    a) Use Adept 2 from the command line with the command "djtgcfg enum" . What is the terminal text response?

4) Were you root when you installed Vivado?

Link to comment
Share on other sites

I managed to solve this by copying the board files into both SDK and Vivado, as well as reinstalling Vivado with the 30 trial license, I had the free one before that.

However, now I'm faced with a new problem. I don't seem to have any hardware:

(I've also tried lower frequencies, including the lowest)

no_hardware.jpg

Link to comment
Share on other sites

On 2/12/2019 at 5:07 PM, jpeyron said:

Hi @aeon20,

Please attach a screen shot of what you folder looks like in /tools/Xilinx/SDK/2018.3/data/boards/board_files

Make sure to only copy the contents of the new folder into the board_files folder. 

thank you,

Jon

Thanks for the help. Here is a screenshot.

boards.jpg

Link to comment
Share on other sites

On 2/8/2019 at 5:36 PM, Bianca said:

Here you have the board files: https://github.com/Digilent/vivado-boards

and you can follow this tutorial to install them: 

Copy the contents of the board_files folder

Navigate to the board_files folder in the Vivado Installation directory (C:\Xilinx\Vivado\2015.1\data\boards\board_files) 

- 2015.1 will be replaced with your current version of Vivado

Paste the contents into the board_files folder

Restart Vivado

-Bianca

Thanks, I tried this.

I have Vivado installed at /tools/Xilinx, I found the "board_files" folder at:

/tools/Xilinx/SDK/2018.3/data/boards/board_files and copied everything from the Git repo to that folder.

So that I have e.g. my own board "nexys-a7-100t" as a subfolder:

/tools/Xilinx/SDK/2018.3/data/boards/board_files/nexys-a7-100t

I then restart Vivado (I start vivado by running as root /tools/Xilinx/Vivado/2018.3/bin/vivado).

But I have no new boards. :(

Link to comment
Share on other sites

Here you have the board files: https://github.com/Digilent/vivado-boards

and you can follow this tutorial to install them: 

Copy the contents of the board_files folder

Navigate to the board_files folder in the Vivado Installation directory (C:\Xilinx\Vivado\2015.1\data\boards\board_files) 

- 2015.1 will be replaced with your current version of Vivado

Paste the contents into the board_files folder

Restart Vivado

-Bianca

Link to comment
Share on other sites

I'm trying to follow the guide now.

I'm having trouble getting it to load all the boards, I only see six boards in total.

The guide tells me to follow the steps here: https://reference.digilentinc.com/vivado/installing-vivado/2018.2 to install all the Digilent Board Files.

I've done this step, edited the Vivado_init.tcl file and entered the full absolute path to the board files. I have them under /tools/vivado-boards-master

When I launch vivado, I can see it trying to source the tcl script:

Sourcing tcl script '/root/.Xilinx/Vivado/Vivado_init.tcl'

start_gui

But I don't get any new boards available, sadly. :(

I'm running it as root just to make sure there are no permission issues, and root also has a copy of the same (correctly edited) Vivado_init.tcl file.

Link to comment
Share on other sites

8 minutes ago, Bianca said:

Hello @aeon20,

Welcome to the forum and to the world of FPGA. 

There are some tutorials available. I will guide you to this one on Vivado that actually does led blinking: https://reference.digilentinc.com/vivado/getting_started/2018.2

You can find some resources here: https://reference.digilentinc.com/learn/programmable-logic/tutorials/start and if you look for Nexys 4DDR (which is the old name for Nexys A7) you can find other things. 

I suggest you to start with led blinking. Connecting the switches to the leds, trying to work with the seven segment display, and moving forward to the VGA.

We have some components example in the learn section of our website: https://learn.digilentinc.com/classroom/ 

I think this might be a good start for you until you get your hear around the board.

I hope you'll enjoy the learning process.

Best regards,

Bianca

Thanks Bianca, I'll take a look at this example and do as you suggested.

Link to comment
Share on other sites

Hello @aeon20,

Welcome to the forum and to the world of FPGA. 

There are some tutorials available. I will guide you to this one on Vivado that actually does led blinking: https://reference.digilentinc.com/vivado/getting_started/2018.2

You can find some resources here: https://reference.digilentinc.com/learn/programmable-logic/tutorials/start and if you look for Nexys 4DDR (which is the old name for Nexys A7) you can find other things. 

I suggest you to start with led blinking. Connecting the switches to the leds, trying to work with the seven segment display, and moving forward to the VGA.

We have some components example in the learn section of our website: https://learn.digilentinc.com/classroom/ 

I think this might be a good start for you until you get your hear around the board.

I hope you'll enjoy the learning process.

Best regards,

Bianca

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...