aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-09-08 17:27:48 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-09-08 17:27:48 +0200
commitcbc2686373a5fe81b6b28f845edc323d4cae56e5 (patch)
treef53d38cbb32f441450f8d33ff315566f1e98ce5f /tests
parent0a49a2c1496888f0014cf09feb425d9cc47a75ba (diff)
downloadAGH-engineering-thesis-cbc2686373a5fe81b6b28f845edc323d4cae56e5.tar.gz
AGH-engineering-thesis-cbc2686373a5fe81b6b28f845edc323d4cae56e5.zip
modernize the build (test) system
Diffstat (limited to 'tests')
-rw-r--r--tests/div/Makefile7
-rw-r--r--tests/embedded_bram_slave/Makefile9
-rw-r--r--tests/intercon/Makefile10
-rw-r--r--tests/interface_wrapper/Makefile7
-rw-r--r--tests/master_arbiter/Makefile10
-rw-r--r--tests/self/Makefile7
-rw-r--r--tests/self_32bit_word/Makefile7
-rw-r--r--tests/slave_dispatcher/Makefile7
-rw-r--r--tests/soc_simple_display/Makefile9
-rw-r--r--[-rwxr-xr-x]tests/soc_simple_display/instructions.s.tcl4
-rw-r--r--tests/sram_slave/Makefile7
l---------tests/stack_machine_add/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_add/instructions.s.tcl4
l---------tests/stack_machine_cond_jump/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_cond_jump/instructions.s.tcl6
l---------tests/stack_machine_div/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_div/instructions.s.tcl4
l---------tests/stack_machine_jump/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_jump/instructions.s.tcl4
l---------tests/stack_machine_load_store/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_load_store/instructions.s.tcl4
l---------tests/stack_machine_mul/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_mul/instructions.s.tcl4
l---------tests/stack_machine_multiinstructions_load_store/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_multiinstructions_load_store/instructions.s.tcl4
-rw-r--r--tests/stack_machine_store/Makefile10
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_store/instructions.s.tcl4
l---------tests/stack_machine_sub/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_sub/instructions.s.tcl4
l---------tests/stack_machine_swap/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_swap/instructions.s.tcl4
l---------tests/stack_machine_tee/Makefile1
-rw-r--r--[-rwxr-xr-x]tests/stack_machine_tee/instructions.s.tcl4
-rw-r--r--tests/vga/Makefile9
-rw-r--r--tests/wrapped_stack_machine_cond_jump/Makefile10
35 files changed, 120 insertions, 49 deletions
diff --git a/tests/div/Makefile b/tests/div/Makefile
new file mode 100644
index 0000000..c49f160
--- /dev/null
+++ b/tests/div/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = div.v messages.vh
+
+IVFLAGS =
+
+TOP = div_test
+
+include ../../Makefile.test
diff --git a/tests/embedded_bram_slave/Makefile b/tests/embedded_bram_slave/Makefile
new file mode 100644
index 0000000..6d5b79e
--- /dev/null
+++ b/tests/embedded_bram_slave/Makefile
@@ -0,0 +1,9 @@
+DEPENDS = operations.mem rom.mem master.v embedded_bram_slave.v messages.vh
+
+IVFLAGS = \
+ -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem) \
+ -DROM_WORDS_COUNT=$(call FILE_LINES,rom.mem)
+
+TOP = embedded_bram_test
+
+include ../../Makefile.test
diff --git a/tests/intercon/Makefile b/tests/intercon/Makefile
new file mode 100644
index 0000000..d70c403
--- /dev/null
+++ b/tests/intercon/Makefile
@@ -0,0 +1,10 @@
+DEPENDS = operations0.mem operations1.mem slave.v master.v intercon.v \
+ slave_dispatcher.v master_arbiter.v messages.vh
+
+IVFLAGS = \
+ -DMASTER0_OPERATIONS_COUNT=$(call FILE_LINES,operations0.mem) \
+ -DMASTER1_OPERATIONS_COUNT=$(call FILE_LINES,operations1.mem)
+
+TOP = intercon_test
+
+include ../../Makefile.test
diff --git a/tests/interface_wrapper/Makefile b/tests/interface_wrapper/Makefile
new file mode 100644
index 0000000..473c887
--- /dev/null
+++ b/tests/interface_wrapper/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = operations.mem slave.v master.v interface_wrapper.v messages.vh
+
+IVFLAGS = -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem)
+
+TOP = interface_wrapper_test
+
+include ../../Makefile.test
diff --git a/tests/master_arbiter/Makefile b/tests/master_arbiter/Makefile
new file mode 100644
index 0000000..2c611d7
--- /dev/null
+++ b/tests/master_arbiter/Makefile
@@ -0,0 +1,10 @@
+DEPENDS = operations0.mem operations1.mem slave.v master.v master_arbiter.v \
+ messages.vh
+
+IVFLAGS = \
+ -DMASTER0_OPERATIONS_COUNT=$(call FILE_LINES,operations0.mem) \
+ -DMASTER1_OPERATIONS_COUNT=$(call FILE_LINES,operations1.mem)
+
+TOP = master_arbiter_test
+
+include ../../Makefile.test
diff --git a/tests/self/Makefile b/tests/self/Makefile
new file mode 100644
index 0000000..d408792
--- /dev/null
+++ b/tests/self/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = operations.mem slave.v master.v messages.vh
+
+IVFLAGS = -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem)
+
+TOP = self_test
+
+include ../../Makefile.test
diff --git a/tests/self_32bit_word/Makefile b/tests/self_32bit_word/Makefile
new file mode 100644
index 0000000..71c5f3e
--- /dev/null
+++ b/tests/self_32bit_word/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = operations.mem slave.v master.v messages.vh
+
+IVFLAGS = -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem)
+
+TOP = self_32bit_test
+
+include ../../Makefile.test
diff --git a/tests/slave_dispatcher/Makefile b/tests/slave_dispatcher/Makefile
new file mode 100644
index 0000000..72e68ca
--- /dev/null
+++ b/tests/slave_dispatcher/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = operations.mem slave.v master.v slave_dispatcher.v messages.vh
+
+IVFLAGS = -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem)
+
+TOP = slave_dispatcher_test
+
+include ../../Makefile.test
diff --git a/tests/soc_simple_display/Makefile b/tests/soc_simple_display/Makefile
new file mode 100644
index 0000000..4506ff7
--- /dev/null
+++ b/tests/soc_simple_display/Makefile
@@ -0,0 +1,9 @@
+VGA_TEST = 1
+
+DEPENDS = instructions.mem sram.v vga_display.v ../../design/*.v messages.vh
+
+IVFLAGS = -DROM_WORDS_COUNT=$(call FILE_LINES,instructions.mem)
+
+TOP = soc_test
+
+include ../../Makefile.test
diff --git a/tests/soc_simple_display/instructions.s.tcl b/tests/soc_simple_display/instructions.s.tcl
index 616c1bc..97e577e 100755..100644
--- a/tests/soc_simple_display/instructions.s.tcl
+++ b/tests/soc_simple_display/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
## also look at stack_machine_cond_jump test
## we're going to write numbers from 0 to 639 at addresses h100000 to h1009FC
diff --git a/tests/sram_slave/Makefile b/tests/sram_slave/Makefile
new file mode 100644
index 0000000..7619ccd
--- /dev/null
+++ b/tests/sram_slave/Makefile
@@ -0,0 +1,7 @@
+DEPENDS = operations.mem sram.v master.v sram_slave.v messages.vh
+
+IVFLAGS = -DMASTER_OPERATIONS_COUNT=$(call FILE_LINES,operations.mem)
+
+TOP = sram_slave_test
+
+include ../../Makefile.test
diff --git a/tests/stack_machine_add/Makefile b/tests/stack_machine_add/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_add/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_add/instructions.s.tcl b/tests/stack_machine_add/instructions.s.tcl
index c0a9449..0fe544e 100755..100644
--- a/tests/stack_machine_add/instructions.s.tcl
+++ b/tests/stack_machine_add/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### store 2 values to memory, load them back, add them and store the result
set_sp 0
diff --git a/tests/stack_machine_cond_jump/Makefile b/tests/stack_machine_cond_jump/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_cond_jump/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_cond_jump/instructions.s.tcl b/tests/stack_machine_cond_jump/instructions.s.tcl
index d1d5809..fba496d 100755..100644
--- a/tests/stack_machine_cond_jump/instructions.s.tcl
+++ b/tests/stack_machine_cond_jump/instructions.s.tcl
@@ -1,8 +1,4 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
-## also look at stack_machine_jump test
+## also look at stack_machine_jump test
## we're going to write numbers from 0 to 7 to addresses h400 - h41C
diff --git a/tests/stack_machine_div/Makefile b/tests/stack_machine_div/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_div/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_div/instructions.s.tcl b/tests/stack_machine_div/instructions.s.tcl
index 7f09f20..be233a2 100755..100644
--- a/tests/stack_machine_div/instructions.s.tcl
+++ b/tests/stack_machine_div/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### store 2 values to memory, load them back, divide one by another and store
### the result (quotient); this is analogous to addition and substraction tests
diff --git a/tests/stack_machine_jump/Makefile b/tests/stack_machine_jump/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_jump/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_jump/instructions.s.tcl b/tests/stack_machine_jump/instructions.s.tcl
index fe3b297..381f083 100755..100644
--- a/tests/stack_machine_jump/instructions.s.tcl
+++ b/tests/stack_machine_jump/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
## Let there be 2 pieces of code - each one storing a different value in memory
## and halting afterwards. Jump instruction should cause the second piece of
## code to execute instead of the first. We'll verify that by checking, which
diff --git a/tests/stack_machine_load_store/Makefile b/tests/stack_machine_load_store/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_load_store/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_load_store/instructions.s.tcl b/tests/stack_machine_load_store/instructions.s.tcl
index 4d6da2a..a28816f 100755..100644
--- a/tests/stack_machine_load_store/instructions.s.tcl
+++ b/tests/stack_machine_load_store/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### set stack to 0, store 4 numbers (h2B, h3B, h4B and h5B) at addresses
### h000002, h000012, h000022 and h000032 and load them back to stack (only 2
### will really get written to stack's memory, other 2 will remain in r0 and
diff --git a/tests/stack_machine_mul/Makefile b/tests/stack_machine_mul/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_mul/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_mul/instructions.s.tcl b/tests/stack_machine_mul/instructions.s.tcl
index fae5ec6..df8228e 100755..100644
--- a/tests/stack_machine_mul/instructions.s.tcl
+++ b/tests/stack_machine_mul/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### store 4 values to memory; load 2 of them back, multiply them and store the
### result; load another 2, multiply them and store the result;
### this is similar to addition and substraction tests
diff --git a/tests/stack_machine_multiinstructions_load_store/Makefile b/tests/stack_machine_multiinstructions_load_store/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_multiinstructions_load_store/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl b/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl
index bd16f8a..6710c0c 100755..100644
--- a/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl
+++ b/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### set stack to h1FFE00, store 4 numbers (h11223344, h55667788, h8899AABB and
### hCCDDEEFF) at addresses h00002E, h00003E, h00004E and h00005E and load them
### back to stack (only 2 will really get written to stack's memory, other 2
diff --git a/tests/stack_machine_store/Makefile b/tests/stack_machine_store/Makefile
new file mode 100644
index 0000000..e662a5f
--- /dev/null
+++ b/tests/stack_machine_store/Makefile
@@ -0,0 +1,10 @@
+DEPENDS = instructions.mem words_to_verify.mem slave.v stack_machine.v div.v \
+ messages.vh
+
+IVFLAGS = \
+ -DINSTRUCTIONS_COUNT=$(call FILE_LINES,instructions.mem) \
+ -DWORDS_TO_VERIFY_COUNT=$(call FILE_LINES,words_to_verify.mem)
+
+TOP = stack_machine_test
+
+include ../../Makefile.test
diff --git a/tests/stack_machine_store/instructions.s.tcl b/tests/stack_machine_store/instructions.s.tcl
index f35461d..662912c 100755..100644
--- a/tests/stack_machine_store/instructions.s.tcl
+++ b/tests/stack_machine_store/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### simple test - write value hDEADBEEF to address h3ABCD;
### then, write value h900DDEED to address FFBCE, but use operand addressing
### (i.e. with hFFBBD in im and h00011 in r0)
diff --git a/tests/stack_machine_sub/Makefile b/tests/stack_machine_sub/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_sub/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_sub/instructions.s.tcl b/tests/stack_machine_sub/instructions.s.tcl
index e8485ee..28076fd 100755..100644
--- a/tests/stack_machine_sub/instructions.s.tcl
+++ b/tests/stack_machine_sub/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### store 2 values to memory, load them back,
### substract them and store the result
diff --git a/tests/stack_machine_swap/Makefile b/tests/stack_machine_swap/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_swap/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_swap/instructions.s.tcl b/tests/stack_machine_swap/instructions.s.tcl
index a44ecf9..69e7744 100755..100644
--- a/tests/stack_machine_swap/instructions.s.tcl
+++ b/tests/stack_machine_swap/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
set_sp 0
const h0000DEAD
diff --git a/tests/stack_machine_tee/Makefile b/tests/stack_machine_tee/Makefile
new file mode 120000
index 0000000..2c3c770
--- /dev/null
+++ b/tests/stack_machine_tee/Makefile
@@ -0,0 +1 @@
+../stack_machine_store/Makefile \ No newline at end of file
diff --git a/tests/stack_machine_tee/instructions.s.tcl b/tests/stack_machine_tee/instructions.s.tcl
index 98117c7..f51940a 100755..100644
--- a/tests/stack_machine_tee/instructions.s.tcl
+++ b/tests/stack_machine_tee/instructions.s.tcl
@@ -1,7 +1,3 @@
-#!/usr/bin/env tclsh
-
-source tclasm.tcl
-
### All three stores should write the hABCDEF
set_sp 0
diff --git a/tests/vga/Makefile b/tests/vga/Makefile
new file mode 100644
index 0000000..bc2da7f
--- /dev/null
+++ b/tests/vga/Makefile
@@ -0,0 +1,9 @@
+VGA_TEST = 1
+
+DEPENDS = vga.v vga_display.v messages.vh
+
+IVFLAGS =
+
+TOP = vga_test
+
+include ../../Makefile.test
diff --git a/tests/wrapped_stack_machine_cond_jump/Makefile b/tests/wrapped_stack_machine_cond_jump/Makefile
new file mode 100644
index 0000000..e39252e
--- /dev/null
+++ b/tests/wrapped_stack_machine_cond_jump/Makefile
@@ -0,0 +1,10 @@
+DEPENDS = instructions.mem words_to_verify.mem slave.v wrapped_stack_machine.v \
+ interface_wrapper.v stack_machine.v div.v messages.vh
+
+IVFLAGS = \
+ -DINSTRUCTIONS_COUNT=$(call FILE_LINES,instructions.mem) \
+ -DWORDS_TO_VERIFY_COUNT=$(call FILE_LINES,words_to_verify.mem)
+
+TOP = wrapped_stack_machine_test
+
+include ../../Makefile.test