diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:35 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:35 -0400 |
commit | 946b0ed4f48e92b5286544369945c6a16663b590 (patch) | |
tree | 2ae1ea3d8f0652b9af528366bd54609e2791673e /src/cpu/inorder/resources/cache_unit.cc | |
parent | 1a6d25dc478554cf1e7fe44e607c39989c58f114 (diff) | |
download | gem5-946b0ed4f48e92b5286544369945c6a16663b590.tar.xz |
inorder: simplify handling of split accesses
Diffstat (limited to 'src/cpu/inorder/resources/cache_unit.cc')
-rw-r--r-- | src/cpu/inorder/resources/cache_unit.cc | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/src/cpu/inorder/resources/cache_unit.cc b/src/cpu/inorder/resources/cache_unit.cc index 620ba06c1..c38e5541d 100644 --- a/src/cpu/inorder/resources/cache_unit.cc +++ b/src/cpu/inorder/resources/cache_unit.cc @@ -488,49 +488,33 @@ CacheUnit::read(DynInstPtr inst, Addr addr, if (secondAddr > addr && !inst->split2ndAccess) { - DPRINTF(InOrderCachePort, "%i: sn[%i] Split Read Access (1 of 2) for " - "(%#x, %#x).\n", curTick(), inst->seqNum, addr, secondAddr); - - // Save All "Total" Split Information - // ============================== - inst->splitInst = true; - inst->splitMemData = new uint8_t[size]; - - if (!inst->splitInstSked) { - assert(0 && "Split Requests Not Supported for Now..."); - // Schedule Split Read/Complete for Instruction - // ============================== - int stage_num = cache_req->getStageNum(); - RSkedPtr inst_sked = (stage_num >= ThePipeline::BackEndStartStage) ? - inst->backSked : inst->frontSked; + if (!inst->splitInst) { + DPRINTF(InOrderCachePort, "%i: sn[%i] Split Read Access (1 of 2) for " + "(%#x, %#x).\n", curTick(), inst->seqNum, addr, secondAddr); - // this is just an arbitrarily high priority to ensure that this - // gets pushed to the back of the list - int stage_pri = 20; - - int isplit_cmd = CacheUnit::InitSecondSplitRead; - inst_sked->push(new - ScheduleEntry(stage_num, - stage_pri, - cpu->resPool->getResIdx(DCache), - isplit_cmd, - 1)); + unsigned stage_num = cache_req->getStageNum(); + unsigned cmd = inst->curSkedEntry->cmd; - int csplit_cmd = CacheUnit::CompleteSecondSplitRead; - inst_sked->push(new - ScheduleEntry(stage_num + 1, - 1/*stage_pri*/, - cpu->resPool->getResIdx(DCache), - csplit_cmd, - 1)); - inst->splitInstSked = true; + // 1. Make A New Inst. Schedule w/Split Read/Complete Entered on + // the schedule + // ============================== + // 2. Reassign curSkedPtr to current command (InitiateRead) on new + // schedule + // ============================== + inst->splitInst = true; + inst->setBackSked(cpu->createBackEndSked(inst)); + inst->curSkedEntry = inst->backSked->find(stage_num, cmd); } else { DPRINTF(InOrderCachePort, "[tid:%i] [sn:%i] Retrying Split Read " "Access (1 of 2) for (%#x, %#x).\n", inst->readTid(), inst->seqNum, addr, secondAddr); } + // Save All "Total" Split Information + // ============================== + inst->splitMemData = new uint8_t[size]; + // Split Information for First Access // ============================== size = secondAddr - addr; |