activity = Param.Unsigned(0, "Initial count")
- cachePorts = Param.Unsigned(200, "Cache Ports")
+ cacheStorePorts = Param.Unsigned(200, "Cache Ports. "
+ "Constrains stores only. Loads are constrained by load FUs.")
decodeToFetchDelay = Param.Cycles(1, "Decode to fetch delay")
renameToFetchDelay = Param.Cycles(1 ,"Rename to fetch delay")
* @todo: Move the number of used ports up to the LSQ level so it can
* be shared by all LSQ units.
*/
- void tick() { usedPorts = 0; }
+ void tick() { usedStorePorts = 0; }
/** Inserts an instruction. */
void insert(DynInstPtr &inst);
int storeTail;
/// @todo Consider moving to a more advanced model with write vs read ports
- /** The number of cache ports available each cycle. */
- int cachePorts;
+ /** The number of cache ports available each cycle (stores only). */
+ int cacheStorePorts;
- /** The number of used cache ports in this cycle. */
- int usedPorts;
+ /** The number of used cache ports in this cycle by stores. */
+ int usedStorePorts;
//list<InstSeqNum> mshrSeqNums;
load_inst->memData = new uint8_t[req->getSize()];
}
- ++usedPorts;
-
// if we the cache is not blocked, do cache access
bool completedFirst = false;
PacketPtr data_pkt = Packet::createRead(req);
state->mainPkt = data_pkt;
}
+ // For now, load throughput is constrained by the number of
+ // load FUs only, and loads do not consume a cache port (only
+ // stores do).
+ // @todo We should account for cache port contention
+ // and arbitrate between loads and stores.
bool successful_load = true;
if (!dcachePort->sendTimingReq(fst_data_pkt)) {
successful_load = false;
// load will be squashed, so indicate this to the state object.
// The first packet will return in completeDataAccess and be
// handled there.
- ++usedPorts;
+ // @todo We should also account for cache port contention
+ // here.
if (!dcachePort->sendTimingReq(snd_data_pkt)) {
// The main packet will be deleted in completeDataAccess.
state->complete();
depCheckShift = params->LSQDepCheckShift;
checkLoads = params->LSQCheckLoads;
- cachePorts = params->cachePorts;
+ cacheStorePorts = params->cacheStorePorts;
needsTSO = params->needsTSO;
resetState();
storeHead = storeWBIdx = storeTail = 0;
- usedPorts = 0;
+ usedStorePorts = 0;
retryPkt = NULL;
memDepViolator = NULL;
storeQueue[storeWBIdx].inst &&
storeQueue[storeWBIdx].canWB &&
((!needsTSO) || (!storeInFlight)) &&
- usedPorts < cachePorts) {
+ usedStorePorts < cacheStorePorts) {
if (isStoreBlocked) {
DPRINTF(LSQUnit, "Unable to write back any more stores, cache"
continue;
}
- ++usedPorts;
+ ++usedStorePorts;
if (storeQueue[storeWBIdx].inst->isDataPrefetch()) {
incrStIdx(storeWBIdx);
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 {
}
// Not sure this should set it to 0.
- usedPorts = 0;
+ usedStorePorts = 0;
assert(stores >= 0 && storesToWB >= 0);
}