Setup of WSL Enviroment for Chisel

Chisel is a hardware constrcution programing language in a Scala embedded language. Chisel is famous as implementation of the Rocket chip RISC-V instruction set. This topic is described about setup of WSL(Windows Subsystem on Linux) enviroment for Chisel.

Link : chisel-lang
Link : riscv-rocket-chip-tutorial pdf file

Base WSL Enviroment

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.3880

Setup of WSL enviroment for Chisel

  • Installing Java Design Kit
sudo apt update
sudo apt upgrade -y 
sudo apt install default-jdk -y
  • Settings of intalling sbt(Scala build tool)
sudo apt install apt-transport-https curl gnupg -yqq
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt update
  • Installing abt
sudo apt update
sudo apt install sbt -y
  • Installing verilator for test and requied packages
Link : verilator overview
sudo apt install gcc g++ make perl flex bison texi2html unzip -y
sudo apt install verilator -y

if you use Visual Stdio Code as programing enviroment, you can install Metals easily. Metals is found and installed by Visual Stdio Code extension like a following pictuire.

  • Getting sbt template for Chisel
sudo wget https://github.com/freechipsproject/chisel-template/archive/release.zip
unzip release.zip

If you use Visual Stdio Code, By opening build.sbt file in chisel-template-release directory, you can install matals configuration for sbt.

Setup fo WSL enviroment for Chisel is completed!

CATEGORIES:

Chisel|RISC-V

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *