FPGA tools

From Robin

(Difference between revisions)
Jump to: navigation, search
(GHDL and modelsim)
 
(88 intermediate revisions not shown)
Line 1: Line 1:
-
= FPGA tools on Windows =
+
= FPGA tools on LISP (2428)=
-
Vivado 2015.2 is situated on //bifrost/project0/robin/CADlib/2015/vivado
+
Vivado and Vitis is installed locally on the computers in LISP. To launch Vivado go to ''Applications->Education-> '''Vivado'''
-
it can be accessed from any Windows machine, but it does need to have
+
-
the LM_LICENSE_FILE environment variable set to 5370@lisens.ifi.uio.no
+
-
Vivado, ISE and questa is currently situated on ifiserv-854.ifi.uio.no, and LISP (2428)  
+
Alternatively, you can find it by searching for apps using the ''super''-key (Windows key):
-
Please notify the engineer in ROBIN if there are issues.
+
-
= FPGA tools on Linux =
+
<div style="margin:0 auto;overflow:scroll;width:auto;max-width:100%">
 +
[[Image:Xilinx_suit.png|class=noresize]]</div>
-
'''3430-installation 2015'''
+
 
 +
'''Launch in terminal'''
 +
 
 +
Launching the applications is done by entering the following commands in the terminal:
 +
 
 +
Questa with GUI:
 +
vsim
 +
 
 +
Vivado with GUI:
  vivado
  vivado
-
questa
 
 +
Vitis with GUI:
 +
vitis
-
'''older installations'''
+
Vitis HLS with GUI
-
  0in
+
  vitis_hls
-
Catapult_C
+
-
FormalPro
+
-
Modelsim
+
-
Xilinx
+
 +
Vlog (terminal only):
 +
vlog
-
== Starting a terminal window with tools available ==
+
Vcom (terminal only):
 +
vcom
-
'''First time initialization 3430-2015'''
+
Help:
-
  >cd ~
+
  <command> -h
-
>/ifi/bifrost/project0/robin/CADlib/2015/3430-tools/copy-here
+
-
Note: This will create the folder "3430-tools" from your current folder and copy files to it. You may alter these files for your own purposes later.
+
== VHDL using VSCode ==
-
'''Launch'''
+
VHDL code can also be edited using VSCode (Visual Studio Code) which is installed on computers at LISP.  
-
>cd 3430-tools
+
-
> ./run
+
-
This will open a new terminal having the required environment set. vsim and vivado may be run from the new terminal if started properly.
+
-
Note that it is required to do the ./run from the correct folder.  
+
* Launch Vscode by searching through applications: ''Applications ->  '''VSCode'''
 +
* Add the extension for VHDL syntax highlighting by:
 +
** ''View -> Extensions'' or ''<Ctrl + Shift + X>'' to open the Extensions window.
 +
* Search VHDL and you will see a list of extensions. Install ''VHDL by Pu Zhao''. (Note: there are other suitable vhdl extensions as well).
 +
* Once installed, ''enable'' the extension (if not done automatically).  
 +
== Questa and modelsim.ini in write mode ==
-
'''First time initialization FPGAtools (old)'''
+
You might get the following error message when using Questa:
-
>cd ~
+
-
>mkdir fpgatools
+
-
>cd fpgatools/
+
-
>/hom/mes/src/FPGATools/init_fpgatools
+
-
Note that when starting using run, you get an xterm with .bash_fpgatools (invisible when using ls-l) as source.
+
# ** Error: (vmap-7) Failed to open ini file "/uio/kant/ifi-project06/robin/CADlib/modelsim.ini" in write mode.
-
Since spring 2012, we have moved the license file to tollheimtu from pordoi. The .bash_fpgatools will need to be upgraded either manually or by doing the initialization over again.
+
# Permission denied. (errno = EACCES)
-
'''Launch'''
+
This is expected behavior because you are using a shared write protected <code>modelsim.ini</code>. To make your own copy of the <code>modelsim.ini</code> file, run;
-
>cd ~/fpgatools
+
-
>run
+
-
Use the new xterm window that pops up to start the FPGA tool you like.  
+
mkdir -p ~/.config/modelsim/                            # Make a directory for modelsim config
-
Paths to all the major components should be ready in the new xterm.
+
cp $CADLIB/modelsim.ini ~/.config/modelsim/modelsim.ini  # Copy modelsim.ini
-
To start Modelsim type vsim
+
Lastly, you need to alter the <code>MODELSIM</code> variable. Open the <code>.bashrc</code> in your editor of choise (e.g <code>code ~/.bashrc</code>) and add the following line:
-
To start Xilinx (ISE) type ise
+
-
To start PlanAhead type planAhead
+
-
etc
+
 +
# Setting MODELSIM variable used in IN3160
 +
export MODELSIM=$HOME/.config/modelsim/modelsim.ini
-
== Digilent Adept on Linux ==
+
Restart the terminal or run <code>source ~/.bashrc</code> for the changes to take effect.
 +
 
 +
= FPGA tools via share on Linux =
 +
 
 +
This section is not necessary to perform to be able to use the software on LISP and VDI: Digital electronics. The clients in LISP has the Xilinx software installed locally.
 +
 
 +
'''First time initialization'''
 +
 
 +
If you need to use Xilinx' software other places than the RHEL clients at LISP or ALGOL, utilize the following guide:
 +
 
 +
cd
 +
nano .bashrc
 +
 
 +
Append the following lines to the end of the .bashrc file:
 +
<pre class="brush: bash">
 +
# Vitis Unified 2020.2 64-bit version
 +
if ! [ -x "$(command -v vivado)" ]; then
 +
  source /projects/robin/programs/Vivado/2020.2/settings64.sh
 +
  export PATH=$PATH:/projects/robin/programs/Vivado/2020.2/bin
 +
fi
 +
 
 +
# License file
 +
export LM_LICENSE_FILE=5370@lisens.ifi.uio.no
 +
 
 +
# Remove duplicants in the PATH variable
 +
PATH=$(printf "%s" "$PATH" | awk -v RS=':' '!a[$1]++ { if (NR > 1) printf RS; printf $1 }')
 +
</pre>
 +
 
 +
After you have added the latter and saved the .bashrc file, restart the terminal or 'source' the .bashrc file.
 +
 
 +
'''Other versions'''
 +
 
 +
If needed, you can also make use of older or newer versions of the Xilinx products. As of August 2020, we have 2016.4, 2018.3 and 2020.2 available.
 +
 
 +
<!---
 +
= FPGA tools on Windows =
 +
Vivado 2019.1 is situated on /uio/kant/ifi-project06/robin/programs/vivado
 +
it can be accessed from any Windows machine, but it does need to have
 +
the LM_LICENSE_FILE environment variable set to 5370@lisens.ifi.uio.no
 +
 
 +
Questa is installed on SED (1454) and CHILL (3443).
 +
Please notify the engineer in ROBIN if there are issues.
 +
 
 +
'''BUG'''
 +
 
 +
Due to technical issues, you will receive the following error when creating a new project in Questa on '''M:/''':
 +
 
 +
<pre style="color:#ff0000">
 +
# Project file M:/inf3430/my_first_project.mpf is not readable.
 +
# Unable to open project.
 +
</pre>
 +
 
 +
We are sorry to inform that there are no current solutions to this problem. However, we are working on a solution. You may use;
 +
 
 +
C:\users\<username>
 +
 
 +
for storing project files, but be ware that there is no backup and you need to move your files to M:\ before log out of the client.
 +
 
 +
You may also use X-Win32 to get Linux with GUI on IFIs Windows clients: https://termvakt.uio.no/Fjerninnlogging#Xterm_via_X-Win32
 +
 
 +
--->
 +
 
 +
<!-- = Digilent Adept on Linux =
Digilent Adept to program the Atlys board can be obtained from the Digilent website.
Digilent Adept to program the Atlys board can be obtained from the Digilent website.
Line 70: Line 132:
To enable autocompletion and history in XMD:
To enable autocompletion and history in XMD:
-
  rlwrap xmd
+
  rlwrap xmd-->
-
== License server ==
+
= License server =
Licenses can be checked out from lisens.ifi.uio.no:
Licenses can be checked out from lisens.ifi.uio.no:
Line 80: Line 142:
  setx LM_LICENSE_FILE 5370@lisens.ifi.uio.no
  setx LM_LICENSE_FILE 5370@lisens.ifi.uio.no
-
== Robin Peripheral Repository ==
+
NOTE: The license server only works from UiOs network.
-
The ROBIN EDK repository is located at:
+
-
\\bifrost.ifi.uio.no\project0\robin\CADlib\spartan3EDK2012
+
= Academic Xilinx FPGA tools =
 +
Python interface to Xilinx/EDK MHS: https://github.com/EPiCS/reconos/tree/master/tools
-
It contains BSP for the Spartan3 Starter Board.
+
Bitstream Intepretation Library (Virtex5): https://github.com/florianbenz/bil
-
Set "Project Peripheral Reposotory Search Path" in XPS to enable it.
+
DeBit: http://code.google.com/p/debit/
-
== Academic Xilinx FPGA tools ==
+
TORC: http://torc-isi.sourceforge.net/
-
Python interface to Xilinx/EDK MHS: https://github.com/EPiCS/reconos/tree/master/tools
+
-
XDL Format description: http://www.mn.uio.no/ifi/english/research/projects/cosrecos/publications/paper/recosoc11beckhoff.pdf
+
ReconOS: http://www.reconos.de
-
Bitstream Intepretation Library (Virtex5): https://github.com/florianbenz/bil
+
= Having problems? =
-
DeBit: http://code.google.com/p/debit/
+
If you are having problems running the tools as mentioned, please ask a group teacher or send an mail to: robin-engineer at ifi.uio.no.
-
GoAhead: http://www.mn.uio.no/ifi/english/research/projects/cosrecos/goahead/
+
== "command not found"  => Not running .bashrc? ==
-
Creating Hard Macros (guide): http://wiki.eng.iastate.edu/reconfigurable-computing-wiki/index.php/Creating_Hard_Macros
+
When running ssh from another linux system or Mac, it is possible that only .bash_profile is read, not .bashrc. This will typically lead to "command not found" when trying to launch vsim or any other program that should have been found in the path. This can be further confirmed by listing PATH or the MODELSIM variable
 +
>>echo $PATH
 +
>>echo $MODELSIM
 +
If they don't show traces of what you have put into .bashrc, it has not been run, or the variables have over-written later.  
-
TORC: http://torc-isi.sourceforge.net/
+
To ensure that the .bashrc is run when opening a new xterm or ssh'ing into a new server, append the following to your .bash_profile:
 +
if [ -f ~/.bashrc ]; then
 +
  source ~/.bashrc
 +
fi
 +
 
 +
You can also manually source .bashrc and then open a new xterm that can use vsim
 +
>>source ~/.bashrc
 +
>>xterm &
 +
 
 +
This last solution will of course be a one-time only approach, since it doesn't change any configuration file.
 +
 
 +
Here is an article on how it became two configuration files rather than just one:
 +
[http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html www.joshstaiger.org/archives/2005/07/bash_profile_vs.html ]
-
ReconOS: https://github.com/EPiCS/reconos
+
== Remote access with GUI ==
 +
X11 forwarding is required to be able to see windows opened on a linux server. On windows, X-win32 can be used. For linux ssh -X or ssh -Y can be used, while on MAC you may need XQuartz or something similar to allow X11 forwarding. More on this can be found [https://robin.wiki.ifi.uio.no/Remote_access here].

Current revision as of 11:46, 3 January 2024

Contents

FPGA tools on LISP (2428)

Vivado and Vitis is installed locally on the computers in LISP. To launch Vivado go to Applications->Education-> Vivado

Alternatively, you can find it by searching for apps using the super-key (Windows key):

class=noresize


Launch in terminal

Launching the applications is done by entering the following commands in the terminal:

Questa with GUI:

vsim

Vivado with GUI:

vivado

Vitis with GUI:

vitis

Vitis HLS with GUI

vitis_hls

Vlog (terminal only):

vlog

Vcom (terminal only):

vcom

Help:

<command> -h

VHDL using VSCode

VHDL code can also be edited using VSCode (Visual Studio Code) which is installed on computers at LISP.

  • Launch Vscode by searching through applications: Applications -> VSCode
  • Add the extension for VHDL syntax highlighting by:
    • View -> Extensions or <Ctrl + Shift + X> to open the Extensions window.
  • Search VHDL and you will see a list of extensions. Install VHDL by Pu Zhao. (Note: there are other suitable vhdl extensions as well).
  • Once installed, enable the extension (if not done automatically).

Questa and modelsim.ini in write mode

You might get the following error message when using Questa:

# ** Error: (vmap-7) Failed to open ini file "/uio/kant/ifi-project06/robin/CADlib/modelsim.ini" in write mode.
# Permission denied. (errno = EACCES)

This is expected behavior because you are using a shared write protected modelsim.ini. To make your own copy of the modelsim.ini file, run;

mkdir -p ~/.config/modelsim/                             # Make a directory for modelsim config
cp $CADLIB/modelsim.ini ~/.config/modelsim/modelsim.ini  # Copy modelsim.ini

Lastly, you need to alter the MODELSIM variable. Open the .bashrc in your editor of choise (e.g code ~/.bashrc) and add the following line:

# Setting MODELSIM variable used in IN3160
export MODELSIM=$HOME/.config/modelsim/modelsim.ini

Restart the terminal or run source ~/.bashrc for the changes to take effect.

FPGA tools via share on Linux

This section is not necessary to perform to be able to use the software on LISP and VDI: Digital electronics. The clients in LISP has the Xilinx software installed locally.

First time initialization

If you need to use Xilinx' software other places than the RHEL clients at LISP or ALGOL, utilize the following guide:

cd 
nano .bashrc

Append the following lines to the end of the .bashrc file:

# Vitis Unified 2020.2 64-bit version
if ! [ -x "$(command -v vivado)" ]; then
  source /projects/robin/programs/Vivado/2020.2/settings64.sh
  export PATH=$PATH:/projects/robin/programs/Vivado/2020.2/bin
fi

# License file
export LM_LICENSE_FILE=5370@lisens.ifi.uio.no

# Remove duplicants in the PATH variable
PATH=$(printf "%s" "$PATH" | awk -v RS=':' '!a[$1]++ { if (NR > 1) printf RS; printf $1 }')

After you have added the latter and saved the .bashrc file, restart the terminal or 'source' the .bashrc file.

Other versions

If needed, you can also make use of older or newer versions of the Xilinx products. As of August 2020, we have 2016.4, 2018.3 and 2020.2 available.


License server

Licenses can be checked out from lisens.ifi.uio.no:

export LM_LICENSE_FILE=5370@lisens.ifi.uio.no

On Windows:

setx LM_LICENSE_FILE 5370@lisens.ifi.uio.no

NOTE: The license server only works from UiOs network.

Academic Xilinx FPGA tools

Python interface to Xilinx/EDK MHS: https://github.com/EPiCS/reconos/tree/master/tools

Bitstream Intepretation Library (Virtex5): https://github.com/florianbenz/bil

DeBit: http://code.google.com/p/debit/

TORC: http://torc-isi.sourceforge.net/

ReconOS: http://www.reconos.de

Having problems?

If you are having problems running the tools as mentioned, please ask a group teacher or send an mail to: robin-engineer at ifi.uio.no.

"command not found" => Not running .bashrc?

When running ssh from another linux system or Mac, it is possible that only .bash_profile is read, not .bashrc. This will typically lead to "command not found" when trying to launch vsim or any other program that should have been found in the path. This can be further confirmed by listing PATH or the MODELSIM variable

>>echo $PATH
>>echo $MODELSIM

If they don't show traces of what you have put into .bashrc, it has not been run, or the variables have over-written later.

To ensure that the .bashrc is run when opening a new xterm or ssh'ing into a new server, append the following to your .bash_profile:

if [ -f ~/.bashrc ]; then
  source ~/.bashrc
fi

You can also manually source .bashrc and then open a new xterm that can use vsim

>>source ~/.bashrc
>>xterm &

This last solution will of course be a one-time only approach, since it doesn't change any configuration file.

Here is an article on how it became two configuration files rather than just one: www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

Remote access with GUI

X11 forwarding is required to be able to see windows opened on a linux server. On windows, X-win32 can be used. For linux ssh -X or ssh -Y can be used, while on MAC you may need XQuartz or something similar to allow X11 forwarding. More on this can be found here.

Personal tools
Front page