From cbc2686373a5fe81b6b28f845edc323d4cae56e5 Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Tue, 8 Sep 2020 17:27:48 +0200 Subject: modernize the build (test) system --- tests/div/Makefile | 7 +++++++ tests/embedded_bram_slave/Makefile | 9 +++++++++ tests/intercon/Makefile | 10 ++++++++++ tests/interface_wrapper/Makefile | 7 +++++++ tests/master_arbiter/Makefile | 10 ++++++++++ tests/self/Makefile | 7 +++++++ tests/self_32bit_word/Makefile | 7 +++++++ tests/slave_dispatcher/Makefile | 7 +++++++ tests/soc_simple_display/Makefile | 9 +++++++++ tests/soc_simple_display/instructions.s.tcl | 4 ---- tests/sram_slave/Makefile | 7 +++++++ tests/stack_machine_add/Makefile | 1 + tests/stack_machine_add/instructions.s.tcl | 4 ---- tests/stack_machine_cond_jump/Makefile | 1 + tests/stack_machine_cond_jump/instructions.s.tcl | 6 +----- tests/stack_machine_div/Makefile | 1 + tests/stack_machine_div/instructions.s.tcl | 4 ---- tests/stack_machine_jump/Makefile | 1 + tests/stack_machine_jump/instructions.s.tcl | 4 ---- tests/stack_machine_load_store/Makefile | 1 + tests/stack_machine_load_store/instructions.s.tcl | 4 ---- tests/stack_machine_mul/Makefile | 1 + tests/stack_machine_mul/instructions.s.tcl | 4 ---- tests/stack_machine_multiinstructions_load_store/Makefile | 1 + .../instructions.s.tcl | 4 ---- tests/stack_machine_store/Makefile | 10 ++++++++++ tests/stack_machine_store/instructions.s.tcl | 4 ---- tests/stack_machine_sub/Makefile | 1 + tests/stack_machine_sub/instructions.s.tcl | 4 ---- tests/stack_machine_swap/Makefile | 1 + tests/stack_machine_swap/instructions.s.tcl | 4 ---- tests/stack_machine_tee/Makefile | 1 + tests/stack_machine_tee/instructions.s.tcl | 4 ---- tests/vga/Makefile | 9 +++++++++ tests/wrapped_stack_machine_cond_jump/Makefile | 10 ++++++++++ 35 files changed, 120 insertions(+), 49 deletions(-) create mode 100644 tests/div/Makefile create mode 100644 tests/embedded_bram_slave/Makefile create mode 100644 tests/intercon/Makefile create mode 100644 tests/interface_wrapper/Makefile create mode 100644 tests/master_arbiter/Makefile create mode 100644 tests/self/Makefile create mode 100644 tests/self_32bit_word/Makefile create mode 100644 tests/slave_dispatcher/Makefile create mode 100644 tests/soc_simple_display/Makefile mode change 100755 => 100644 tests/soc_simple_display/instructions.s.tcl create mode 100644 tests/sram_slave/Makefile create mode 120000 tests/stack_machine_add/Makefile mode change 100755 => 100644 tests/stack_machine_add/instructions.s.tcl create mode 120000 tests/stack_machine_cond_jump/Makefile mode change 100755 => 100644 tests/stack_machine_cond_jump/instructions.s.tcl create mode 120000 tests/stack_machine_div/Makefile mode change 100755 => 100644 tests/stack_machine_div/instructions.s.tcl create mode 120000 tests/stack_machine_jump/Makefile mode change 100755 => 100644 tests/stack_machine_jump/instructions.s.tcl create mode 120000 tests/stack_machine_load_store/Makefile mode change 100755 => 100644 tests/stack_machine_load_store/instructions.s.tcl create mode 120000 tests/stack_machine_mul/Makefile mode change 100755 => 100644 tests/stack_machine_mul/instructions.s.tcl create mode 120000 tests/stack_machine_multiinstructions_load_store/Makefile mode change 100755 => 100644 tests/stack_machine_multiinstructions_load_store/instructions.s.tcl create mode 100644 tests/stack_machine_store/Makefile mode change 100755 => 100644 tests/stack_machine_store/instructions.s.tcl create mode 120000 tests/stack_machine_sub/Makefile mode change 100755 => 100644 tests/stack_machine_sub/instructions.s.tcl create mode 120000 tests/stack_machine_swap/Makefile mode change 100755 => 100644 tests/stack_machine_swap/instructions.s.tcl create mode 120000 tests/stack_machine_tee/Makefile mode change 100755 => 100644 tests/stack_machine_tee/instructions.s.tcl create mode 100644 tests/vga/Makefile create mode 100644 tests/wrapped_stack_machine_cond_jump/Makefile (limited to 'tests') 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 old mode 100755 new mode 100644 index 616c1bc..97e577e --- 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 old mode 100755 new mode 100644 index c0a9449..0fe544e --- 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 old mode 100755 new mode 100644 index d1d5809..fba496d --- 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 old mode 100755 new mode 100644 index 7f09f20..be233a2 --- 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 old mode 100755 new mode 100644 index fe3b297..381f083 --- 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 old mode 100755 new mode 100644 index 4d6da2a..a28816f --- 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 old mode 100755 new mode 100644 index fae5ec6..df8228e --- 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 old mode 100755 new mode 100644 index bd16f8a..6710c0c --- 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 old mode 100755 new mode 100644 index f35461d..662912c --- 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 old mode 100755 new mode 100644 index e8485ee..28076fd --- 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 old mode 100755 new mode 100644 index a44ecf9..69e7744 --- 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 old mode 100755 new mode 100644 index 98117c7..f51940a --- 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 -- cgit v1.2.3