tbengy Python Tool for SV/UVM Testbench Generation and RTL Synthesis. The tool uses newly available capability of Vivado tool by Xilinx (WebPack Version) to compile and run SV/UVM Testbench and syntheize RTL for Digilent FPGA Boards
python --version
Or
python3 --version
Python 3.8.1
export PATH="$PATH:/home/<path_to_xilinx_installation>/Xilinx/Vivado/2020.1/bin"
Note: Put the above line with your path in ~/.bashrc, so the tool can load everytime you open terminal
vivado
Open Command-Prompt as administrator
setx path "%path%;<path_to>Xilinx\Vivado\2020.1\bin"
Example: setx path "%path%;C:\Xilinx\Vivado\2020.1\bin"
You can also set the path from System Properties. Search online for this method.
vivado
Most Linux come with GNU Make so no need to do this step if you are running using Linux
For Windows, download GNU Make and install it from http://gnuwin32.sourceforge.net/packages/make.htm
After installation in Windows, we need to add the bin path of Make in system path variable as we did for Vivado
setx path "%path%;<path_to>Program Files (x86)\GnuWin32\bin\"
Example: setx path "%path%;C:\Program Files (x86)\GnuWin32\bin\"
After adding the path, open new command-prompt/Powershell window and run
make
If you see make getting executed, you are good to go
Run the command below if you are using Git to clone the repository anywhere you wish
git clone https://github.com/prasadp4009/tbengy.git
Or
Download from link - https://github.com/prasadp4009/tbengy/archive/master.zip
Unzip the master.zip if downloaded and then go to tbengy directory
Open new Terminal/Console/Command-Prompt/Powershell in that directory
Run the command below to generate UVM TB
python tbengy.py
Or
python3 tbengy.py
tbengy help can be accessed with:
python tbengy.py -h
Or
python3 tbengy.py -h
You should get the following output
usage: tbengy.py [-h] [-v] (-l | -m <module_name>) [-t <tb_type>] [-b <board_type>] [-f <fpga>] [-d <dir_path>]
optional arguments:
-h, --help show this help message and exit
-v, --version Show tbengy version and exit
-l, --listboards Show the list of available boards and exit
-m <module_name>, --modulename <module_name>
Module name for which TB to be generated. Ex. -m my_design
-t <tb_type>, --tbtype <tb_type>
Testbench type to be generated. Ex. -t uvm or -t sv
-b <board_type>, --boardtype <board_type>
Board Files to be added. Ex. -b zybo, -b nexys4_ddr, -b zybo-z7 etc.
-f <fpga>, --fpga <fpga>
FPGA used in board. Ex. -f xc7z010clg400-1, -f xc7a100tcsg324-1, -f xc7z010clg400-1 etc. for Zybo, Nexys 4 DDR and Zybo-Z7-10 respectively
-d <dir_path>, --dirpath <dir_path>
Directory under which TB should be generated. Ex. -d ./myProjects/TB. Default is present working dir.
Enter you module name with '-m
python tbengy.py -m my_design
Or
python3 tbengy.py -m my_design
You can enter desired directory where you want to generate TB by passing '-d
python tbengy.py -m my_design -d ./myProjects/
Or
python3 tbengy.py -m my_design -d ./myProjects/
Go to your generated module folder
You can read the generated README.md to understand directory structure
To run the testbench, go to scripts directory and run command below
python tbengy.py -m my_design -d ./myProjects/ -t sv
Or
python3 tbengy.py -m my_design -d ./myProjects/ -t sv
python tbengy.py -l
Or
python3 tbengy.py -l
python tbengy.py -m zyboBlink -d ..\myProj\ -b zybo -f xc7z010clg400-1 -t sv
Or
python3 tbengy.py -m zyboBlink -d ..\myProj\ -b zybo -f xc7z010clg400-1 -t sv
python tbengy.py -m nddr4Blink -d ..\myProj\ -b nexys4-ddr -f xc7a100tcsg324-1 -t sv
Or
python3 tbengy.py -m nddr4Blink -d ..\myProj\ -b nexys4-ddr -f xc7a100tcsg324-1 -t sv
make run_all
make run_all_gui
make synth
Note: You can have multiple boards connected to system. Do make sure the boards are connected and turned on.
Contact me on prasadp4009@gmail.com for any questions.
Hope the tool helps. Thanks!