This guide explains how to set up and execute the VGA_Display project using the Tang Nano 9K FPGA. We will display output on an LCD via VGA, using Verilog/SystemVerilog coding. The steps include installing necessary software, configuring the project in Gowin IDE, and finally uploading the design to the FPGA via VSCode using Lushay Labs extensions.
Verilator is used for Verilog simulation. Install it using the following commands:
sudo apt-get update
sudo apt-get install verilator
verilator --version
Install the SDL2 library to enable graphics in your simulation environment:
sudo apt-get update
sudo apt-get install libsdl2-dev
dpkg-query -W -f='${Version}\n' libsdl2-dev
We will use Gowin IDE for FPGA design and bitstream generation. Follow these steps to download and install Gowin IDE:
- Visit the Gowin Semiconductor website.
- Navigate to the Downloads section.
- Find and download the Gowin EDA package for Linux (
Gowin_V1.9.9.03_Education_linux.tar.gz
). - Make sure you have an account or create a new one.
- Open a terminal and navigate to the download directory:
cd ~/Downloads
- Extract the downloaded package:
tar -xzf Gowin_V1.9.9.03_Education_linux.tar.gz
- Navigate to the extracted folder and run the installer:
cd gowin_eda chmod +x install.sh sudo ./install.sh
- Check and verify the installation:
gowin --version
-
Open the
.bashrc
File:nano ~/.bashrc
-
Add Gowin IDE Directory to the PATH:
# Add Gowin IDE directory to the PATH export GOWIN_PATH="/path/to/Gowin/IDE/bin" export PATH="$GOWIN_PATH:$PATH" # Alias to open Gowin IDE alias gowin="$GOWIN_PATH/gw_ide &"
Replace
/path/to/Gowin/IDE/bin
with the actual path where Gowin IDE is installed.- In
nano
, save your changes by pressingCtrl + O
, then pressEnter
, and exit by pressingCtrl + X
.
- In
-
Apply the Changes:
source ~/.bashrc
-
Verify PATH Update:
echo $PATH
-
Open Gowin IDE:
gowin
Follow these steps to install the Lushay Code extension in Visual Studio Code:
-
Open Visual Studio Code: Ensure you have Visual Studio Code installed. If not, download and install it from here.
-
Open the Extensions View: Open VSCode and click on the Extensions icon on the left sidebar, or press
Ctrl+Shift+X
to open the Extensions pane. -
Search for the Lushay Code Extension: In the Extensions search bar, type
Lushay Code v0.0.21
and hit enter. -
Install the Extension: From the results, find Lushay Code v0.0.21 by Lushay Labs. Click on Install.
-
Verify Installation: After installation, the extension will appear in your list of installed extensions. You’re now ready to use Lushay Code in your FPGA projects.