coding
spinal hdl
hdl
Installation
The following tools are needed:
Linux
For Linux there is also a complete spinal-install.bash script available.
chmod +x install-spinal.bash
./install-spinal.bash
sudo apt install -y git make autoconf g++ flex bison
sudo apt install -y openjdk-8-jdk
sudo apt install -y scala
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt update -y
sudo apt install -y sbt
IDE
sudo snap install intellij-idea-community --classic
Simulation
cd ~
git clone http://git.veripool.org/git/verilator
unset VERILATOR_ROOT
cd verilator
git pull # Make sure we're up-to-date
git checkout verilator_3_916
autoconf # Create ./configure script
./configure
make -j$( nproc)
sudo make install
sudo apt install -y gconf2 gtkwave
sudo apt install -y openocd
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6.tar.gz
tar -xzvf riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6.tar.gz
sudo mv riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6 /opt/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6
sudo mv /opt/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6 /opt/riscv
echo 'export PATH=/opt/riscv/bin:$PATH' >> ~/.bashrc
echo 'export PATH=/opt/riscv/bin:$PATH' >> ~/.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 echo "Install default tools"
sudo apt install -y zsh
sudo chsh -s /bin/zsh $USER
cd ~/Downloads
sh -c " $( curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh) "
sudo apt install -y yakuake krusader
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install -y sublime-text sublime-merge
sudo add-apt-repository ppa:christian-boxdoerfer/fsearch-daily
sudo apt update
sudo apt install -y fsearch-trunk
macOS
Install base cmdline tools
brew install git gcc make autoconf flex bison
brew install scala sbt
IDE
Install Visual Studio Code
Install scala plugin
Install sbt plugin
Install scala metal language server plugin
Simulation
brew install verilator gtkwave
In order to gtkwave to run correctly perl Switch needs to be installed
cpan install Switch
perl -V:'installsitelib'
Perl Switch needs to be liked to the default perl install location. The at the end of the above command the install location is given, it should be similar to:
sudo ln -s ~/perl5/lib/perl5/Switch.pm /Library/Perl/5.*
Link the gtkwave to the correct binary with one of the two commands.
alias gktwave = /Applications/gtkwave.app/Contents/Resources/bin/gtkwave
export PATH = /Applications/gtkwave.app/Contents/Resources/bin/:$PATH
Windows
IDE
Install IntelliJ IDEA
Within IntelliJ install Scala Plugin
Remove settings for Code Checking
Simulation
Install MSYS2 64bit
Install verilator from minGW packet manager
Verilator Installation pacman -Syuu
# Close the MSYS2 shell once you're asked to
pacman -Syuu
pacman -S --needed base-devel mingw-w64-x86_64-toolchain \
git flex\
mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-verilator
ADD MSYS2 C:\msys64\usr\bin;C:\msys64\mingw64\bin
to your Environment Variable Path
.
Install OpenOCD for JTAG debugging.