From 7ed0c7b8b6ee1b205b84db7e6d03088545f9531b Mon Sep 17 00:00:00 2001 From: Kip Macsai-Goren Date: Wed, 20 Apr 2022 17:31:08 +0000 Subject: [PATCH] Updated 32 bit PMA tests to reflect new clint rules --- .../references/WALLY-PMA.reference_output | 10 +++------- .../rv32i_m/privilege/src/WALLY-PMA.S | 14 +++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-PMA.reference_output b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-PMA.reference_output index 38042cfc7..a9cdc3633 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-PMA.reference_output +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-PMA.reference_output @@ -1,10 +1,6 @@ -beef00b5 -00000007 # write access fault with 16 bit write to CLINT -00000005 # read access fault with 16 bit write to CLINT -00000bad -00000007 # write access fault with 8 bit write to CLINT -00000005 # read access fault with 8 bit write to CLINT -00000bad +beef00b5 +000000b6 +ffffffb7 00000001 00000bad 00000002 diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-PMA.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-PMA.S index 98d5e0134..1462ff800 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-PMA.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-PMA.S @@ -81,14 +81,14 @@ test_cases: # ----------------- CLINT --------------------- # Use timecmp register as readable and writable section of the CLINT -.4byte CLINT_BASE + 0x4000, 0xBEEF00B5, write32_test # 32-bit write: success -.4byte CLINT_BASE + 0x4000, 0xBEEF00B5, read32_test # 32-bit read: success -.4byte CLINT_BASE + 0x4000, 0xBEEF00B6, write16_test# 16-bit write: failure *** Due to non-native access length in CLINT -.4byte CLINT_BASE + 0x4000, 0xBEEF00B6, read16_test# 16-bit read: failure -.4byte CLINT_BASE + 0x4000, 0xBEEF00B7, write08_test# 08-bit write: failure -.4byte CLINT_BASE + 0x4000, 0xBEEF00B7, read08_test# 08-bit read: failure +.4byte CLINT_BASE + 0x4000, 0xBEEF00B5, write32_test # 32-bit write: success +.4byte CLINT_BASE + 0x4000, 0xBEEF00B5, read32_test # 32-bit read: success +.4byte CLINT_BASE + 0x4000, 0xBEEF00B6, write16_test # 16-bit write: success +.4byte CLINT_BASE + 0x4000, 0xBEEF00B6, read16_test # 16-bit read: success +.4byte CLINT_BASE + 0x4000, 0xBEEF00B7, write08_test # 08-bit write: success +.4byte CLINT_BASE + 0x4000, 0xBEEF00B7, read08_test # 08-bit read: success -.4byte CLINT_BASE, 0xbad, executable_test# execute: instruction access fault +.4byte CLINT_BASE, 0xbad, executable_test # execute: instruction access fault # ----------------- PLIC ---------------------