Giter Site home page Giter Site logo

jkmieloch / sv-tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chipsalliance/sv-tests

0.0 0.0 0.0 9.37 MB

Test suite designed to check compliance with the SystemVerilog standard.

Home Page: https://chipsalliance.github.io/sv-tests-results/

License: ISC License

JavaScript 4.01% C++ 0.08% Python 14.40% CSS 2.28% SystemVerilog 74.74% Makefile 0.88% HTML 3.62%

sv-tests's Introduction

SystemVerilog Tester

License Build Status

The purpose of this project is to find all the supported and missing SystemVerilog features in various Verilog tools.

The report generated from the last passing master build can be viewed on a dedicated dashboard: Grid

History of the builds is also tracked and can be seen on a separate page: History

Running

Initialize the submodules:

git submodule update --init --recursive

Install all the python dependencies and make sure the installed binaries can be called.

pip3 install --user -r conf/requirements.txt
export PATH=~/.local/bin:$PATH

Build tools (optional, tools from PATH can be used):

make -k runners

And then just run:

make generate-tests -j$(nproc)
make -j$(nproc)

This should generate many log files for all the tools/tests combinations and an out/report.html file with a summary of the tested features and tools.

If you don't want to generate the report file, but are interested in just running all the tests, you can run:

make tests

Adding new test cases

Adding a new test case is a two step process. First you create the test case itself which should use only a minimal required subset of SystemVerilog to test a particular feature. Additionally each test should cover only a single feature. If the test must use several features, each of those must be also covered in separate test cases.

After creating a new test case it must be correctly tagged:

  • name - must be unique and should be directly related to what the test case covers.
  • description - should provide a short description that will be visible in the report page.
  • should_fail_because - must be used if the test is expected to fail and should contain the reason of failure.
  • files - is a list of files used by this test case, can be omitted to use only the main file with metadata.
  • incdirs - can be used to provide a list of include directories, can be omitted to use only the default ones.
  • top_module - optional, allows to specify which module is the top one.
  • tags - tag must be used to specify which part of SystemVerilog specification this test case covers.
  • defines - provides a list of macros for preprocessor. If the test case uses several SystemVerilog features, only the feature directly tested should be included in tags. List of existing tags is located in conf/lrm.conf.

Finally the file containing the test case and metadata should be placed in tests/chapter-([0-9]+)/ subdirectory based on the tags fields specified earlier.

Importing existing tests from a test suite/core/tool

  1. Add the tests as a submodule to this repository via git submodule add <git_url> third_party/<category>/<name>. If you want to add tests from a tool that is already in third_party/tools you can skip this step.

  2. Add a new tag named <name> to conf/lrm.conf together with a short description.

  3. Generate wrapper .sv files by either:

    • Adding a new config to conf/generators/meta-path/ that will be used by generators/path_generator.
    • Adding a new generator script to generators/ that will create required wrappers.

    First method works well with test suites in which each test case is contained in a separate Verilog file. If the test suite provides metadata that must be processed or you are importing an IP core then you should create custom generator script.

    Use tag that you added in the previous step.

Adding a new tool

  1. Add the tool as a submodule to this repository via git submodule add <git_url> third_party/tools/<name>.

  2. Add a target for building and installing the tool manually in tools/runners.mk

  3. Create a new runner script in tools/runners/<name>.py that will contain a subclass of BaseRunner named <name>. This subclass will need to at least implement the following methods:

    • __init__ to provide general information about the tool.
    • prepare_run_cb to prepare correct tool invocation that will be used during tests.

    If the new tool is a Python library, reimplement run and other supporting methods instead of implementing prepare_run_cb.

Supported tools

sv-tests's People

Contributors

ahegazy avatar alaindargelas avatar caryr avatar dalance avatar dependabot-preview[bot] avatar dependabot[bot] avatar drom avatar fabianschuiki avatar github-actions[bot] avatar hzeller avatar jkmieloch avatar joannabrozek avatar jrudess avatar kamilrakoczy avatar kgugala avatar lpawelcz avatar mglb avatar mikepopoloski avatar mithro avatar piotr-binkowski avatar prahitha avatar rrozak avatar symbiflow-robot avatar tgorochowik avatar tjurtsch avatar towoe avatar wsipak avatar wsnyder avatar wtatarski avatar zachjs 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.