Prerequisites
TerosHDL can be installed in VSCodium or VSCode. As open source alternative of VSCode we recommend VSCodium. But it works in both with the same functionalities.
Here you can see a diagram of how to install the requirements to use TerosHDL with all its functionalities:
Before installing TerosHDL, you need to install some dependencies, which are software packages or libraries that the IDE relies on to function properly.
1. VSCodium/VSCode
2. Python3
Install Python3 in your OS:
Windows Standalone
-
Go to the Python website and download the latest version of Python3 for Windows: https://www.python.org/downloads/windows
-
Run the downloaded file and follow the installation wizard. During the installation, make sure to check the box "Add Python 3.x to PATH" so that you can run Python and pip from any command prompt.
-
Once Python is installed, open a command prompt by pressing Win+R and typing cmd, then press Enter.
-
Type
python --version
in the command prompt and press Enter. This should display the version of Python you just installed. -
Next, you need to install pip, the package installer for Python. Download the
get-pip.py
script from https://bootstrap.pypa.io/get-pip.py -
Open a command prompt and navigate to the folder where you saved the
get-pip.py
script. -
Type python
get-pip.py
and press Enter. This will install pip on your system. -
To verify that pip is installed correctly, type
pip --version
in the command prompt and press Enter. This should display the version of pip you just installed.
Windows Anaconda
- Click windows and search for "Edit the system enviorment variables"
- Under "System Variables", find
Path
and click edit - Click new and add the anaconda path (By default, it should be
C:\ProgramData\anaconda3\
) - Click ok and test correct python was choosen, you can do this by opening command prompt and writing python, you should see a python prompt with "Anaconda" mentioned.
Now, lets create a virtual enviorment and connect it to TerosHDL:
- In a folder you want the virtual enviorment to be installed, open command prompt
- write the following command
python -m venv venv
, this will create a folder named venv where the new virtual python enviorment will be located - Next, we will use the command prompt to "Activate" the virtual enviorment, we do this to install packages in the virtual enviorment, you do this by writing the following command:
venv\Scripts\activate.bat
, if you see (venv) before the command prompt the virtual enviorment has been activated correctly. - Now we will install the required python packages for teroshdl, we will do this by typing
pip install teroshdl
in the virtual enviorment command prompt!
Linux
- Open a terminal window by pressing Ctrl + Alt + T or searching for "Terminal" in the applications menu.
- Update the package list to ensure you have the latest version of the package manager by running the following command:
sudo apt update
- Install Python 3 by running the following command:
sudo apt install python3
- Verify that Python 3 is installed by running the following command:
python3 --version
- This should display the version of Python 3 that was installed.
- Install pip, the package installer for Python, by running the following command:
sudo apt install python3-pip
- Verify that pip is installed by running the following command:
pip3 --version
- This should display the version of pip that was installed.
Mac
- Open a web browser and go to the Python website: https://www.python.org/downloads/
- Download the latest version of Python3 for macOS by clicking on the "Download Python 3.x.x" button. Make sure to download the version that matches your system architecture (Intel or Apple Silicon).
- Once the download is complete, open the downloaded file and follow the installation wizard. During the installation, make sure to check the box "Install pip" so that you can easily install Python packages.
- To verify that Python and pip are installed correctly, open a Terminal window by going to Applications > Utilities > Terminal. Type
python3 --version
and press Enter. This should display the version of Python you just installed. Then, typepip3 --version
and press Enter. This should display the version of pip you just installed. - If you want to use Python and pip without typing the
python3
andpip3
commands, you can add them to your system path by adding the following lines to your shell configuration file (usually either~/.bashrc
or~/.zshrc
):
export PATH="/Library/Frameworks/Python.framework/Versions/3.X/bin:${PATH}"
3. Python3 package dependencies
Install Python package dependencies:
vunit-hdl
: VUnit is an open source unit testing framework for VHDL/SystemVerilog.edalize
: Python Library for interacting with EDA tools.yowasp-yosys
: This package provides Yosys binaries built for WebAssembly.cocotb
: COroutine based COsimulation TestBench environment for verifying VHDL and SystemVerilog RTL using Python. (optional)
- Windows
- Linux
- Mac
Open a command prompt by pressing the Windows key and R
key at the same time, then type cmd
and hit Enter. Type: pip install vunit-hdl edalize yowasp-yosys cocotb
Open a terminal window by pressing Ctrl + Alt + T or searching for "Terminal" in the applications menu.. Type: sudo pip install vunit-hdl edalize yowasp-yosys cocotb
Open a terminal window by going to Applications > Utilities > Terminal. Type: sudo pip install vunit-hdl edalize yowasp-yosys cocotb
4. Make
To make sure that TerosHDL is getting your Make binary correctly you need to configure the installation directory in TerosHDL configuration menu >> General >> Make installation directory
Install make in your system:
- Windows
- Windows (alternative method)
- Linux
- Mac
- Open a Command Prompt or PowerShell with administrative privileges.
- Press Win + X and select "Windows Terminal (Admin)" or "Command Prompt (Admin)."
- For PowerShell, right-click the Start button, choose "Windows PowerShell (Admin)."
- Ensure you have Chocolatey installed. If not, you can install it by running the following command:
- Once Chocolatey is installed, you can install make by running the following command:
- Chocolatey will handle the installation process, including any dependencies make requires.
- After the installation is complete, you can verify that make is installed by checking its version with this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install make
make --version
Make is a Unix-based utility and is not included in Windows by default. However, you can install Make on Windows using the following steps:
- Install a Unix-like environment such as Cygwin on your Windows system. This environment provide a Unix-like terminal and command-line tools, including Make.
Download and run the Cygwin installer from the official website (https://cygwin.com/install.html). During the installation process, select the packages you want to install, including Make, from the package list. - Once you have installed a Unix-like environment, open the terminal or command prompt provided by that environment.
- Verify that Make has been installed by running the following command:
make -v
. This should display the version of Make installed on your system.
Open a terminal window by pressing Ctrl + Alt + T or searching for "Terminal" in the applications menu.. Type: sudo apt install make
- Open a terminal window by going to Applications > Utilities > Terminal.
- Install Xcode, which includes Make, by running the following command:
xcode-select
. This will prompt you to install the Xcode Command Line Tools, which includes Make. - Verify that Make has been installed by running the following command:
make -v
. This should display the version of Make installed on your system.
5. EDA tools
To use the Verilog/SystemVerilog linter (error checking), you need to install: Vivado, ModelSim, Icarus, or Verilator.
Install your favorite tools: Quartus Pro, ModelSim, Yosys, GHDL, Vivado... For open-source tools, we recommend downloading OSS CAD Suite (https://github.com/YosysHQ/oss-cad-suite-build/releases). OSS CAD Suite is a binary software distribution for a number of open source software used in digital logic design. You will find tools for RTL synthesis, formal hardware verification, place & route, FPGA programming, and testing with support for HDLs like Verilog, Migen, and Amaranth.
After that, you only need to configure the path to the binaries.