Coder Social home page Coder Social logo

yuravg / uvm_tb_cross_bar Goto Github PK

View Code? Open in Web Editor NEW
24.0 4.0 10.0 228 KB

SystemVerilog UVM testbench example

License: MIT License

Emacs Lisp 2.08% Shell 0.12% SystemVerilog 74.79% Makefile 5.34% Stata 4.30% Tcl 6.74% Perl 6.63%
uvm systemverilog verification

uvm_tb_cross_bar's Introduction

SystemVerilog UVM testbench example

uvm_tb_cross_bar is my a SystemVerilog UVM example. It has DUT, testbench and scripts to run simulation.

DUT

A cross_bar project is used as DUT, this is just a bus switcher(specification). Used my implementation of this design.

DUT implementation is located in the rtl directory.

RTL synthesis

For RTL synthesis is used Intel Quartus Prime, example is located in the quartus directory.

|-rtl/

Testbench

The testbench has bus and cross-bar UVC.

Bus UVC has agent and sequences.

Cross-bar UVC has agent, connecting layer and sequences. The layer provides connectivity cross-bar and bus UVC.

Env has scoreboard and connect cross-bar agents. The scoreboard is checking results of each tests.

TB provides connection RLT to UVM Test.

Each Test connects Env to DUT and runs required virtual_sequences. The result of all sequences is checked using scoreboard.

|-agents/
| |_bus_uvc/
| |_cross_bar_uvc/
-uvm_tb/
  |_env/
  |_tb/
  |_tests/
  |_virtual_sequences/

Simulation

To run simulation of this example used Mentor Graphic’s QuestaSim or ModelSim simulator.

Directory sim contains files to run simulation.

Following examples of commands to be run from the sim directory.

|-sim/

Simulation launch

To run the simulation used console and make-file.

To get list of available commands or list of tests should run following command from console:

$ make help

Run complete verification

Run command from console:

$ make all_tests

The results of each test and a summary of all the tests are displayed in the console.

Each test writes a log and report files: <test_name>.log, <test_name>.log.rpt (report file - it is just reformatted the log file).

Log-file output example

./images/end_of_test_log.png

Rpt-file output example

./images/end_of_test_rpt.png

Summary example

./images/summary.png

Run some test

At this example there are following ways to run tests:

  1. run test in console(without GUI)
  2. run test with GUI from console
  3. run test from GUI

1. Run test in console(without GUI)

To run test just run command from console:

$ make <test_name>

<test_name> - name from list of tests

2. run test with GUI from console

Should set empty environment variable VSIM_MODE, and run test in console (example for BASH):

$ export VSIM_MODE=''
$ make <test_name>

or

$ make <test_name> VSIM_MODE=''

<test_name> - name from list of tests

3. run test from GUI

Run ModelSim/QuestaSim, load aliases, run test.

  • Run ModelSim/QuestaSim in sim directory
$ vsim `pwd` &
  • run in ModelSim/QuestaSim Transcript window
do alias.do
  • run test
run_<test_name>

Screenshots

Mentor Graphic’s QuestaSim wave

./images/wave.png

License

This project is licensed under the MIT License. If not, see https://www.opensource.org/licenses/MIT

uvm_tb_cross_bar's People

Contributors

yuravg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

uvm_tb_cross_bar's Issues

Supporting windows for running test from GUI

By replacing the following code in `sim/Makefile , the tests can be run in Windows.

ifeq ($(OS),Windows_NT)
# Windows-specific
wlib:
    @if not exist work ( \
        vlib work \
    )
    vmap work work
else
# Linux-specific
wlib:
    @-if [ ! -d work ] ; then \
    vlib work;              \
    fi
    vmap work work
endif

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.