Skip to content

Commit

Permalink
Remove custom arch files for custom tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h0lyalg0rithm committed Nov 8, 2023
1 parent 5494b72 commit 73cf645
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 157 deletions.
146 changes: 78 additions & 68 deletions test/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,87 @@ file(CREATE_LINK ${SIM_BASE}/arches ${CMAKE_CURRENT_BINARY_DIR}/arches SYMBOLIC
file(CREATE_LINK ${SIM_BASE}/mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_isa_files SYMBOLIC)
file(CREATE_LINK ${SIM_BASE}/traces ${CMAKE_CURRENT_BINARY_DIR}/traces SYMBOLIC)
file(CREATE_LINK ${SIM_BASE}/test/sim/json_tests ${CMAKE_CURRENT_BINARY_DIR}/json_tests SYMBOLIC)
file(CREATE_LINK ${SIM_BASE}/test/sim/lsu_arch_configs ${CMAKE_CURRENT_BINARY_DIR}/lsu_arch_configs SYMBOLIC)

# Tests
sparta_named_test(olympia_json_test olympia --workload traces/example_json.json)

# Test report generation

# This command will use a report definition file to generate a text form of a report
sparta_named_test(olympia_json_test_report_text olympia
--report-yaml-replacements OUT_BASE json_test_report OUT_FORMAT text INST_START 0
--report-search-dir reports
--report reports/core_report.def
--workload traces/example_json.json)

# This command will use core_stats.yaml directly to generate a text form of a report at the "top" node
sparta_named_test(olympia_json_test_report_text_direct olympia
--report "top" reports/core_stats.yaml core_stats.text text
--workload traces/example_json.json)

# This command will use core_stats.yaml directly to generate an html form of a report at the "top" node
sparta_named_test(olympia_json_test_report_html olympia
--report "top" reports/core_stats.yaml core_stats.html html
--workload traces/example_json.json)

# This command will run the dhrystone trace (1 million instructions)
sparta_named_test(olympia_dhry_test_report_html olympia -i 1M
--report-yaml-replacements OUT_BASE dhry_test_report OUT_FORMAT text INST_START 0
--report-search-dir reports
--report reports/core_report.def
--workload traces/dhry_riscv.zstf)

# This command will run the coremark trace (1 million instructions)
sparta_named_test(olympia_coremark_test_report_html olympia -i 1M
--report-yaml-replacements OUT_BASE coremark_test_report OUT_FORMAT text INST_START 0
--report-search-dir reports
--report reports/core_report.def
--workload traces/core_riscv.zstf)

sparta_named_test(olympia_json_test_missing_opcodes olympia
--workload json_tests/missing_opcodes.json)

sparta_named_test(olympia_json_test_fp_transfers olympia
--workload json_tests/fp_transfers.json)

# Test the arches
## Tests
#sparta_named_test(olympia_json_test olympia --workload traces/example_json.json)
#
## Test report generation
#
## This command will use a report definition file to generate a text form of a report
#sparta_named_test(olympia_json_test_report_text olympia
# --report-yaml-replacements OUT_BASE json_test_report OUT_FORMAT text INST_START 0
# --report-search-dir reports
# --report reports/core_report.def
# --workload traces/example_json.json)
#
## This command will use core_stats.yaml directly to generate a text form of a report at the "top" node
#sparta_named_test(olympia_json_test_report_text_direct olympia
# --report "top" reports/core_stats.yaml core_stats.text text
# --workload traces/example_json.json)
#
## This command will use core_stats.yaml directly to generate an html form of a report at the "top" node
#sparta_named_test(olympia_json_test_report_html olympia
# --report "top" reports/core_stats.yaml core_stats.html html
# --workload traces/example_json.json)
#
## This command will run the dhrystone trace (1 million instructions)
#sparta_named_test(olympia_dhry_test_report_html olympia -i 1M
# --report-yaml-replacements OUT_BASE dhry_test_report OUT_FORMAT text INST_START 0
# --report-search-dir reports
# --report reports/core_report.def
# --workload traces/dhry_riscv.zstf)
#
## This command will run the coremark trace (1 million instructions)
#sparta_named_test(olympia_coremark_test_report_html olympia -i 1M
# --report-yaml-replacements OUT_BASE coremark_test_report OUT_FORMAT text INST_START 0
# --report-search-dir reports
# --report reports/core_report.def
# --workload traces/core_riscv.zstf)
#
#sparta_named_test(olympia_json_test_missing_opcodes olympia
# --workload json_tests/missing_opcodes.json)
#
#sparta_named_test(olympia_json_test_fp_transfers olympia
# --workload json_tests/fp_transfers.json)
#
## Test the arches
file(GLOB TEST_YAML "${SIM_BASE}/arches/*.yaml")
#foreach(ARCH_FULL_PATH ${TEST_YAML})
# get_filename_component(ARCH_FILE_NAME ${ARCH_FULL_PATH} NAME)
# string(REGEX REPLACE ".yaml" "" ARCH_NAME ${ARCH_FILE_NAME})
# sparta_named_test(olympia_arch_${ARCH_NAME}_test olympia
# -i500K --workload traces/dhry_riscv.zstf
# --arch ${ARCH_NAME})
#endforeach()


set(test_params_list)
list(APPEND test_params_list "top.cpu.core0.lsu.params.mmu_lookup_stage_length 3")
list(APPEND test_params_list "top.cpu.core0.lsu.params.cache_lookup_stage_length 3")
list(APPEND test_params_list "top.cpu.core0.lsu.params.cache_read_stage_length 3")
list(APPEND test_params_list "top.cpu.core0.lsu.params.allow_speculative_load_exec false")
list(APPEND test_params_list "top.cpu.core0.lsu.params.allow_speculative_load_exec true")
list(APPEND test_params_list "top.cpu.core0.lsu.params.replay_issue_delay 5")

# Used to set a custom name for each test
set(index 1)
foreach(ARCH_FULL_PATH ${TEST_YAML})
get_filename_component(ARCH_FILE_NAME ${ARCH_FULL_PATH} NAME)
string(REGEX REPLACE ".yaml" "" ARCH_NAME ${ARCH_FILE_NAME})
sparta_named_test(olympia_arch_${ARCH_NAME}_test olympia
-i500K --workload traces/dhry_riscv.zstf
--arch ${ARCH_NAME})
endforeach()



file(GLOB TEST_YAML "${SIM_BASE}/test/sim/lsu_arch_configs/*.yaml")
foreach(ARCH_FULL_PATH ${TEST_YAML})
get_filename_component(ARCH_FILE_NAME ${ARCH_FULL_PATH} NAME)
string(REGEX REPLACE ".yaml" "" ARCH_NAME ${ARCH_FILE_NAME})
sparta_named_test(olympia_arch_${ARCH_NAME}_drhy_test olympia
-i200K --workload traces/dhry_riscv.zstf
--arch-search-dir ${SIM_BASE}/test/sim/lsu_arch_configs/
--arch ${ARCH_FULL_PATH})
endforeach()

foreach(ARCH_FULL_PATH ${TEST_YAML})
get_filename_component(ARCH_FILE_NAME ${ARCH_FULL_PATH} NAME)
string(REGEX REPLACE ".yaml" "" ARCH_NAME ${ARCH_FILE_NAME})
sparta_named_test(olympia_arch_${ARCH_NAME}_coremark_test olympia
-i200K --workload traces/core_riscv.zstf
--arch-search-dir ${SIM_BASE}/test/sim/lsu_arch_configs/
--arch ${ARCH_FULL_PATH})
foreach(param ${test_params_list})
# Split string to get the parameter and the value for it
string(REPLACE " " ";" kv_pair ${param})
list(GET kv_pair 0 parameter)
list(GET kv_pair 1 value)

sparta_named_test(olympia_arch_${ARCH_NAME}_${index}_custom_dhry_test olympia
-i500K --workload traces/dhry_riscv.zstf -p ${parameter} ${value}
--arch ${ARCH_NAME})

sparta_named_test(olympia_arch_${ARCH_NAME}_${index}_custom_core olympia
-i500K --workload traces/core_riscv.zstf -p ${parameter} ${value}
--arch ${ARCH_NAME})

math(EXPR index "${index} + 1")
endforeach ()
endforeach()
7 changes: 0 additions & 7 deletions test/sim/lsu_arch_configs/small_cache_lookup_stage.yaml

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions test/sim/lsu_arch_configs/small_cache_read_stage.yaml

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions test/sim/lsu_arch_configs/small_core.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions test/sim/lsu_arch_configs/small_core_spec_load_exec.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions test/sim/lsu_arch_configs/small_mmu_lookup_stage.yaml

This file was deleted.

This file was deleted.

0 comments on commit 73cf645

Please sign in to comment.