From 73cf6456db8a1539c76b30219d71f562abaa7ea5 Mon Sep 17 00:00:00 2001 From: Suraj Shirvankar Date: Wed, 8 Nov 2023 23:22:07 +0100 Subject: [PATCH] Remove custom arch files for custom tests --- test/sim/CMakeLists.txt | 146 ++++++++++-------- .../small_cache_lookup_stage.yaml | 7 - .../small_cache_lookup_stage_load_exec.yaml | 7 - .../small_cache_read_stage.yaml | 7 - .../small_cache_read_stage_load_exec.yaml | 7 - test/sim/lsu_arch_configs/small_core.yaml | 38 ----- .../small_core_spec_load_exec.yaml | 9 -- .../small_mmu_lookup_stage.yaml | 7 - .../small_mmu_lookup_stage_load_exec.yaml | 7 - 9 files changed, 78 insertions(+), 157 deletions(-) delete mode 100644 test/sim/lsu_arch_configs/small_cache_lookup_stage.yaml delete mode 100644 test/sim/lsu_arch_configs/small_cache_lookup_stage_load_exec.yaml delete mode 100644 test/sim/lsu_arch_configs/small_cache_read_stage.yaml delete mode 100644 test/sim/lsu_arch_configs/small_cache_read_stage_load_exec.yaml delete mode 100644 test/sim/lsu_arch_configs/small_core.yaml delete mode 100644 test/sim/lsu_arch_configs/small_core_spec_load_exec.yaml delete mode 100644 test/sim/lsu_arch_configs/small_mmu_lookup_stage.yaml delete mode 100644 test/sim/lsu_arch_configs/small_mmu_lookup_stage_load_exec.yaml diff --git a/test/sim/CMakeLists.txt b/test/sim/CMakeLists.txt index a41afeb0..21b54e57 100644 --- a/test/sim/CMakeLists.txt +++ b/test/sim/CMakeLists.txt @@ -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() diff --git a/test/sim/lsu_arch_configs/small_cache_lookup_stage.yaml b/test/sim/lsu_arch_configs/small_cache_lookup_stage.yaml deleted file mode 100644 index 1f237e0c..00000000 --- a/test/sim/lsu_arch_configs/small_cache_lookup_stage.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core.yaml - -top: - cpu: - core0: - lsu.params: - cache_lookup_stage_length: 3 \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_cache_lookup_stage_load_exec.yaml b/test/sim/lsu_arch_configs/small_cache_lookup_stage_load_exec.yaml deleted file mode 100644 index 7925957d..00000000 --- a/test/sim/lsu_arch_configs/small_cache_lookup_stage_load_exec.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core_spec_load_exec.yaml - -top: - cpu: - core0: - lsu.params: - cache_lookup_stage_length: 3 \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_cache_read_stage.yaml b/test/sim/lsu_arch_configs/small_cache_read_stage.yaml deleted file mode 100644 index 577fc70c..00000000 --- a/test/sim/lsu_arch_configs/small_cache_read_stage.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core.yaml - -top: - cpu: - core0: - lsu.params: - cache_read_stage_length: 3 \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_cache_read_stage_load_exec.yaml b/test/sim/lsu_arch_configs/small_cache_read_stage_load_exec.yaml deleted file mode 100644 index 0d951170..00000000 --- a/test/sim/lsu_arch_configs/small_cache_read_stage_load_exec.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core_spec_load_exec.yaml - -top: - cpu: - core0: - lsu.params: - cache_read_stage_length: 3 \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_core.yaml b/test/sim/lsu_arch_configs/small_core.yaml deleted file mode 100644 index 422a8844..00000000 --- a/test/sim/lsu_arch_configs/small_core.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# Set up the pipeline for a 2-wide machine -# - -top.cpu.core0: - fetch.params.num_to_fetch: 2 - decode.params.num_to_decode: 2 - rename.params.num_to_rename: 2 - dispatch.params.num_to_dispatch: 2 - rob.params.num_to_retire: 2 - lsu.params: - allow_speculative_load_exec: false - dcache.params: - l1_size_kb: 16 - -top.cpu.core0.extension.core_extensions: - execution_topology: - [["alu", "1"], - ["fpu", "1"], - ["br", "1"]] - -top.cpu.core0.rename.scoreboards: - # From - # | - # V - integer.params.latency_matrix: | - [["", "alu0", "fpu0", "br0", "lsu"], # <-- TO - ["alu0", "1", "1", "1", "1"], - ["fpu0", "1", "1", "1", "1"], - ["br0", "1", "1", "1", "1"], - ["lsu", "1", "1", "1", "1"]] - - float.params.latency_matrix: | - [["", "alu0", "fpu0", "br0", "lsu"], # <-- TO - ["alu0", "1", "1", "1", "1"], - ["fpu0", "1", "1", "1", "1"], - ["br0", "1", "1", "1", "1"], - ["lsu", "1", "1", "1", "1"]] diff --git a/test/sim/lsu_arch_configs/small_core_spec_load_exec.yaml b/test/sim/lsu_arch_configs/small_core_spec_load_exec.yaml deleted file mode 100644 index db5d3746..00000000 --- a/test/sim/lsu_arch_configs/small_core_spec_load_exec.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Set up the pipeline for a 2-wide machine -# - -include: small_core.yaml - -top.cpu.core0: - lsu.params: - allow_speculative_load_exec: true \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_mmu_lookup_stage.yaml b/test/sim/lsu_arch_configs/small_mmu_lookup_stage.yaml deleted file mode 100644 index e14b0e1f..00000000 --- a/test/sim/lsu_arch_configs/small_mmu_lookup_stage.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core.yaml - -top: - cpu: - core0: - lsu.params: - mmu_lookup_stage_length: 3 \ No newline at end of file diff --git a/test/sim/lsu_arch_configs/small_mmu_lookup_stage_load_exec.yaml b/test/sim/lsu_arch_configs/small_mmu_lookup_stage_load_exec.yaml deleted file mode 100644 index 54c22978..00000000 --- a/test/sim/lsu_arch_configs/small_mmu_lookup_stage_load_exec.yaml +++ /dev/null @@ -1,7 +0,0 @@ -include: small_core_spec_load_exec.yaml - -top: - cpu: - core0: - lsu.params: - mmu_lookup_stage_length: 3 \ No newline at end of file