Jason Lowe-Power has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/67937?usp=email )
Change subject: cpu: Add fatal in BaseCPU for wrong workloads
......................................................................
cpu: Add fatal in BaseCPU for wrong workloads
The CPU models assume that the number of workloads (Processes) is equal
to the number of threads when using SE mode. This wasn't checked leading
to a segfault if there were no workloads. This change makes the error
more clear.
Change-Id: I9a7b21112b8f819c6eeca944ee0d73ae9ce9a57b
Signed-off-by: Jason Lowe-Power <ja...@lowepower.com>
---
M src/cpu/base.cc
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 60d443a..9095072 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -181,10 +181,18 @@
fatal("Number of ISAs (%i) assigned to the CPU does not equal
number "
"of threads (%i).\n", params().isa.size(), numThreads);
}
+<<<<<<< Updated upstream
modelResetPort.onChange([this](const bool &new_val) {
setReset(new_val);
});
+=======
+ if (!FullSystem && params().workload.size() != numThreads) {
+ fatal("Number of processes (cpu.workload) (%i) assigned to the
CPU "
+ "does not equal number of threads (%i).\n",
+ params().workload.size(), numThreads);
+ }
+>>>>>>> Stashed changes
}
void
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/67937?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9a7b21112b8f819c6eeca944ee0d73ae9ce9a57b
Gerrit-Change-Number: 67937
Gerrit-PatchSet: 1
Gerrit-Owner: Jason Lowe-Power <power...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org