aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-06-27 22:31:24 +0200
committerClifford Wolf <clifford@clifford.at>2015-06-27 22:31:24 +0200
commitd0100f72b54eabf7d0d4a8444ef3715bf61eb49d (patch)
tree79c99014ad4ce73ecc6f3575a45998d6489f87da /firmware
parent7b17773bfcf0209c3f7f14b811fd9b402da3d893 (diff)
downloadpicorv32-d0100f72b54eabf7d0d4a8444ef3715bf61eb49d.tar.gz
picorv32-d0100f72b54eabf7d0d4a8444ef3715bf61eb49d.zip
Added ENABLE defines for individual tests
Diffstat (limited to 'firmware')
-rw-r--r--firmware/start.S31
1 files changed, 25 insertions, 6 deletions
diff --git a/firmware/start.S b/firmware/start.S
index 20dd5b5..a61f7fc 100644
--- a/firmware/start.S
+++ b/firmware/start.S
@@ -1,3 +1,8 @@
+#define ENABLE_RVTST
+#define ENABLE_SIEVE
+#define ENABLE_MULTST
+#define ENABLE_STATS
+
.section .text
.global irq
.global sieve
@@ -8,11 +13,19 @@
.global hard_mulhu
.global stats
-#define TEST(n) \
- .global n; .global n ## _ret; \
+#ifdef ENABLE_RVTST
+# define TEST(n) \
+ .global n; \
addi x1, zero, 1000; \
custom0 0,1,0,5; /* timer zero, x1 */ \
- jal zero,n; n ## _ret:
+ jal zero,n; \
+ .global n ## _ret; \
+ n ## _ret:
+#else
+# define TEST(n) \
+ .global n ## _ret; \
+ n ## _ret:
+#endif
reset_vec:
custom0 0,0,0,4 // waitirq zero
@@ -227,14 +240,20 @@ start:
/* set stack pointer */
lui sp,(64*1024)>>12
- /* jump to sieve C code */
+#ifdef ENABLE_SIEVE
+ /* call sieve C code */
jal ra,sieve
+#endif
- /* jump to sieve C code */
+#ifdef ENABLE_MULTST
+ /* call sieve C code */
jal ra,multest
+#endif
- /* jump to stats C code */
+#ifdef ENABLE_STATS
+ /* call stats C code */
jal ra,stats
+#endif
/* print "DONE\n" */
lui a0,0x10000000>>12