aboutsummaryrefslogtreecommitdiff
path: root/riscv/sim.cc
diff options
context:
space:
mode:
authorRupert Swarbrick <rswarbrick@gmail.com>2022-03-31 09:48:43 +0100
committerRupert Swarbrick <rswarbrick@lowrisc.org>2022-04-12 11:10:17 +0100
commit057139ab90b8e03b71825e8f2be7cab58fef0f90 (patch)
tree4552ff07282f29ff6380c97f873b30226f20c742 /riscv/sim.cc
parentae7d2c3062c1a911d97444e5c6df5089a7bb52f6 (diff)
downloadspike-057139ab90b8e03b71825e8f2be7cab58fef0f90.zip
spike-057139ab90b8e03b71825e8f2be7cab58fef0f90.tar.gz
spike-057139ab90b8e03b71825e8f2be7cab58fef0f90.tar.bz2
Fix debug messages about invalid pmpregions/mmu-types
This was using the number of CPUs in total, rather than the CPU whose PMP regions / MMU type it was actually parsing.
Diffstat (limited to 'riscv/sim.cc')
-rw-r--r--riscv/sim.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc
index be60864..90fa210 100644
--- a/riscv/sim.cc
+++ b/riscv/sim.cc
@@ -129,7 +129,7 @@ sim_t::sim_t(const cfg_t *cfg, const char* varch, bool halted, bool real_time_cl
procs[cpu_idx]->set_pmp_num(pmp_num);
} else {
std::cerr << "core ("
- << hartids.size()
+ << cpu_idx
<< ") doesn't have valid 'riscv,pmpregions'"
<< pmp_num << ").\n";
exit(1);
@@ -159,7 +159,7 @@ sim_t::sim_t(const cfg_t *cfg, const char* varch, bool halted, bool real_time_cl
//has been set in the beginning
} else {
std::cerr << "core ("
- << hartids.size()
+ << cpu_idx
<< ") has an invalid 'mmu-type': "
<< mmu_type << ").\n";
exit(1);