Home

Awesome

tbengy v2

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

Used in Industry

Demo (Demo will be updated soon)

asciicast

Requirements

Setup Instructions

1. Python 3.x.x

Command

python --version

Or

python3 --version

Output (Should be 3.x.x)

Python 3.8.1

2. Xilinx Vivado 20xx.x

Setting Variable in Linux

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

Test that tool opens from Terminal and path is properly set

vivado

Setting Variable in Windows

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.

Check your Vivado installation from Command-prompt/Powershell

vivado

3. GNU Make

setx path "%path%;<path_to>Program Files (x86)\GnuWin32\bin\"

Example: setx path "%path%;C:\Program Files (x86)\GnuWin32\bin"

make

Using tbengy

git clone https://github.com/prasadp4009/tbengy.git

Or

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.
python tbengy.py -m my_design

Or

python3 tbengy.py -m my_design
python tbengy.py -m my_design -d ./myProjects/

Or

python3 tbengy.py -m my_design -d ./myProjects/

For SV TB generation

python tbengy.py -m my_design -d ./myProjects/ -t sv

Or

python3 tbengy.py -m my_design -d ./myProjects/ -t sv

For SV TB with Synthesis on Digilent Boards generation

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

For batch mode

make run_all

For generating wave and debugging in Vivado Simulator

make run_all_gui

For generating bit stream with synthesis and implementing it on board

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!

Tool Developement Plan