fixes FW load handling in SysC wrapper, reports now na error if failed
This commit is contained in:
@ -45,11 +45,10 @@
|
||||
#include <scc/report.h>
|
||||
#include <util/ities.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <array>
|
||||
#include <numeric>
|
||||
#include <iss/plugin/cycle_estimate.h>
|
||||
#include <iss/plugin/instruction_count.h>
|
||||
#include <util/ities.h>
|
||||
|
||||
// clang-format on
|
||||
|
||||
@ -308,19 +307,22 @@ template <unsigned int BUSWIDTH> void core_complex<BUSWIDTH>::before_end_of_elab
|
||||
template <unsigned int BUSWIDTH> void core_complex<BUSWIDTH>::start_of_simulation() {
|
||||
// quantum_keeper.reset();
|
||||
if(GET_PROP_VALUE(elf_file).size() > 0) {
|
||||
istringstream is(GET_PROP_VALUE(elf_file));
|
||||
string s;
|
||||
while(getline(is, s, ',')) {
|
||||
std::pair<uint64_t, bool> start_addr = cpu->load_file(s);
|
||||
auto file_names = util::split(GET_PROP_VALUE(elf_file), ',');
|
||||
for(auto& s : file_names) {
|
||||
std::pair<uint64_t, bool> load_result = cpu->load_file(s);
|
||||
if(!std::get<1>(load_result)) {
|
||||
SCCWARN(SCMOD) << "Could not load FW file " << s;
|
||||
} else {
|
||||
#ifndef CWR_SYSTEMC
|
||||
if(reset_address.is_default_value() && start_addr.second == true)
|
||||
reset_address.set_value(start_addr.first);
|
||||
if(reset_address.is_default_value())
|
||||
reset_address.set_value(load_result.first);
|
||||
#else
|
||||
if(start_addr.second == true)
|
||||
reset_address = start_addr.first;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
if(trc->m_db != nullptr && trc->stream_handle == nullptr) {
|
||||
string basename(this->name());
|
||||
trc->stream_handle = new scv_tr_stream((basename + ".instr").c_str(), "TRANSACTOR", trc->m_db);
|
||||
|
Reference in New Issue
Block a user