Giter Site home page Giter Site logo

The testcase files about ibex HOT 2 CLOSED

VivianDa avatar VivianDa commented on July 19, 2024
The testcase files

from ibex.

Comments (2)

rswarbrick avatar rswarbrick commented on July 19, 2024

Hi there, and thanks for the question.

Many of the tests work in essentially the same way:

  • We generate a constrained random program using riscv-dv.
  • We execute the program with an instruction set simulator (Spike), spitting out a log of the instructions and state changes.
  • We execute the program in an RTL simulation, spitting out equivalent logs.
  • We compare the logs from the two executions and check that they match.

Some specific tests / configurations are defined in testlist.yaml. For example, it contains:

- test: riscv_arithmetic_basic_test
  description: >
    Arithmetic instruction test, no load/store/branch instructions
  gen_opts: >
    +instr_cnt=10000
    +num_of_sub_program=0
    +no_fence=1
    +no_data_page=1
    +no_branch_jump=1
    +boot_mode=m
  iterations: 10
  gen_test: riscv_instr_base_test
  rtl_test: core_ibex_base_test

There are some more details about how this all works in the manual. See the file verification.rst. You can find it rendered online here: https://ibex-core.readthedocs.io/en/latest/03_reference/verification.html

from ibex.

VivianDa avatar VivianDa commented on July 19, 2024

May i say that when using make TEST=riscv_arithmetic_basic_test , in riscv-dv is actually using the three uvm files below to generate tmp *.s file then compiled to binary, next to execute ?

inst_overrides = [
        'riscv_asm_program_gen',
        'ibex_asm_program_gen',
        'uvm_test_top.asm_gen'
    ]
   ...

    sim_opts_dict = {
        'uvm_set_inst_override': ','.join(inst_overrides),
        ...
    }

(Code from dv/uvm/core_ibex/scripts/run_instr_gen.py line 156 to 175.)

from ibex.

Related Issues (20)

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.