aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-11-10 11:01:57 -0800
committerGitHub <noreply@github.com>2022-11-10 11:01:57 -0800
commite9ab2e9502894692302d289a950a08cf2c25db68 (patch)
treef56fb7d6cc061d4ea27d63d2d721b32c2a36c755
parent0d690752517d82e6ce823ea20d2f4d95f535728f (diff)
downloadriscv-tests-e9ab2e9502894692302d289a950a08cf2c25db68.zip
riscv-tests-e9ab2e9502894692302d289a950a08cf2c25db68.tar.gz
riscv-tests-e9ab2e9502894692302d289a950a08cf2c25db68.tar.bz2
SvNNTest needs 32KB of RAM. (#428)
Also change the test itself to require less RAM than it did previously. (It had required more than 32KB.)
-rwxr-xr-xdebug/gdbserver.py9
-rw-r--r--debug/programs/translate.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index d567a85..cc054a4 100755
--- a/debug/gdbserver.py
+++ b/debug/gdbserver.py
@@ -1639,6 +1639,9 @@ class CheckMisa(GdbTest):
class TranslateTest(GdbSingleHartTest):
compile_args = ("programs/translate.c", )
+ def early_applicable(self):
+ return self.hart.ram_size >= 32 * 1024
+
def setup(self):
self.disable_pmp()
@@ -1682,7 +1685,7 @@ SATP_MODE_SV64 = 11
class Sv32Test(TranslateTest):
def early_applicable(self):
- return self.hart.xlen == 32
+ return TranslateTest.early_applicable(self) and self.hart.xlen == 32
def test(self):
self.check_satp(SATP_MODE_SV32)
@@ -1691,7 +1694,7 @@ class Sv32Test(TranslateTest):
class Sv39Test(TranslateTest):
def early_applicable(self):
- return self.hart.xlen > 32
+ return TranslateTest.early_applicable(self) and self.hart.xlen > 32
def test(self):
self.check_satp(SATP_MODE_SV39)
@@ -1700,7 +1703,7 @@ class Sv39Test(TranslateTest):
class Sv48Test(TranslateTest):
def early_applicable(self):
- return self.hart.xlen > 32
+ return TranslateTest.early_applicable(self) and self.hart.xlen > 32
def test(self):
self.check_satp(SATP_MODE_SV48)
diff --git a/debug/programs/translate.c b/debug/programs/translate.c
index 19f72ff..59dffd6 100644
--- a/debug/programs/translate.c
+++ b/debug/programs/translate.c
@@ -13,7 +13,7 @@ typedef uint64_t reg_t;
typedef uint32_t reg_t;
#endif
-static char page_buffer[4096 * 8];
+static char page_buffer[4096 * 6];
static char *page_buffer_next = page_buffer;
typedef struct {