RVSCC/test/CMakeLists.txt

119 lines
3.9 KiB
CMake
Raw Normal View History

include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
2023-02-01 16:23:11 +00:00
find_package(verilator HINTS $ENV{VERILATOR_ROOT})
if (NOT verilator_FOUND)
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(SystemCLanguage QUIET)
2023-02-23 22:31:08 +00:00
rvscc_add_test(
NAME alu
2023-02-26 23:26:11 +00:00
TOP test_alu
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/alu.sv
${PROJECT_SOURCE_DIR}/test/test_alu.sv
2023-02-01 16:23:11 +00:00
)
2023-02-26 23:26:11 +00:00
rvscc_add_test(
NAME priority-encoder
TOP test_priority_encoder
SOURCES ${PROJECT_SOURCE_DIR}/rtl/priority_encoder.sv
${PROJECT_SOURCE_DIR}/test/test_priority_encoder.sv
2023-02-01 16:23:11 +00:00
)
2023-02-11 22:29:27 +00:00
2023-02-26 23:26:11 +00:00
rvscc_add_test(
NAME data-memory
TOP test_data_memory
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory.sv
${PROJECT_SOURCE_DIR}/test/test_data_memory.sv
2023-02-11 22:29:27 +00:00
)
2023-02-18 20:48:02 +00:00
2023-02-26 23:26:11 +00:00
rvscc_add_test(
NAME imm-extend
TOP test_imm_extend
SOURCES ${PROJECT_SOURCE_DIR}/rtl/imm_extend.sv
${PROJECT_SOURCE_DIR}/test/test_imm_extend.sv
2023-02-23 22:31:08 +00:00
)
rvscc_add_test(
NAME register-file
2023-02-26 23:26:11 +00:00
TOP test_register_file
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/register_file.sv
${PROJECT_SOURCE_DIR}/test/test_register_file.sv
2023-02-26 23:26:11 +00:00
)
rvscc_add_test(
2023-03-20 04:13:34 +00:00
NAME instruction_memory TOP test_instr_memory
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory.sv
${PROJECT_SOURCE_DIR}/test/test_instr_memory.sv
2023-02-26 23:26:11 +00:00
)
rvscc_add_test(
NAME single-cycle-core
TOP test_single_cycle_core
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/single_cycle_datapath.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory.sv
${PROJECT_SOURCE_DIR}/rtl/jump_control.sv
${PROJECT_SOURCE_DIR}/rtl/control_unit.sv
${PROJECT_SOURCE_DIR}/rtl/alu_decoder.sv
${PROJECT_SOURCE_DIR}/rtl/main_decoder.sv
${PROJECT_SOURCE_DIR}/rtl/register_file.sv
${PROJECT_SOURCE_DIR}/rtl/imm_extend.sv
${PROJECT_SOURCE_DIR}/rtl/alu.sv
${PROJECT_SOURCE_DIR}/test/test_single_cycle_core.sv
)
rvscc_add_test(
NAME five-stage-pipeline-core
TOP test_five_stage_pipeline_core
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/five_stage_pipeline_datapath.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/data_memory.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory_if.sv
${PROJECT_SOURCE_DIR}/rtl/instr_memory.sv
${PROJECT_SOURCE_DIR}/rtl/jump_control.sv
${PROJECT_SOURCE_DIR}/rtl/control_unit.sv
${PROJECT_SOURCE_DIR}/rtl/alu_decoder.sv
${PROJECT_SOURCE_DIR}/rtl/main_decoder.sv
${PROJECT_SOURCE_DIR}/rtl/register_file.sv
${PROJECT_SOURCE_DIR}/rtl/imm_extend.sv
${PROJECT_SOURCE_DIR}/rtl/alu.sv
${PROJECT_SOURCE_DIR}/rtl/hazard_unit.sv
${PROJECT_SOURCE_DIR}/test/test_five_stage_pipeline_core.sv
2023-02-18 20:48:02 +00:00
)
2023-02-28 17:22:02 +00:00
rvscc_add_test(
NAME cache-memory
TOP test_cache_memory
SOURCES ${PROJECT_SOURCE_DIR}/rtl/cache_memory.sv
2023-03-02 20:20:10 +00:00
${PROJECT_SOURCE_DIR}/rtl/priority_encoder.sv
2023-02-28 17:22:02 +00:00
${PROJECT_SOURCE_DIR}/test/test_cache_memory.sv
)
2023-03-20 02:03:52 +00:00
rvscc_add_test(
NAME two-way-lru-cache
TOP test_two_way_lru_cache
SOURCES ${PROJECT_SOURCE_DIR}/rtl/rv32i_defs.sv
${PROJECT_SOURCE_DIR}/rtl/two_way_lru_cache.sv
${PROJECT_SOURCE_DIR}/rtl/two_way_lru_cru.sv
2023-03-20 04:13:34 +00:00
${PROJECT_SOURCE_DIR}/rtl/data_memory_if.sv
2023-03-20 02:03:52 +00:00
${PROJECT_SOURCE_DIR}/rtl/cache_memory.sv
2023-03-20 04:13:34 +00:00
${PROJECT_SOURCE_DIR}/rtl/cache_controller.sv
2023-03-20 02:03:52 +00:00
${PROJECT_SOURCE_DIR}/rtl/priority_encoder.sv
${PROJECT_SOURCE_DIR}/test/test_two_way_lru_cache.sv
)