Skip to main content

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. VSCodicum/VSCode
  2. Python3
  3. Python3 packages
  4. make
  5. EDA Tools

1. VSCodium/VSCode

Install VSCodium or VSCode.

2. Python3

Install Python3 in your OS:

Windows Standalone
  1. Go to the Python website and download the latest version of Python3 for Windows: https://www.python.org/downloads/windows

  2. 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.

  3. Once Python is installed, open a command prompt by pressing Win+R and typing cmd, then press Enter.

  4. Type python --version in the command prompt and press Enter. This should display the version of Python you just installed.

  5. 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

  6. Open a command prompt and navigate to the folder where you saved the get-pip.py script.

  7. Type python get-pip.py and press Enter. This will install pip on your system.

  8. 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
  1. Click windows and search for "Edit the system enviorment variables"
  2. Under "System Variables", find Path and click edit
  3. Click new and add the anaconda path (By default, it should be C:\ProgramData\anaconda3\)
  4. 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:

  1. In a folder you want the virtual enviorment to be installed, open command prompt
  2. write the following command python -m venv venv, this will create a folder named venv where the new virtual python enviorment will be located
  3. 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.
  4. Now we will install the required python packages for teroshdl, we will do this by typing pip install teroshdlin the virtual enviorment command prompt!
Linux
  1. Open a terminal window by pressing Ctrl + Alt + T or searching for "Terminal" in the applications menu.

  2. Update the package list to ensure you have the latest version of the package manager by running the following command: sudo apt update

  3. Install Python 3 by running the following command: sudo apt install python3

  4. Verify that Python 3 is installed by running the following command: python3 --version

  5. This should display the version of Python 3 that was installed.

  6. Install pip, the package installer for Python, by running the following command: sudo apt install python3-pip

  7. Verify that pip is installed by running the following command: pip3 --version

  8. This should display the version of pip that was installed.

Mac
  1. Open a web browser and go to the Python website: https://www.python.org/downloads/

  2. 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).

  3. 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.

  4. 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, type pip3 --version and press Enter. This should display the version of pip you just installed.

  5. If you want to use Python and pip without typing the python3 and pip3 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)

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

4. Make

info

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:

  1. 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)."
  2. Ensure you have Chocolatey installed. If not, you can install it by running the following command:
  3. 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'))

  4. Once Chocolatey is installed, you can install make by running the following command:
  5. choco install make

  6. Chocolatey will handle the installation process, including any dependencies make requires.
  7. After the installation is complete, you can verify that make is installed by checking its version with this command:
  8. make --version

5. EDA tools

warning

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.