Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Queue is empty before finishing simulation #90

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/LSU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ namespace olympia
<< ": "
<< memory_access_allocator.getNumAllocated()
<< " MemoryAccessInfo objects allocated/created");

bool has_unretired_stores = std::any_of(
ldst_inst_queue_.begin(),
ldst_inst_queue_.end(),
[](LoadStoreInstInfoPtr inst){ return inst->getInstPtr()->isStoreInst() && inst->getInstPtr()->getStatus() != Inst::Status::RETIRED; })
&& !ldst_inst_queue_.empty();

sparta_assert(!has_unretired_stores, "Issue queue has pending stores!!!");
}

//! name of this resource.
Expand Down
6 changes: 3 additions & 3 deletions test/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ sparta_named_test(olympia_json_test_report_html olympia
--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
sparta_named_test(olympia_dhry_test_report_html olympia
--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
sparta_named_test(olympia_coremark_test_report_html olympia
--report-yaml-replacements OUT_BASE coremark_test_report OUT_FORMAT text INST_START 0
--report-search-dir reports
--report reports/core_report.def
Expand All @@ -57,6 +57,6 @@ 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
--workload traces/dhry_riscv.zstf
--arch ${ARCH_NAME})
endforeach()