Add an option to build vec tests for TBM.
Testing many AVL values results in traces that are too long for TBM.
Hence, use only one value.
Change-Id: Id16899129e982b991d9585f27ab342659ce76b4b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9acd853..8b53b42 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,7 @@
cmake_minimum_required (VERSION 3.10)
option(BUILD_SIMPLIFIED_CORE "Build the project with a simplified set of ISA support.")
+option(BUILD_FOR_TBM "When building the vector tests, use only a single AVL, to make the traces shorter.")
set(CMAKE_C_ABI_COMPILED ON)
set(CMAKE_CXX_ABI_COMPILED ON)
@@ -18,6 +19,10 @@
add_definitions(-DLIBSPRINGBOK_NO_EXCEPTION_SUPPORT)
endif()
+if(${BUILD_FOR_TBM})
+ add_compile_definitions(FOR_TBM)
+endif()
+
enable_language(ASM)
include($ENV{ROOTDIR}/sw/pigweed/pw_build/pigweed.cmake)
diff --git a/test_v_helpers/include/test_v_helpers.h b/test_v_helpers/include/test_v_helpers.h
index ba28e43..c725bf3 100644
--- a/test_v_helpers/include/test_v_helpers.h
+++ b/test_v_helpers/include/test_v_helpers.h
@@ -14,10 +14,15 @@
const int VLEN = 512;
const int MAXVL_BYTES = VLEN * LMUL_MAX;
+#ifdef FOR_TBM
+const int32_t AVLS[] = {17};
+#else
const int32_t AVLS[] = {1, 4, 3, 2, 16, 8, 5, 17,
32, 36, 64, 55, 100, 321, 256, 128,
512, 623, 1024, 1100, 1543, 2048, 3052, 4096,
5555, 8192, 10241, 16384, 24325, 32768};
+#endif
+
const int32_t AVL_COUNT = sizeof(AVLS) / sizeof(AVLS[0]);
enum VSEW {