lowRISC / lowRISC/ibex

Cosim mismatch in some tests with PMP enabled using QuestaSim

Open
#2,124 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
SystemVerilog
Stars
2.1k
Forks
810
Avg merge
5d 23h
Merged PRs (30d)
9

Description

## Observed Behavior

I am getting the following error when running the tests using the default configuration (OpenTitan).
```
# UVM_FATAL ibex/dv/uvm/core_ibex/common/ibex_cosim_agent/ibex_cosim_scoreboard.sv(168) @ 50673967:
uvm_test_top.env.cosim_agent.scoreboard [uvm_test_top.env.cosim_agent.scoreboard] Cosim mismatch Synchronous trap was expected at ISS PC: ffffffff8000360a but the DUT didn't report one at PC 80003606
```
- riscv_debug_instr_test
- riscv_debug_wfi_test
- riscv_interrupt_wfi_test
- riscv_debug_single_step_test
- Other tests are matching the behavior in [Ibex Regression Results](https://ibex.reports.lowrisc.org/opentitan/latest/report.html)

## Expected Behavior

It was expected for these tests to pass with the default configuration as of here [Ibex Regression Results](https://ibex.reports.lowrisc.org/opentitan/latest/report.html)
When I set the PMPEnable to 0 in ibex configuration file it passes gracefully.

## Steps to reproduce the issue

- make SIMULATOR=questa ITERATIONS=1 TEST=riscv_debug_wfi_test

_The test passes when PMPEnable is set to 0 in [ibex_configs.yaml](https://github.com/lowRISC/ibex/blob/master/ibex_configs.yaml)_

## My Environment
**EDA tool and version:** Questasim 2023.1

**Operating system:** Linux-64 CentOS 7.9

**Version of the Ibex source code:** df88055aa38868451ce90d7fcc2bbf172a2dc8a0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the mismatch with `make SIMULATOR=questa ITERATIONS=1 TEST=riscv_debug_wfi_test` and inspect `ibex/dv/uvm/core_ibex/common/ibex_cosim_agent/ibex_cosim_scoreboard.sv` around line 168. Compare the default configuration with `PMPEnable` set to 0 in `ibex_configs.yaml`; done means the listed tests pass with PMP enabled and match the regression results.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.