From 3ef81f4e6a51bedd8ad26953fd2885b029d5d89b Mon Sep 17 00:00:00 2001
From: Kevin Wan <kewan@hmc.edu>
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 6a0f8027..8e327caf 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 00000000..bb696152
--- /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