Skip to content

Commit 80a4ebb

Browse files
committed
core_complex: add finish_condition cci var
Add CCI variable to hold the finish condition enumeration value and apply it to the ISS.
1 parent 41e5c6d commit 80a4ebb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sysc/core_complex.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ class core_complex : public sc_core::sc_module, public scc::traceable, public co
112112

113113
cci::cci_param<uint64_t> reset_address{"reset_address", 0ULL};
114114

115+
cci::cci_param<unsigned> finish_condition{"finish_condition", static_cast<unsigned>(iss::finish_cond_e::NONE)};
116+
115117
cci::cci_param<std::string> core_type{"core_type", "rv32imac_m"};
116118

117119
cci::cci_param<std::string> backend{"backend", "interp"};
@@ -270,7 +272,7 @@ class core_complex : public sc_core::sc_module, public scc::traceable, public co
270272
core->setup_mt();
271273
quantum_keeper.check_and_sync(sc_core::SC_ZERO_TIME);
272274
quantum_keeper.run_thread([this]() {
273-
vm->start(std::numeric_limits<uint64_t>::max(), dump_ir);
275+
vm->start(std::numeric_limits<uint64_t>::max(), dump_ir, static_cast<iss::finish_cond_e>(finish_condition.get_value()));
274276
return quantum_keeper.get_local_absolute_time();
275277
});
276278
}
@@ -295,7 +297,7 @@ class core_complex : public sc_core::sc_module, public scc::traceable, public co
295297
f();
296298
}
297299
template <typename U = QK> typename std::enable_if<std::is_same<U, tlm::scc::quantumkeeper_st>::value>::type run_iss() {
298-
vm->start(std::numeric_limits<uint64_t>::max(), dump_ir);
300+
vm->start(std::numeric_limits<uint64_t>::max(), dump_ir, static_cast<iss::finish_cond_e>(finish_condition.get_value()));
299301
}
300302
///////////////////////////////////////////////////////////////////////////////
301303
//

0 commit comments

Comments
 (0)