Commit graph

2390 commits

Author SHA1 Message Date
Marno van der Maas
4990aa2684 Update google_riscv-dv to google/riscv-dv@68e3bca
Update code from upstream repository https://github.com/google/riscv-
dv to revision 68e3bcac7293ac79067f0d8196bb973bd7c889cf

* [pmp] Remove restriction on using NAPOT when granularity = 0 (Marno
  van der Maas)
* [pmp] Add PMP entries for data in case of MML or MMWP (Marno van der
  Maas)
* [pmp] Add already_configured flag to skip address in PMP routine
  (Marno van der Maas)
* [pmp] Fix constraint and CSR write test in MML mode (Marno van der
  Maas)
* [pmp] Use random address instead of offset for full random test
  (Marno van der Maas)
* [pmp] Allow specifying address zero in `+pmp_region_%0d` (Marno van
  der Maas)
* [pmp] Randomizing entry for instructions for PMP randomization
  (Marno van der Maas)
* [lint] Remove trailing whitespace (Marno van der Maas)
* Tweak CSR constraints for more even read/write distribution (Greg
  Chadwick)
* [lint] Replace tabs with spaces (Marno van der Maas)
* [pmp] No PMP exception handler when no PMP support (Greg Chadwick)
* Expand CSR instruction constraint functionality (Greg Chadwick)
* Refactor CSR instruction into their own class (Greg Chadwick)

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-22 09:55:31 +01:00
Marno van der Maas
2669260aa0 [dv] Stop write PMP CSR routine when using full randomization 2022-08-22 09:55:31 +01:00
Harry Callahan
90daca9765 Bring back +disable_cosim to instead de-escalate fatal to info 2022-08-19 14:45:28 +01:00
Harry Callahan
d5c7b1be02 Remove the final cosim flags from core_ibex uvm environment
We are running with cosim by default now, and no longer support COSIM=0. Hence
this option and all downstream conditional paths are no longer required.
2022-08-19 14:45:28 +01:00
Harry Callahan
781f8445d8 Change method to locate ibex root to relative paths
I had used git to identify the repo root previously but this obviously does not
work with vendoring.
2022-08-19 11:45:52 +01:00
Marno van der Maas
f2f77a3cac [dv] Use lowRISC IP dir from imports instead of re-deriving it
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-19 11:45:52 +01:00
Marno van der Maas
6cb528f8ce [dv] Made dedicated gitignore file and add coverage files 2022-08-19 11:39:49 +01:00
Greg Chadwick
a646737d4d [rtl] Cannot add M mode executable PMP regions when MML = 1
A rule that allows M mode execution (either M mode only or shared M/U
mode) cannot be added when MML is set, unless RLB is also set.

Fixes #1740
2022-08-18 15:45:27 +01:00
Greg Chadwick
2ff233726d [dv] Add sim selection to icache make file 2022-08-18 14:51:23 +01:00
Greg Chadwick
1affeff527 [ci] Fix co-sim install
Due to a failure of mirror syncing the co-sim package cannot be
installed. This downloads it directly from the master server and
installs it manually.
2022-08-18 14:12:09 +01:00
Greg Chadwick
32801e8d12 [dv] Add MCAUSE and MSTATUS to the riscv_csr_test
With the new WARL functionality for the RISCV-DV CSR test generator we
can bring back these CSRs into the test.

Fixes #1663
2022-08-18 13:16:55 +01:00
Marno van der Maas
97ccca7f27 Made values of mcause 32 bits 2022-08-18 13:16:21 +01:00
Harry Callahan
261e9eb3b9 Fix isinstance error with Union types 2022-08-16 14:41:12 +01:00
Harry Callahan
7c8465f9c5 Switch to using pathlib3x to get backported features 2022-08-16 14:41:12 +01:00
Harry Callahan
bb15ce4378 Fix using built-in types as type hints not supported before Python 3.9
This could be reverted later if the required version changes.
2022-08-16 14:41:12 +01:00
Harry Callahan
111d84f549 core_ibex dv build system refactor
As well as completely removing the existing non-cosim flow, this commit
significantly refactors the build system to be less reliant on the makefile.

While we still use the Makefile, it is relegated to only providing scheduling
and dependency calculations between the different build steps.
This is possible by moving all of the build metadata into a file on-disk, which
is populated at the start of a new regression, then read and written to by the
different scripts executing the build. Each build step only needs to be passed
the location of this metadata at the top-level, and it can then import all
the information it requires to calculate and perform the next build stage.

This allows better observability into the build, as it is trivial to add new
data to this file, which is also provided as a human-readable yaml version.
It should also allow easier integration into different build systems, as the
dependency on Make is much weaker.

The file metadata.py and test_run_result.py contain the definitions for
these metadata objects. metadata.py defines an object for the whole
regression, while test_run_result.py defines objects for each individual test
performed.

The file riscvdv_interface.py has been created to better isolate the interface
with that project.
The file setup_imports.py has been created to centralize the importing of
python modules from other projects (riscvdv/ot_lowrisc_ip etc.).
Existing python code has been tidied to better conform to PEP8 standard
formatting, and to be more python in general such as using pathlib.Path.
2022-08-16 14:41:12 +01:00
Greg Chadwick
2f8dfa9dfe [dv] Reduce riscv_pmp_full_random_test iterations
We're seeing many timeouts in this test. This is causing issues for the
nightly regression. Keep the test in so we're aware of any major issues
with it but with far fewer timeouts to help keep the regression healthy.
We'll revisit the required iterations once we've sorted out the issues
with the test.
2022-08-12 17:22:04 +01:00
Greg Chadwick
db1eced0ee [rtl] Make PMP CSRs illegal in non PMP configurations
The previous behaviour was also acceptable but this matches spike.
2022-08-12 15:13:46 +01:00
Greg Chadwick
7e9eef2cf9 [cosim] Pass PMP configuration through to spike 2022-08-11 17:43:34 +01:00
Greg Chadwick
8282a0d244 [rtl] Fix MaxOutstandingDSideAccessesCorrect assertion 2022-08-11 15:44:41 +01:00
Greg Chadwick
4acc27b7ab [rtl, icache] Rework invalidation logic
This refactors the invalidation control logic into an explicit state
machine. The top-level icache_invalid_o signal is also removed.
Replaced with an explicit scramble key request instead.

This has all been done to better deal with corner cases around a new
invalidation being requested whilst another is still going on.
Previously there was a bug wher an invalidation request in the final
cycle of an ongoing invalidation didn't restart the invalidation but did
rotate the scrambling key producing an ECC failure and an alert.
2022-08-11 09:21:51 +01:00
Greg Chadwick
f2c09fe34a [ci] Move to spike-ibex-v0.4 2022-08-10 15:25:36 +01:00
Harry Callahan
3c1502c979 Add special-case signature for test_done in riscv_csr_test
This test is generated differently to all the others, as it exclusively uses a
python script.
The easiest way to make this work with the new test_done signature address is to
detect it as a special case and pass it the new address. The handshaking is only
used for ending the test, so the original address does not matter.
2022-08-10 14:00:41 +01:00
Harry Callahan
b8c6a343cb Change test_done mechanism to use riscvdv handshake, not ecall
Use the address (signature_addr - 0x4) for a TEST_PASS handshake.
Create new mem_seq_item subscriber port for test_done functionality.

By creating a new, distinct port and subscribing to all incoming memory items,
the existing wait_for_mem_txn() can be used with minor modifications to be
able to choose the port to wait on as an argument to the task.

Because the wait_for_mem_txn() implementation currently uses get() to pop the
latest item from the item_collected queue, having two different forked processes
that both await on this queue is not possible. The simplest solution is to
create a new, seperate port which also subscribes to the sequence_items
broadcast by the mem_if monitor.

Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
2022-08-10 14:00:41 +01:00
Greg Chadwick
e53a02ab31 [rtl] Alter some CSR WARL behaviour to match spike
The following changes are made:

- For unimplemented counters corresponding bits in MCOUNTINHIBIT read as
0 not 1
- For MHPMEVENTx we start at x = 3 with the first bit set (0-2
MHPMEVENTx CSRs do not exist)
- When writing an invalid privilege mode to MSTATUS.MPP/DCSR.PRV default
to U rather than M mode.

These new behaviours remain spec compliant and match spike.
2022-08-09 21:15:09 +01:00
Greg Chadwick
19d12ee3a7 [rtl] Fix MISA
Initially the 'B' bit was going to be used to indicate the presence of
the bit-manipulation extension. Now that has been seperated into
multiple smaller extensions the 'B' MISA bit isn't being used and
remains a reserved bit that should read as 0.

For the RV32B configurations where we implement non ratified
bit-manipulation extensions we must set the 'X' bit.

These changes matche the behaviour of spike.
2022-08-09 21:15:09 +01:00
Canberk Topal
ae76c62623 [dv,cosim] Add memory region to match UVM env
This extends our memory range to be between 0 and
0xFFFF_FFFF. This is needed because in the case of
no match between UVM memory model and spike memory
model, we see a mismatch.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-09 12:19:56 +03:00
Michael Schaffner
4975c7fa4b [lint] Minor fixes
Signed-off-by: Michael Schaffner <msf@google.com>
2022-08-05 12:25:36 -07:00
Marno van der Maas
0e5bedfff3 [dv,prim] Fix build and assert errors for vendored prim changes
After vendoring the new changes to the prim IP:
- Reorder `ibex_dv.f` to reflect the dependency on `prim_assert.sv`
- Disable assertion for register file prim onehot check.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-05 18:00:25 +01:00
Marno van der Maas
90a81a3cc7 Update lowrisc_ip to lowRISC/opentitan@f9e667550
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
f9e6675507fdd81e0b0dd3481c0a4bca634f322d

* [ralgen] Minor correction in alias-file passing mechanism (Michael
  Schaffner)
* [entropy_src/dv] Track FW_OV FIFO exceptions (Martin Lueker-Boden)
* [dv/clkmgr] Fix reset handling (Guillermo Maturana)
* [flash_ctrl] Add generic registers for the flash wrapper (Michael
  Schaffner)
* [fpv/prim_onehot_check] Fix prim_onehot_check compile error (Cindy
  Chen)
* [dvsim] Minor cleanup of job_runtime updates (Srikrishna Iyer)
* [chip/dv] replace wait with DV_WAIT (Weicai Yang)
* [dv] Add DV_WAIT macro (Weicai Yang)
* [dvsim] Display max CPU time in regression result (Cindy Chen)
* [dv, xcelium] Indicate SVA-disabled hierarchies (Srikrishna Iyer)
* [dv, xcelium] Update switches, sim finishi (Srikrishna Iyer)
* [utils,dvsim] Add wall-clock timeout feature (Guillermo Maturana)
* [prim_count] This reworks the primitive to make it more generic
  (Michael Schaffner)
* [dvsim] remove unecessary `sw_build_dir` parameter (Timothy Trippel)
* [dvsim] use Bazel labels for SW images (Timothy Trippel)
* [entropy_src/dv] Refactor entropy_src_rng_vseq (Martin Lueker-Boden)
* [dv, waves] Improve wave dumping (Srikrishna Iyer)
* [dv/kmac] Fix EDN timeout assertion failures (Cindy Chen)
* [doc] Move style guides into a separate section (Miguel Osorio)
* [spi_device/dv] Enable testing SFDP command (Weicai Yang)
* [doc] Unlist dangling pages from menus. (Miguel Osorio)
* [doc] Add DV intermediate sections (Miguel Osorio)
* [doc] Skip markdown templates from the build (Miguel Osorio)
* [dv/verilator] Fix numeric base of simulation statistics (Andreas
  Kurth)
* [dvsim] Make email.html filename more descriptive (Srikrishna Iyer)
* [csrng/dv] Add deposit to force states when disabled (Steve Nelson)
* fix(rdc): typo (Eunchan Kim)
* fix(rdc): Include NEW violations only to report (Eunchan Kim)
* [dvsim] Add support for SW (bazel) build opts (Srikrishna Iyer)
* fix(cdc): Parse NEW violations only (Eunchan Kim)
* feat(rdc): Add Meridian RDC log parser (Eunchan Kim)
* feat(rdc): Add Meridian RDC flow to dvsim (Eunchan Kim)
* [dv/cip_base] Add checking in stress_all_with_rand_reset seq (Cindy
  Chen)
* [clkmgr/prim] Make frequency measurement disable more robust
  (Timothy Chen)
* [prim/lint] Update waivers (Michael Schaffner)
* [doc] Update D2 checklist (Michael Schaffner)
* [clang-format] Format all covered files (Alexander Williams)
* [dvsim] Indicate what is currently running (Srikrishna Iyer)
* [doc] Fix trailing whitespace on md files. (Miguel Osorio)
* [doc] Remove README.md files from hw,utils folders (Miguel Osorio)
* [tools/dv] Modify common.ccf file for proper expression coverage
  (Steve Nelson)
* [prim_edn_req] Accumulate repetition errors until the data is
  consumed (Pirmin Vogel)
* [chip dv] Cleanup task invoked in func warning (Srikrishna Iyer)
* [topgen] Pass alias register paths into topgen for top RAL
  generation (Michael Schaffner)
* [dv] Split debug_access opt to another hjson variable for override
  (Weicai Yang)
* [dv] Fix ping exclusion (Weicai Yang)
* [prim] update register CDC scheme (Timothy Chen)
* [dv] Add assertion to check reg_we onehot error leads to a fatal
  alert (Weicai Yang)
* [sw,tests] Test flash_ctrl init and scramble (Dave Williams)
* [PRIM] new clock mux to prevent a glitch (Joshua Park)
* [dv] Add prim_cdc_rand_delay exclusion in cover_reg_top (Weicai
  Yang)
* [prim] Add additional qualification to the trigger (Timothy Chen)
* [prim] Add description to parameters (Timothy Chen)
* [sw,tests] Add -f option to copy in sim.mk (Dave Williams)
* [top/spi_device] constraint and clock updates (Timothy Chen)
* [dv] Update xcelium coverage config file (Weicai Yang)
* fix(prim): High memory usage of Assertion (Eunchan Kim)
* [top,dv] rv_dm agent update (Jaedon Kim)
* [dv] Enable reg_wr_check test for all blocks (Weicai Yang)
* [dv] Update tl testplan for reg write enable check (Weicai Yang)
* Refixed 12236 to a more rubust solution (Rasmus Madsen)
* [fpv/alert_handler] Add sec_cm FPV testbench for alert_handler
  (Cindy Chen)
* [dv,ralgen] revert `ralgen.py` to use relative file paths (Timothy
  Trippel)
* [dv,ralgen] update `ralgen.py` to use git paths over relative
  (Timothy Trippel)
* doc(prim): Specify ICEBOX for prim_packer (Eunchan Kim)
* [bazel,dvsim] update dvsim.py to use Bazel to build SW (Timothy
  Trippel)
* [prim] Added generic xnor2 (Arnon Sharlin)
* [flash_ctrl/prim_flash] Add parameters to tweak module latency
  (Timothy Chen)
* [prim_assert] Fix ASSERT_FPV_LINEAR_FSM (Guillermo Maturana)
* [chip,rstmgr,dv] regression fix rstmgr_alert_info test (Jaedon Kim)
* [dv/tool] Collect csr assertion cov (Cindy Chen)
* [otp_ctrl] Add generic registers for prim_otp_wrapper (Michael
  Schaffner)
* [dvsim] Use leaf most field if conflict rather than Exception
  (Eunchan Kim)
* [regtool] Extend UVM backend to support alias definitions (Michael
  Schaffner)
* [fvp/pwrmgr] Pwrmgr fsm error (Cindy Chen)
* [dvsim] Revert lowRISC/opentitan#12761 to build SW with meson
  (Timothy Trippel)
* [bazel,dvsim] update dvsim.py to use Bazel to build SW (Timothy
  Trippel)
* [prim] removed unused files (Timothy Chen)
* [flash_ctrl] Harden FIFO pointers (Timothy Chen)
* [dv] Remove TB_LINT_PASS in all IP checklists (Weicai Yang)
* [dv/flash_ctrl] Temp fix flash_ctrl regression compile error (Cindy
  Chen)
* fix(prim): Lint fix for line length (Eunchan Kim)
* fix(prim): Lint warning for `err_o` (Eunchan Kim)
* [dv] Fix Xcelium toggle collection (Weicai Yang)
* [hw/ip] Add extra prim_fifo_sync port (Timothy Chen)
* [prim/fifo] Add option to harden prim fifo pointers (Timothy Chen)
* [dv_base_reg] Extend search by name functions (Michael Schaffner)
* [fpv/lc_ctrl] Add gating conditions for sec_cm assertions (Cindy
  Chen)
* [primgen] Sort the parameters (Weicai Yang)
* [python] flake8 lint cleanups (Michael Schaffner)
* [prim_subreg] Remove anchor bufs since they are not needed (Michael
  Schaffner)
* [dv] Add `-xprop=mmsopt` run-opt for VCS (Weicai Yang)
* [dv] Temporarily remove CDC assertions (Weicai Yang)
* [hw/dv] further updated dv flow to now score systemverilog tasks and
  functions (Rasmus Madsen)
* [dv/chip] Fix bit_bash timeout error (Cindy Chen)
* [flash_ctrl] Allow fixed priority arbiter (Timothy Chen)
* [prim_assert] Minor rewording in comment (Michael Schaffner)
* [dv/xcelium] 1 attempt of cleaning up the coverage files (Rasmus
  Madsen)
* [dvsim] revert lowRISC/opentitan#12319 to fix CI (Timothy Trippel)
* [primgen] Sort the parameters to ensure stable order (Weicai Yang)
* [prim] Fix python style (Weicai Yang)
* [bazel] update dvsim.py to build ROMs with bazel (Timothy Trippel)
* [dvsim] Correct argparse usage statement and help (Drew Macrae)
* [prim_assert] Fix assertion include order (Michael Schaffner)
* [ast] Lint fixes and waiver updates (Michael Schaffner)
* [prim/lc_ctrl] Create a common assertion macro for linear FSM check
  (Michael Schaffner)
* [dv/csr_utils] Clean up mem_rd/wr print out message (Cindy Chen)
* [doc] Update D3 checklist per RFC (Michael Schaffner)
* [prim_dom_and_2share] Allow re-use of intermediate results for
  remasking (Pirmin Vogel)
* [prim_dom_and_2share] Add parameter to enable full/optional
  pipelining (Pirmin Vogel)
* [dv/vcs] Update cdc exclusion keyword (Cindy Chen)
* [prim] Add a duplicated prim_arbiter instance (Timothy Chen)
* [dv/cdc assertion] Temp remove CDC assertion cov collection in VCS
  (Cindy Chen)
* [prim_onehot_check] Rework lint fix (Michael Schaffner)
* [mubi/lc_ctrl] Change MUBI / lc_tx_t encodings (Michael Schaffner)
* [dv] Update xcelium cover.ccf to only enable coverage for dut
  (Weicai Yang)
* [dv/xcelium] Fix Xcelium nightly regression error (Cindy Chen)
* [prim_onehot_mux] Add lint waivers (Michael Schaffner)
* [prim_lc_sender] Add waiver (Michael Schaffner)
* [prim_mubi] Make sure waiver file is listed in core file (Michael
  Schaffner)
* [tlul_fifo_async] Move waiver to correct file and remove old waivers
  (Michael Schaffner)
* [prim_blanker] Remove prim_and2 waiver file (Michael Schaffner)
* [prim_packer] Lint fixes (Michael Schaffner)
* [prim_secded] Add lint waiver file (Michael Schaffner)
* [dv/cov] Exclude CDC module from collecting coverage (Cindy Chen)
* [reggen] Add spurious WE check to autogen'd regfile (Michael
  Schaffner)
* [prim_reg_we_check] Add spurious CSR write checker (Michael
  Schaffner)
* [prim_onehot_check] Add option for permissive en_i checks (Michael
  Schaffner)
* [tools/dv] updated UNR flow to support xcelium/jg (Rasmus Madsen)
* [prim] Add dv_macros missing dependency (Timothy Chen)
* [top, dv] Fix ext clk plusarg (Weicai Yang)
* [dv/build_seed] Fix build_seed (Cindy Chen)
* [clkmgr] Correct the disable condition (Timothy Chen)
* [flash, dv] Fix RMA test backdoor symbol overwrite (Weicai Yang)
* [top, dv] Fix rom backdoor symbol overwrite (Weicai Yang)
* [flash_ctrl] Add checks for unexpected acks (Timothy Chen)
* [prim_present] Add Verilator lint waiver (Michael Schaffner)
* [xcelium] Pass cov_merge_db_dir through to cov_report.tcl (Rupert
  Swarbrick)
* [dv/build_seed] Fix build seed errors (Cindy Chen)
* [prim_mubi] Add assertion to check that the values are complementary
  (Michael Schaffner)

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-05 18:00:25 +01:00
Marno van der Maas
5b15f7aad1 [vendor] Update patch file based on upstream OpenTitan 2022-08-05 18:00:25 +01:00
Canberk Topal
46404cf86f [rtl] Flush controller in PMP CSR write ops
As Greg pointed out:

When we have an instruction in ID/EX that writes a PMP register that
update gets written to the CSR the same cycle the next instruction
moves from IF to ID/EX with it's PMP check done with the old value.

The solution is to flush the pipeline when we get a PMP CSR write.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-05 15:50:42 +03:00
Harry Callahan
23806e2ad7 Fix incorrect debug_cause priority against riscv-debug 1.0.0-STABLE
The relevant page [Debug Spec v1.0.0-STABLE, p.53] gives the following
priorities for resolving multiple concurrent reasons for entering debug mode....

DCSR.cause : Explains why Debug Mode was entered.

When there are multiple reasons to enter Debug Mode in a single cycle,
hardware should set cause to the cause with the highest priority.
1: An ebreak instruction was executed.                        (priority 3)
2: A Trigger Module trigger fired with action=1.              (priority 4)
3: The debugger requested entry to Debug Mode using haltreq.  (priority 1)
4: The hart single stepped because step was set.              (priority 0, lowest)
5: The hart halted directly out of reset due to resethaltreq. (priority 2)
   It is also acceptable to report 3 when this happens.
6: The hart halted because it’s part of a halt group.         (priority 5, highest)
   Harts may report 3 for this cause instead.

Other values are reserved for future use.
2022-08-05 12:03:36 +01:00
Marno van der Maas
c4a97e05f5 [dv] Locking PMP regions in disable all regions tests 2022-08-03 15:06:03 +01:00
Marno van der Maas
cd5d957b3a [dv] Ignoring log files generated by Cadence tools
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-03 15:06:03 +01:00
Marno van der Maas
a97f384759 [dv] Allowing DV to disable PMP based on Ibex config
Added a patch for riscv_core_setting.sv, which is applied for the small
and experimental-branch-predictor configs.

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>

fixup
2022-08-03 15:06:03 +01:00
Marno van der Maas
5120fdadcc [dv] Add README for Ibex DV
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-03 15:06:03 +01:00
Marno van der Maas
ef86c30341 [dv] Write ePMP tests and enable ePMP in DV
- Enable epmp in riscv_core_settings.sv
- Bump CI and Spike version in `ci/vars.yml`
- Enable full random PMP test
- Create tests for machine mode lockdown (MML)
  - Code execute only, rest read/write
  - All regions execute only
  - All regions read only
- Create test for machine mode whitelist policy (MMWP)
- Create test for rule lock bypass (RLB)

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-03 15:06:03 +01:00
Marno van der Maas
b98efe7cbe Update google_riscv-dv to google/riscv-dv@808fb16
Update code from upstream repository https://github.com/google/riscv-
dv to revision 808fb162d66de5dd0dd2b45fd0b8d1fb1bf170f6

* [scripts] Improve WARL support in gen_csr_test (Greg Chadwick)
* [scripts] Refactor gen_csr_test (Greg Chadwick)
* Allow for WFI in User Mode (Canberk Topal)
* [Smepmp] Fixes `gen_pmp_instr` when MML and MMWP are enabled (Marno
  van der Maas)
* Fix typo in mseccfg_reg_t class (aneels3)
* Fix google/riscv-dv#819 (aneels3)
* lib.py, launch process in new session to fix timeout issue (Yannick
  Casamatta)

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-08-03 15:06:03 +01:00
Marno van der Maas
7f1bdcd5a2 [vendor] Remove patch that has been upstreamed 2022-08-03 15:06:03 +01:00
Canberk Topal
b5820b32c6 [dv,testlist] Enable irq_timer, allow WFI in Umode
This commit sets two different riscv-dv knob to make sure we hit
some holes in our coverpoints.

Activating `enable_timer_irq` for everytime we enable other
interrupts makes sure that we respond to it just like we respond
to other interrupts.

Setting tw=0 makes it so that we would allow WFI in user mode. We
were already randomizing it but for some certain tests, we actually
want to be in a sleep state, which wouldn't happen if tw=0 in user
mode.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-03 13:37:52 +01:00
Canberk Topal
cc55c47c37 [dv,core_ibex] Add push_pull agent for Scramble IF
This allows us to actually use Icache in our tests beecause
before this commit key_valid was tied to 0 which means everytime
we receive a FENCE.I instruction, we wouldn't be able to successfully
flag inval_done. Which means we weren't probably using ICache correctly.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-03 11:10:28 +01:00
Canberk Topal
e242ef07ad [rtl] Deny no-match X access in M-Mode while MML=1
In ePMP spec, it specifies as:

```
Executing code with Machine mode privileges is only possible from memory
regions with a matching Mmode-only rule or a locked Shared-Region rule
with executable privileges. Executing code from a region without a
matching rule or with a matching S/U-mode-only rule is denied.
```

This change provides that.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-03 10:59:40 +01:00
Greg Chadwick
e93452e502 [dv] Make Xcelium wave dumping includes unpacked arrays
In various places within Ibex we use unpacked arrays. We weren't dumping
these in Xcelium.
2022-08-02 15:57:12 +01:00
Canberk Topal
ae399e6454 [dv,fcov] IRQ and NMI detection fixes for fcov
This commit makes sure that different IRQs are collected in a single
`fcov_irqs` bus correctly. Also changes nmi_taken coverpoint to catch
interrupt taken case for NMI types from the same bus.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-02 10:16:08 +01:00
Greg Chadwick
6dc0683773 [dv] Fix IbexDataRPayloadX assertion
Some aspects of the memory response are only relevant to reads. This
introduces outstanding request tracking so we know which outstanding
requests are reads and applies X checks appropriately.

Fixes #1645
2022-07-26 16:58:30 +01:00
Canberk Topal
7bae3b7ba3 [dv,fcov] Fix cp_mem_raw_hz implementation
This commit fixes how we catch an instruction at WB stage. Before this fix
we were effectively checking opcode of decoded instruction instead.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-07-26 09:54:59 +01:00
Greg Chadwick
6518cb6db6 [dv] Add option to ignore cosim log to testlist
The riscv_csr_test does not use cosim but was failing due to lack of a
cosim log. This option skips the stage of pass/fail determination that
looks for that log.
2022-07-26 09:22:00 +01:00
Greg Chadwick
5fe158e222 [dv] Fix csr_description file
This adds a couple of missing fields to cpuctrl and comments out mcause.
mcause will be added back once RISC-V DV has been updated to support
WARL fields properly.
2022-07-26 09:22:00 +01:00
Greg Chadwick
c2a7af870a [dv] Pass end_signature_addr to generate test step
The CSR test generation needs to know end_signature_addr. Previously
this wasn't being passed to the test generator so CSR tests just looped
forever.
2022-07-26 09:22:00 +01:00