From 08a72f9419a2eb74681296e4ce3c79b091afc993 Mon Sep 17 00:00:00 2001 From: Zeran Zhu Date: Thu, 16 Apr 2020 22:42:11 -0500 Subject: [PATCH 1/3] Enable all possible leon3 bare-metal tests --- utils/grlib/software/leon3/leon3_test.c | 26 +++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/utils/grlib/software/leon3/leon3_test.c b/utils/grlib/software/leon3/leon3_test.c index 73a7a39089..8afdac59f4 100644 --- a/utils/grlib/software/leon3/leon3_test.c +++ b/utils/grlib/software/leon3/leon3_test.c @@ -34,17 +34,23 @@ leon3_test(int domp, int *irqmp, int mtest) /* report_test(TEST_REG); */ /* if (regtest()) report_fail(FAIL_REG); */ - /* report_test(TEST_MUL); */ - /* multest(); */ + report_test(TEST_MUL); + multest(); - /* report_test(TEST_DIV); */ - /* divtest(); */ + report_test(TEST_DIV); + divtest(); /* //report_test(TEST_FPU); */ /* //fputest(); */ - /* report_test(TEST_FILL_W); */ - /* cache_fill(4, ncpu, WORD); */ + if (!pid) data_structures_setup(); + + report_test(TEST_FILL_B); + cache_fill(4, ncpu, BYTE); + report_test(TEST_FILL_HW); + cache_fill(4, ncpu, HALFWORD); + report_test(TEST_FILL_W); + cache_fill(4, ncpu, WORD); report_test(TEST_SHARING); false_sharing(20, ncpu); @@ -55,11 +61,11 @@ leon3_test(int domp, int *irqmp, int mtest) report_test(TEST_LOCK); test_lock(100, ncpu); - /* report_test(TEST_MESI); */ - /* mesi_test(ncpu, 1); */ + report_test(TEST_MESI); + mesi_test(ncpu, 1); - /* report_test(TEST_RAND_RW); */ - /* rand_rw(200, ncpu); */ + report_test(TEST_RAND_RW); + rand_rw(200, ncpu); /* End of TESTS */ From f19d11d226b412c4c337cdd86e6a485ab77f698d Mon Sep 17 00:00:00 2001 From: Zeran Zhu Date: Mon, 20 Apr 2020 10:57:58 -0500 Subject: [PATCH 2/3] add checkpoint messages printed by core 0 --- utils/grlib/software/leon3/leon3_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/grlib/software/leon3/leon3_test.c b/utils/grlib/software/leon3/leon3_test.c index 8afdac59f4..bc55d952f8 100644 --- a/utils/grlib/software/leon3/leon3_test.c +++ b/utils/grlib/software/leon3/leon3_test.c @@ -36,9 +36,11 @@ leon3_test(int domp, int *irqmp, int mtest) report_test(TEST_MUL); multest(); + if (!pid) printf("Finished multest.\n"); report_test(TEST_DIV); divtest(); + if (!pid) printf("Finished divtest.\n"); /* //report_test(TEST_FPU); */ /* //fputest(); */ @@ -47,10 +49,13 @@ leon3_test(int domp, int *irqmp, int mtest) report_test(TEST_FILL_B); cache_fill(4, ncpu, BYTE); + if (!pid) printf("Finished cache_fill with BYTE granularity.\n"); report_test(TEST_FILL_HW); cache_fill(4, ncpu, HALFWORD); + if (!pid) printf("Finished cache_fill with HALFWORD granularity.\n"); report_test(TEST_FILL_W); cache_fill(4, ncpu, WORD); + if (!pid) printf("Finished cache_fill with WORD granularity.\n"); report_test(TEST_SHARING); false_sharing(20, ncpu); @@ -60,12 +65,15 @@ leon3_test(int domp, int *irqmp, int mtest) report_test(TEST_LOCK); test_lock(100, ncpu); + if (!pid) printf("Finished test_lock.\n"); report_test(TEST_MESI); mesi_test(ncpu, 1); + if (!pid) printf("Finished mesi_test.\n"); report_test(TEST_RAND_RW); rand_rw(200, ncpu); + if (!pid) printf("Finished rand_rw.\n"); /* End of TESTS */ From f04842c0aff7307578b908ce5b5aaef9121b0a44 Mon Sep 17 00:00:00 2001 From: Zeran Zhu Date: Thu, 23 Apr 2020 15:34:53 -0500 Subject: [PATCH 3/3] remove cache_fill test hardcoding --- utils/grlib/software/leon3/leon3_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/grlib/software/leon3/leon3_test.c b/utils/grlib/software/leon3/leon3_test.c index bc55d952f8..32daf30ef3 100644 --- a/utils/grlib/software/leon3/leon3_test.c +++ b/utils/grlib/software/leon3/leon3_test.c @@ -48,13 +48,13 @@ leon3_test(int domp, int *irqmp, int mtest) if (!pid) data_structures_setup(); report_test(TEST_FILL_B); - cache_fill(4, ncpu, BYTE); + cache_fill(L2_WAYS, ncpu, BYTE); if (!pid) printf("Finished cache_fill with BYTE granularity.\n"); report_test(TEST_FILL_HW); - cache_fill(4, ncpu, HALFWORD); + cache_fill(L2_WAYS, ncpu, HALFWORD); if (!pid) printf("Finished cache_fill with HALFWORD granularity.\n"); report_test(TEST_FILL_W); - cache_fill(4, ncpu, WORD); + cache_fill(L2_WAYS, ncpu, WORD); if (!pid) printf("Finished cache_fill with WORD granularity.\n"); report_test(TEST_SHARING);