summaryrefslogtreecommitdiff
path: root/src/cpu/o3/lsq_unit_impl.hh
diff options
context:
space:
mode:
authorArthur Perais <arthur.perais@inria.fr>2016-12-21 15:04:06 -0600
committerArthur Perais <arthur.perais@inria.fr>2016-12-21 15:04:06 -0600
commite5fb6752d613a6f85e2f93b4c01836ac59a8c90c (patch)
tree7bec60d7645ed4a1d7e20dc8071c0dafd288b786 /src/cpu/o3/lsq_unit_impl.hh
parent3a656da1a64f08d5e4c755e94cefda5a4e985a50 (diff)
downloadgem5-e5fb6752d613a6f85e2f93b4c01836ac59a8c90c.tar.xz
cpu: Clarify meaning of cachePorts variable in lsq_unit.hh of O3
cachePorts currently constrains the number of store packets written to the D-Cache each cycle), but loads currently affect this variable. This leads to unexpected congestion (e.g., setting cachePorts to a realistic 1 will in fact allow a store to WB only if no loads have accessed the D-Cache this cycle). In the absence of arbitration, this patch decouples how many loads can be done per cycle from how many stores can be done per cycle. Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/cpu/o3/lsq_unit_impl.hh')
-rw-r--r--src/cpu/o3/lsq_unit_impl.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh
index 73be5e56f..56f12cbb4 100644
--- a/src/cpu/o3/lsq_unit_impl.hh
+++ b/src/cpu/o3/lsq_unit_impl.hh
@@ -176,7 +176,7 @@ LSQUnit<Impl>::init(O3CPU *cpu_ptr, IEW *iew_ptr, DerivO3CPUParams *params,
depCheckShift = params->LSQDepCheckShift;
checkLoads = params->LSQCheckLoads;
- cachePorts = params->cachePorts;
+ cacheStorePorts = params->cacheStorePorts;
needsTSO = params->needsTSO;
resetState();
@@ -193,7 +193,7 @@ LSQUnit<Impl>::resetState()
storeHead = storeWBIdx = storeTail = 0;
- usedPorts = 0;
+ usedStorePorts = 0;
retryPkt = NULL;
memDepViolator = NULL;
@@ -792,7 +792,7 @@ LSQUnit<Impl>::writebackStores()
storeQueue[storeWBIdx].inst &&
storeQueue[storeWBIdx].canWB &&
((!needsTSO) || (!storeInFlight)) &&
- usedPorts < cachePorts) {
+ usedStorePorts < cacheStorePorts) {
if (isStoreBlocked) {
DPRINTF(LSQUnit, "Unable to write back any more stores, cache"
@@ -810,7 +810,7 @@ LSQUnit<Impl>::writebackStores()
continue;
}
- ++usedPorts;
+ ++usedStorePorts;
if (storeQueue[storeWBIdx].inst->isDataPrefetch()) {
incrStIdx(storeWBIdx);
@@ -950,8 +950,8 @@ LSQUnit<Impl>::writebackStores()
assert(snd_data_pkt);
// Ensure there are enough ports to use.
- if (usedPorts < cachePorts) {
- ++usedPorts;
+ if (usedStorePorts < cacheStorePorts) {
+ ++usedStorePorts;
if (sendStore(snd_data_pkt)) {
storePostSend(snd_data_pkt);
} else {
@@ -975,7 +975,7 @@ LSQUnit<Impl>::writebackStores()
}
// Not sure this should set it to 0.
- usedPorts = 0;
+ usedStorePorts = 0;
assert(stores >= 0 && storesToWB >= 0);
}