Giter Club home page Giter Club logo

tbengy's Introduction

tbengy 1.2

tbengy Python Tool for UVM Testbench Generation. The tool uses newly available capability of Vivado tool by Xilinx (WebPack Version) to compile and run UVM Testbench

Demo

asciicast

Requirements

  • Python 3.x
  • Xilinx Vivado 2020.x
  • GNU Make

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

  • Once you set the path in ~/.bashrc, open new terminal and execute command below
vivado
  • If your path and setup is correct, Vivado GUI will open
  • You can close it as we will be working from terminal for the tbengy

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

  • Once you set the path in Windows, open new command-prompt/Powershell and execute command below
vivado
  • If your path and setup is correct, Vivado GUI will open
  • You can close it as we will be working from command-prompt/Powershell for the tbengy

3. GNU Make

  • 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

Using tbengy

  • 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

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] -m <module_name> [-d <dir_path>]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Show tbengy version and exit
  -m <module_name>, --modulename <module_name>
                        Module name for which TB to be generated. Ex. -m my_design
  -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 <module_name>', the tool will generate a complete UVM testbench
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 <directory_path>'
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

For batch mode

make run_all

For generating wave and debugging in Vivado Simulator

make run_all_gui

Contact me on [email protected] for any questions.

Hope the tool helps. Thanks!

Tool Developement Plan

  • Generation of UVM Testbench with RTL Example and ready to compile and run
  • Add simple RAM RTL and simple sanity test
  • Create a seperate template file for configuring generated code
  • Code CLI for tbengy
  • Add support for simple SV TB with Modelsim compilation instruction in Makefile
  • Add support for Vivado wdb wave dump to Modelsim WLF dump conversion for debugging waves generated by Vivado in Modelsim

tbengy's People

Contributors

prasadp4009 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.