From 1bdae2285d3276dd7e22b1c8e582c77d1326bb2f Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Tue, 18 Apr 2023 18:43:50 -0700 Subject: [PATCH] PMPCFG_ARRAY_REGW cases --- testbench/tests.vh | 2 ++ tests/coverage/pmpcfg.S | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/coverage/pmpcfg.S diff --git a/testbench/tests.vh b/testbench/tests.vh index 6a0f80276..8e327cafb 100644 --- a/testbench/tests.vh +++ b/testbench/tests.vh @@ -53,7 +53,9 @@ string tvpaths[] = '{ "lsu", "vm64check", "pmp", + "pmpcfg", "tlbKP" + }; string coremark[] = '{ diff --git a/tests/coverage/pmpcfg.S b/tests/coverage/pmpcfg.S new file mode 100644 index 000000000..bb6961526 --- /dev/null +++ b/tests/coverage/pmpcfg.S @@ -0,0 +1,33 @@ +// pmpcfg supplemental + +#include "WALLY-init-lib.h" +main: + li t0, 0x8800000000000000 + csrw pmpcfg2, t0 + li t0, 0x88000000000000 + csrw pmpcfg2, t0 + li t0, 0x880000000000 + csrw pmpcfg2, t0 + li t0, 0x8800000000 + csrw pmpcfg2, t0 + li t0, 0x88000000 + csrw pmpcfg2, t0 + li t0, 0x880000 + csrw pmpcfg2, t0 + li t0, 0x8800 + csrw pmpcfg2, t0 + li t0, 0x8800000000000000 + csrw pmpcfg0, t0 + li t0, 0x88000000000000 + csrw pmpcfg0, t0 + li t0, 0x880000000000 + csrw pmpcfg0, t0 + li t0, 0x8800000000 + csrw pmpcfg0, t0 + li t0, 0x88000000 + csrw pmpcfg0, t0 + li t0, 0x880000 + csrw pmpcfg0, t0 + li t0, 0x8800 + csrw pmpcfg0, t0 + j done