2006-05-23 22:57:14 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006 The Regents of The University of Michigan
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are
|
|
|
|
* met: redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer;
|
|
|
|
* redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution;
|
|
|
|
* neither the name of the copyright holders nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived from
|
|
|
|
* this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2006-06-07 22:02:55 +02:00
|
|
|
*
|
|
|
|
* Authors: Kevin Lim
|
2006-05-23 22:57:14 +02:00
|
|
|
*/
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2009-09-23 17:34:21 +02:00
|
|
|
#include "config/the_isa.hh"
|
2006-06-23 05:33:26 +02:00
|
|
|
#include "config/use_checker.hh"
|
2006-04-23 01:10:39 +02:00
|
|
|
#include "cpu/ozone/lw_back_end.hh"
|
2006-06-23 05:33:26 +02:00
|
|
|
#include "cpu/op_class.hh"
|
|
|
|
|
|
|
|
#if USE_CHECKER
|
|
|
|
#include "cpu/checker/cpu.hh"
|
|
|
|
#endif
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::generateTrapEvent(Tick latency)
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Generating trap event\n");
|
|
|
|
|
|
|
|
TrapEvent *trap = new TrapEvent(this);
|
|
|
|
|
2011-01-08 06:50:29 +01:00
|
|
|
trap->schedule(curTick() + cpu->ticks(latency));
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
thread->trapPending = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
int
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
LWBackEnd<Impl>::wakeDependents(DynInstPtr &inst, bool memory_deps)
|
2006-04-23 01:10:39 +02:00
|
|
|
{
|
|
|
|
assert(!inst->isSquashed());
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
std::vector<DynInstPtr> &dependents = memory_deps ? inst->getMemDeps() :
|
|
|
|
inst->getDependents();
|
2006-04-23 01:10:39 +02:00
|
|
|
int num_outputs = dependents.size();
|
|
|
|
|
|
|
|
DPRINTF(BE, "Waking instruction [sn:%lli] dependents in IQ\n", inst->seqNum);
|
|
|
|
|
|
|
|
for (int i = 0; i < num_outputs; i++) {
|
|
|
|
DynInstPtr dep_inst = dependents[i];
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (!memory_deps) {
|
|
|
|
dep_inst->markSrcRegReady();
|
|
|
|
} else {
|
|
|
|
if (!dep_inst->isSquashed())
|
|
|
|
dep_inst->markMemInstReady(inst.get());
|
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
DPRINTF(BE, "Marking source reg ready [sn:%lli] in IQ\n", dep_inst->seqNum);
|
|
|
|
|
|
|
|
if (dep_inst->readyToIssue() && dep_inst->isInROB() &&
|
2006-05-24 20:31:06 +02:00
|
|
|
!dep_inst->isNonSpeculative() && !dep_inst->isStoreConditional() &&
|
|
|
|
dep_inst->memDepReady() && !dep_inst->isMemBarrier() &&
|
|
|
|
!dep_inst->isWriteBarrier()) {
|
2006-04-23 01:10:39 +02:00
|
|
|
DPRINTF(BE, "Adding instruction to exeList [sn:%lli]\n",
|
|
|
|
dep_inst->seqNum);
|
|
|
|
exeList.push(dep_inst);
|
|
|
|
if (dep_inst->iqItValid) {
|
|
|
|
DPRINTF(BE, "Removing instruction from waiting list\n");
|
|
|
|
waitingList.erase(dep_inst->iqIt);
|
|
|
|
waitingInsts--;
|
|
|
|
dep_inst->iqItValid = false;
|
|
|
|
assert(waitingInsts >= 0);
|
|
|
|
}
|
|
|
|
if (dep_inst->isMemRef()) {
|
|
|
|
removeWaitingMemOp(dep_inst);
|
|
|
|
DPRINTF(BE, "Issued a waiting mem op [sn:%lli]\n",
|
|
|
|
dep_inst->seqNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return num_outputs;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::rescheduleMemInst(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
replayList.push_front(inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
LWBackEnd<Impl>::TrapEvent::TrapEvent(LWBackEnd<Impl> *_be)
|
|
|
|
: Event(&mainEventQueue, CPU_Tick_Pri), be(_be)
|
|
|
|
{
|
|
|
|
this->setFlags(Event::AutoDelete);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::TrapEvent::process()
|
|
|
|
{
|
|
|
|
be->trapSquash = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
const char *
|
2008-02-06 22:32:40 +01:00
|
|
|
LWBackEnd<Impl>::TrapEvent::description() const
|
2006-04-23 01:10:39 +02:00
|
|
|
{
|
2007-07-01 02:45:58 +02:00
|
|
|
return "Trap";
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::replayMemInst(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
bool found_inst = false;
|
|
|
|
while (!replayList.empty()) {
|
|
|
|
exeList.push(replayList.front());
|
|
|
|
if (replayList.front() == inst) {
|
|
|
|
found_inst = true;
|
|
|
|
}
|
|
|
|
replayList.pop_front();
|
|
|
|
}
|
|
|
|
assert(found_inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
LWBackEnd<Impl>::LWBackEnd(Params *params)
|
2006-08-24 23:45:04 +02:00
|
|
|
: d2i(5, 5), i2e(5, 5), e2c(5, 5), numInstsToWB(params->backEndLatency, 0),
|
2006-07-08 00:24:13 +02:00
|
|
|
trapSquash(false), tcSquash(false),
|
2006-10-01 05:43:23 +02:00
|
|
|
latency(params->backEndLatency),
|
2006-08-24 23:45:04 +02:00
|
|
|
width(params->backEndWidth), lsqLimits(params->lsqLimits),
|
2006-04-23 01:10:39 +02:00
|
|
|
exactFullStall(true)
|
|
|
|
{
|
|
|
|
numROBEntries = params->numROBEntries;
|
|
|
|
numInsts = 0;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
maxOutstandingMemOps = params->maxOutstandingMemOps;
|
2006-04-23 01:10:39 +02:00
|
|
|
numWaitingMemOps = 0;
|
|
|
|
waitingInsts = 0;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
switchedOut = false;
|
2006-05-16 20:09:04 +02:00
|
|
|
switchPending = false;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
LSQ.setBE(this);
|
|
|
|
|
|
|
|
// Setup IQ and LSQ with their parameters here.
|
|
|
|
instsToDispatch = d2i.getWire(-1);
|
|
|
|
|
|
|
|
instsToExecute = i2e.getWire(-1);
|
|
|
|
|
|
|
|
dispatchWidth = params->dispatchWidth ? params->dispatchWidth : width;
|
|
|
|
issueWidth = params->issueWidth ? params->issueWidth : width;
|
|
|
|
wbWidth = params->wbWidth ? params->wbWidth : width;
|
|
|
|
commitWidth = params->commitWidth ? params->commitWidth : width;
|
|
|
|
|
|
|
|
LSQ.init(params, params->LQEntries, params->SQEntries, 0);
|
|
|
|
|
|
|
|
dispatchStatus = Running;
|
2006-06-25 06:22:41 +02:00
|
|
|
commitStatus = Running;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
std::string
|
|
|
|
LWBackEnd<Impl>::name() const
|
|
|
|
{
|
|
|
|
return cpu->name() + ".backend";
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::regStats()
|
|
|
|
{
|
|
|
|
using namespace Stats;
|
2006-08-24 23:45:04 +02:00
|
|
|
LSQ.regStats();
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
robCapEvents
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:cap_events")
|
|
|
|
.desc("number of cycles where ROB cap was active")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
robCapInstCount
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:cap_inst")
|
|
|
|
.desc("number of instructions held up by ROB cap")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
iqCapEvents
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() +".IQ:cap_events" )
|
|
|
|
.desc("number of cycles where IQ cap was active")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
iqCapInstCount
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".IQ:cap_inst")
|
|
|
|
.desc("number of instructions held up by IQ cap")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeInst
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:count")
|
|
|
|
.desc("number of insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeSwp
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:swp")
|
|
|
|
.desc("number of swp insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeNop
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:nop")
|
|
|
|
.desc("number of nop insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeRefs
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:refs")
|
|
|
|
.desc("number of memory reference insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeLoads
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:loads")
|
|
|
|
.desc("number of load insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
exeBranches
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:branches")
|
|
|
|
.desc("Number of branches issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
issuedOps
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:op_count")
|
|
|
|
.desc("number of insts issued")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
|
|
|
/*
|
|
|
|
for (int i=0; i<Num_OpClasses; ++i) {
|
|
|
|
stringstream subname;
|
|
|
|
subname << opClassStrings[i] << "_delay";
|
|
|
|
issue_delay_dist.subname(i, subname.str());
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
//
|
|
|
|
// Other stats
|
|
|
|
//
|
2006-08-02 18:05:34 +02:00
|
|
|
lsqForwLoads
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".LSQ:forw_loads")
|
|
|
|
.desc("number of loads forwarded via LSQ")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
invAddrLoads
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:addr_loads")
|
|
|
|
.desc("number of invalid-address loads")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
invAddrSwpfs
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ISSUE:addr_swpfs")
|
|
|
|
.desc("number of invalid-address SW prefetches")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
lsqBlockedLoads
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".LSQ:blocked_loads")
|
|
|
|
.desc("number of ready loads not issued due to memory disambiguation")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
|
|
|
lsqInversion
|
|
|
|
.name(name() + ".ISSUE:lsq_invert")
|
|
|
|
.desc("Number of times LSQ instruction issued early")
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
nIssuedDist
|
2006-04-23 01:10:39 +02:00
|
|
|
.init(issueWidth + 1)
|
|
|
|
.name(name() + ".ISSUE:issued_per_cycle")
|
|
|
|
.desc("Number of insts issued each cycle")
|
|
|
|
.flags(total | pdf | dist)
|
|
|
|
;
|
2006-08-24 23:45:04 +02:00
|
|
|
/*
|
2006-08-02 18:05:34 +02:00
|
|
|
issueDelayDist
|
2006-04-23 01:10:39 +02:00
|
|
|
.init(Num_OpClasses,0,99,2)
|
|
|
|
.name(name() + ".ISSUE:")
|
|
|
|
.desc("cycles from operands ready to issue")
|
|
|
|
.flags(pdf | cdf)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
queueResDist
|
2006-04-23 01:10:39 +02:00
|
|
|
.init(Num_OpClasses, 0, 99, 2)
|
|
|
|
.name(name() + ".IQ:residence:")
|
|
|
|
.desc("cycles from dispatch to issue")
|
|
|
|
.flags(total | pdf | cdf )
|
|
|
|
;
|
|
|
|
for (int i = 0; i < Num_OpClasses; ++i) {
|
2006-08-02 18:05:34 +02:00
|
|
|
queueResDist.subname(i, opClassStrings[i]);
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
2006-08-24 23:45:04 +02:00
|
|
|
*/
|
2006-08-02 18:05:34 +02:00
|
|
|
writebackCount
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:count")
|
|
|
|
.desc("cumulative count of insts written-back")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
producerInst
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:producers")
|
|
|
|
.desc("num instructions producing a value")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
consumerInst
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:consumers")
|
|
|
|
.desc("num instructions consuming a value")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbPenalized
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:penalized")
|
|
|
|
.desc("number of instrctions required to write to 'other' IQ")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbPenalizedRate
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:penalized_rate")
|
|
|
|
.desc ("fraction of instructions written-back that wrote to 'other' IQ")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbPenalizedRate = wbPenalized / writebackCount;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbFanout
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:fanout")
|
|
|
|
.desc("average fanout of values written-back")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbFanout = producerInst / consumerInst;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
wbRate
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".WB:rate")
|
|
|
|
.desc("insts written-back per cycle")
|
|
|
|
.flags(total)
|
|
|
|
;
|
2006-08-02 18:05:34 +02:00
|
|
|
wbRate = writebackCount / cpu->numCycles;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComInst
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:count")
|
|
|
|
.desc("Number of instructions committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComSwp
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:swp_count")
|
|
|
|
.desc("Number of s/w prefetches committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComRefs
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:refs")
|
|
|
|
.desc("Number of memory references committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComLoads
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:loads")
|
|
|
|
.desc("Number of loads committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComMembars
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:membars")
|
|
|
|
.desc("Number of memory barriers committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
statComBranches
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:branches")
|
|
|
|
.desc("Number of branches committed")
|
|
|
|
.flags(total)
|
|
|
|
;
|
2006-08-02 18:05:34 +02:00
|
|
|
nCommittedDist
|
2006-04-23 01:10:39 +02:00
|
|
|
.init(0,commitWidth,1)
|
|
|
|
.name(name() + ".COM:committed_per_cycle")
|
|
|
|
.desc("Number of insts commited each cycle")
|
|
|
|
.flags(pdf)
|
|
|
|
;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Commit-Eligible instructions...
|
|
|
|
//
|
|
|
|
// -> The number of instructions eligible to commit in those
|
|
|
|
// cycles where we reached our commit BW limit (less the number
|
|
|
|
// actually committed)
|
|
|
|
//
|
|
|
|
// -> The average value is computed over ALL CYCLES... not just
|
|
|
|
// the BW limited cycles
|
|
|
|
//
|
|
|
|
// -> The standard deviation is computed only over cycles where
|
|
|
|
// we reached the BW limit
|
|
|
|
//
|
2006-08-02 18:05:34 +02:00
|
|
|
commitEligible
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:bw_limited")
|
|
|
|
.desc("number of insts not committed due to BW limits")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
commitEligibleSamples
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".COM:bw_lim_events")
|
|
|
|
.desc("number cycles where commit BW limit reached")
|
|
|
|
;
|
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
squashedInsts
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-24 23:10:06 +02:00
|
|
|
.name(name() + ".COM:squashed_insts")
|
|
|
|
.desc("Number of instructions removed from inst list")
|
|
|
|
;
|
|
|
|
|
|
|
|
ROBSquashedInsts
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-24 23:10:06 +02:00
|
|
|
.name(name() + ".COM:rob_squashed_insts")
|
|
|
|
.desc("Number of instructions removed from inst list when they reached the head of the ROB")
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBFcount
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:full_count")
|
|
|
|
.desc("number of cycles where ROB was full")
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBCount
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:occupancy")
|
|
|
|
.desc(name() + ".ROB occupancy (cumulative)")
|
|
|
|
.flags(total)
|
|
|
|
;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBFullRate
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:full_rate")
|
|
|
|
.desc("ROB full per cycle")
|
|
|
|
;
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBFullRate = ROBFcount / cpu->numCycles;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBOccRate
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:occ_rate")
|
|
|
|
.desc("ROB occupancy rate")
|
|
|
|
.flags(total)
|
|
|
|
;
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBOccRate = ROBCount / cpu->numCycles;
|
2006-08-24 23:45:04 +02:00
|
|
|
/*
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBOccDist
|
2009-05-26 18:23:13 +02:00
|
|
|
.init(cpu->numThreads, 0, numROBEntries, 2)
|
2006-04-23 01:10:39 +02:00
|
|
|
.name(name() + ".ROB:occ_dist")
|
|
|
|
.desc("ROB Occupancy per cycle")
|
|
|
|
.flags(total | cdf)
|
|
|
|
;
|
2006-08-24 23:45:04 +02:00
|
|
|
*/
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
template <class Impl>
|
|
|
|
void
|
2006-06-23 05:33:26 +02:00
|
|
|
LWBackEnd<Impl>::setCPU(OzoneCPU *cpu_ptr)
|
2006-04-24 23:10:06 +02:00
|
|
|
{
|
|
|
|
cpu = cpu_ptr;
|
|
|
|
LSQ.setCPU(cpu_ptr);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
checker = cpu->checker;
|
2006-04-24 23:10:06 +02:00
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::setCommBuffer(TimeBuffer<CommStruct> *_comm)
|
|
|
|
{
|
|
|
|
comm = _comm;
|
|
|
|
toIEW = comm->getWire(0);
|
|
|
|
fromCommit = comm->getWire(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if FULL_SYSTEM
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::checkInterrupts()
|
|
|
|
{
|
2008-10-21 16:12:53 +02:00
|
|
|
if (cpu->checkInterrupts(tc) && !trapSquash && !tcSquash) {
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
frontEnd->interruptPending = true;
|
|
|
|
if (robEmpty() && !LSQ.hasStoresToWB()) {
|
|
|
|
// Will need to squash all instructions currently in flight and have
|
|
|
|
// the interrupt handler restart at the last non-committed inst.
|
|
|
|
// Most of that can be handled through the trap() function. The
|
|
|
|
// processInterrupts() function really just checks for interrupts
|
|
|
|
// and then calls trap() if there is an interrupt present.
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Not sure which thread should be the one to interrupt. For now
|
|
|
|
// always do thread 0.
|
|
|
|
assert(!thread->inSyscall);
|
|
|
|
thread->inSyscall = true;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// CPU will handle implementation of the interrupt.
|
|
|
|
cpu->processInterrupts();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Now squash or record that I need to squash this cycle.
|
|
|
|
commitStatus = TrapPending;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Exit state update mode to avoid accidental updating.
|
|
|
|
thread->inSyscall = false;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Generate trap squash event.
|
|
|
|
generateTrapEvent();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
DPRINTF(BE, "Interrupt detected.\n");
|
|
|
|
} else {
|
|
|
|
DPRINTF(BE, "Interrupt must wait for ROB to drain.\n");
|
|
|
|
}
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
}
|
2006-07-08 00:24:13 +02:00
|
|
|
#endif
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::handleFault(Fault &fault, Tick latency)
|
|
|
|
{
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
DPRINTF(BE, "Handling fault!\n");
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
assert(!thread->inSyscall);
|
|
|
|
|
|
|
|
thread->inSyscall = true;
|
|
|
|
|
|
|
|
// Consider holding onto the trap and waiting until the trap event
|
|
|
|
// happens for this to be executed.
|
2006-06-23 05:33:26 +02:00
|
|
|
fault->invoke(thread->getTC());
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
// Exit state update mode to avoid accidental updating.
|
|
|
|
thread->inSyscall = false;
|
|
|
|
|
|
|
|
commitStatus = TrapPending;
|
|
|
|
|
|
|
|
// Generate trap squash event.
|
|
|
|
generateTrapEvent(latency);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::tick()
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Ticking back end\n");
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
// Read in any done instruction information and update the IQ or LSQ.
|
|
|
|
updateStructures();
|
|
|
|
|
2006-05-16 20:09:04 +02:00
|
|
|
if (switchPending && robEmpty() && !LSQ.hasStoresToWB()) {
|
|
|
|
cpu->signalSwitched();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
readyInstsForCommit();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
numInstsToWB.advance();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
ROBCount[0]+= numInsts;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
wbCycle = 0;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
#if FULL_SYSTEM
|
|
|
|
checkInterrupts();
|
2006-07-08 00:24:13 +02:00
|
|
|
#endif
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
if (trapSquash) {
|
2006-06-06 23:32:21 +02:00
|
|
|
assert(!tcSquash);
|
2006-04-23 01:10:39 +02:00
|
|
|
squashFromTrap();
|
2006-06-06 23:32:21 +02:00
|
|
|
} else if (tcSquash) {
|
|
|
|
squashFromTC();
|
2006-05-23 22:57:14 +02:00
|
|
|
}
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
if (dispatchStatus != Blocked) {
|
|
|
|
dispatchInsts();
|
|
|
|
} else {
|
|
|
|
checkDispatchStatus();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (commitStatus != TrapPending) {
|
|
|
|
executeInsts();
|
|
|
|
|
|
|
|
commitInsts();
|
|
|
|
}
|
|
|
|
|
|
|
|
LSQ.writebackStores();
|
|
|
|
|
|
|
|
DPRINTF(BE, "Waiting insts: %i, mem ops: %i, ROB entries in use: %i, "
|
|
|
|
"LSQ loads: %i, LSQ stores: %i\n",
|
|
|
|
waitingInsts, numWaitingMemOps, numInsts,
|
|
|
|
LSQ.numLoads(), LSQ.numStores());
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
assert(numInsts == instList.size());
|
|
|
|
assert(waitingInsts == waitingList.size());
|
|
|
|
assert(numWaitingMemOps == waitingMemOps.size());
|
2006-05-16 20:09:04 +02:00
|
|
|
assert(!switchedOut);
|
2006-04-23 01:10:39 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::updateStructures()
|
|
|
|
{
|
|
|
|
if (fromCommit->doneSeqNum) {
|
|
|
|
LSQ.commitLoads(fromCommit->doneSeqNum);
|
|
|
|
LSQ.commitStores(fromCommit->doneSeqNum);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fromCommit->nonSpecSeqNum) {
|
|
|
|
if (fromCommit->uncached) {
|
|
|
|
// LSQ.executeLoad(fromCommit->lqIdx);
|
|
|
|
} else {
|
|
|
|
// IQ.scheduleNonSpec(
|
|
|
|
// fromCommit->nonSpecSeqNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::addToLSQ(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
// Do anything LSQ specific here?
|
|
|
|
LSQ.insert(inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::dispatchInsts()
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Trying to dispatch instructions.\n");
|
|
|
|
|
|
|
|
while (numInsts < numROBEntries &&
|
|
|
|
numWaitingMemOps < maxOutstandingMemOps) {
|
|
|
|
// Get instruction from front of time buffer
|
2006-08-24 23:45:04 +02:00
|
|
|
if (lsqLimits && LSQ.isFull()) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
DynInstPtr inst = frontEnd->getInst();
|
|
|
|
if (!inst) {
|
|
|
|
break;
|
|
|
|
} else if (inst->isSquashed()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
++numInsts;
|
|
|
|
instList.push_front(inst);
|
|
|
|
|
|
|
|
inst->setInROB();
|
|
|
|
|
|
|
|
DPRINTF(BE, "Dispatching instruction [sn:%lli] PC:%#x\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
for (int i = 0; i < inst->numDestRegs(); ++i)
|
|
|
|
renameTable[inst->destRegIdx(i)] = inst;
|
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (inst->isMemBarrier() || inst->isWriteBarrier()) {
|
|
|
|
if (memBarrier) {
|
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] is waiting on "
|
|
|
|
"barrier [sn:%lli].\n",
|
|
|
|
inst->seqNum, memBarrier->seqNum);
|
|
|
|
memBarrier->addMemDependent(inst);
|
|
|
|
inst->addSrcMemInst(memBarrier);
|
|
|
|
}
|
|
|
|
memBarrier = inst;
|
|
|
|
inst->setCanCommit();
|
2006-05-24 20:31:06 +02:00
|
|
|
} else if (inst->readyToIssue() &&
|
|
|
|
!inst->isNonSpeculative() &&
|
|
|
|
!inst->isStoreConditional()) {
|
2006-04-23 01:10:39 +02:00
|
|
|
if (inst->isMemRef()) {
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
LSQ.insert(inst);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (memBarrier) {
|
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] is waiting on "
|
|
|
|
"barrier [sn:%lli].\n",
|
|
|
|
inst->seqNum, memBarrier->seqNum);
|
|
|
|
memBarrier->addMemDependent(inst);
|
|
|
|
inst->addSrcMemInst(memBarrier);
|
|
|
|
addWaitingMemOp(inst);
|
|
|
|
|
|
|
|
waitingList.push_front(inst);
|
|
|
|
inst->iqIt = waitingList.begin();
|
|
|
|
inst->iqItValid = true;
|
|
|
|
waitingInsts++;
|
|
|
|
} else {
|
2006-05-23 22:57:14 +02:00
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] ready, addding to "
|
|
|
|
"exeList.\n",
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->seqNum);
|
|
|
|
exeList.push(inst);
|
|
|
|
}
|
2006-05-17 20:25:10 +02:00
|
|
|
} else if (inst->isNop()) {
|
|
|
|
DPRINTF(BE, "Nop encountered [sn:%lli], skipping exeList.\n",
|
|
|
|
inst->seqNum);
|
|
|
|
inst->setIssued();
|
|
|
|
inst->setExecuted();
|
|
|
|
inst->setCanCommit();
|
2006-08-24 23:45:04 +02:00
|
|
|
numInstsToWB[0]++;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
} else {
|
2006-05-23 22:57:14 +02:00
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] ready, addding to "
|
|
|
|
"exeList.\n",
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->seqNum);
|
|
|
|
exeList.push(inst);
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
} else {
|
2006-05-24 20:31:06 +02:00
|
|
|
if (inst->isNonSpeculative() || inst->isStoreConditional()) {
|
2006-04-23 01:10:39 +02:00
|
|
|
inst->setCanCommit();
|
|
|
|
DPRINTF(BE, "Adding non speculative instruction\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (inst->isMemRef()) {
|
|
|
|
addWaitingMemOp(inst);
|
|
|
|
LSQ.insert(inst);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (memBarrier) {
|
|
|
|
memBarrier->addMemDependent(inst);
|
|
|
|
inst->addSrcMemInst(memBarrier);
|
|
|
|
|
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] is waiting on "
|
|
|
|
"barrier [sn:%lli].\n",
|
|
|
|
inst->seqNum, memBarrier->seqNum);
|
|
|
|
}
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
DPRINTF(BE, "Instruction [sn:%lli] not ready, addding to "
|
|
|
|
"waitingList.\n",
|
|
|
|
inst->seqNum);
|
|
|
|
waitingList.push_front(inst);
|
|
|
|
inst->iqIt = waitingList.begin();
|
|
|
|
inst->iqItValid = true;
|
|
|
|
waitingInsts++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check if IQ or LSQ is full. If so we'll need to break and stop
|
|
|
|
// removing instructions. Also update the number of insts to remove
|
|
|
|
// from the queue. Check here if we don't care about exact stall
|
|
|
|
// conditions.
|
|
|
|
/*
|
|
|
|
bool stall = false;
|
|
|
|
if (IQ.isFull()) {
|
|
|
|
DPRINTF(BE, "IQ is full!\n");
|
|
|
|
stall = true;
|
|
|
|
} else if (LSQ.isFull()) {
|
|
|
|
DPRINTF(BE, "LSQ is full!\n");
|
|
|
|
stall = true;
|
|
|
|
} else if (isFull()) {
|
|
|
|
DPRINTF(BE, "ROB is full!\n");
|
|
|
|
stall = true;
|
|
|
|
ROB_fcount++;
|
|
|
|
}
|
|
|
|
if (stall) {
|
|
|
|
d2i.advance();
|
|
|
|
dispatchStall();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::dispatchStall()
|
|
|
|
{
|
|
|
|
dispatchStatus = Blocked;
|
|
|
|
if (!cpu->decoupledFrontEnd) {
|
|
|
|
// Tell front end to stall here through a timebuffer, or just tell
|
|
|
|
// it directly.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::checkDispatchStatus()
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Checking dispatch status\n");
|
|
|
|
assert(dispatchStatus == Blocked);
|
|
|
|
if (!LSQ.isFull() && !isFull()) {
|
|
|
|
DPRINTF(BE, "Dispatch no longer blocked\n");
|
|
|
|
dispatchStatus = Running;
|
|
|
|
dispatchInsts();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::executeInsts()
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Trying to execute instructions\n");
|
|
|
|
|
|
|
|
int num_executed = 0;
|
|
|
|
while (!exeList.empty() && num_executed < issueWidth) {
|
|
|
|
DynInstPtr inst = exeList.top();
|
|
|
|
|
|
|
|
DPRINTF(BE, "Executing inst [sn:%lli] PC: %#x\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
// Check if the instruction is squashed; if so then skip it
|
|
|
|
// and don't count it towards the FU usage.
|
|
|
|
if (inst->isSquashed()) {
|
|
|
|
DPRINTF(BE, "Execute: Instruction was squashed.\n");
|
|
|
|
|
|
|
|
// Not sure how to handle this plus the method of sending # of
|
|
|
|
// instructions to use. Probably will just have to count it
|
|
|
|
// towards the bandwidth usage, but not the FU usage.
|
|
|
|
++num_executed;
|
|
|
|
|
|
|
|
// Consider this instruction executed so that commit can go
|
|
|
|
// ahead and retire the instruction.
|
|
|
|
inst->setExecuted();
|
|
|
|
|
|
|
|
// Not sure if I should set this here or just let commit try to
|
|
|
|
// commit any squashed instructions. I like the latter a bit more.
|
|
|
|
inst->setCanCommit();
|
|
|
|
|
|
|
|
// ++iewExecSquashedInsts;
|
|
|
|
exeList.pop();
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
Fault fault = NoFault;
|
|
|
|
|
|
|
|
// Execute instruction.
|
|
|
|
// Note that if the instruction faults, it will be handled
|
|
|
|
// at the commit stage.
|
|
|
|
if (inst->isMemRef() &&
|
|
|
|
(!inst->isDataPrefetch() && !inst->isInstPrefetch())) {
|
|
|
|
DPRINTF(BE, "Execute: Initiating access for memory "
|
|
|
|
"reference.\n");
|
|
|
|
|
|
|
|
if (inst->isLoad()) {
|
|
|
|
LSQ.executeLoad(inst);
|
|
|
|
} else if (inst->isStore()) {
|
2006-09-28 06:14:15 +02:00
|
|
|
Fault fault = LSQ.executeStore(inst);
|
|
|
|
|
|
|
|
if (!inst->isStoreConditional() && fault == NoFault) {
|
|
|
|
inst->setExecuted();
|
|
|
|
|
|
|
|
instToCommit(inst);
|
|
|
|
} else if (fault != NoFault) {
|
|
|
|
// If the instruction faulted, then we need to send it along to commit
|
|
|
|
// without the instruction completing.
|
|
|
|
// Send this instruction to commit, also make sure iew stage
|
|
|
|
// realizes there is activity.
|
2006-04-23 01:10:39 +02:00
|
|
|
inst->setExecuted();
|
|
|
|
|
|
|
|
instToCommit(inst);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
panic("Unknown mem type!");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
inst->execute();
|
|
|
|
|
|
|
|
inst->setExecuted();
|
|
|
|
|
|
|
|
instToCommit(inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
updateExeInstStats(inst);
|
|
|
|
|
|
|
|
++funcExeInst;
|
|
|
|
++num_executed;
|
|
|
|
|
|
|
|
exeList.pop();
|
|
|
|
|
|
|
|
if (inst->mispredicted()) {
|
|
|
|
squashDueToBranch(inst);
|
|
|
|
break;
|
|
|
|
} else if (LSQ.violation()) {
|
|
|
|
// Get the DynInst that caused the violation. Note that this
|
|
|
|
// clears the violation signal.
|
|
|
|
DynInstPtr violator;
|
|
|
|
violator = LSQ.getMemDepViolator();
|
|
|
|
|
|
|
|
DPRINTF(BE, "LDSTQ detected a violation. Violator PC: "
|
|
|
|
"%#x, inst PC: %#x. Addr is: %#x.\n",
|
|
|
|
violator->readPC(), inst->readPC(), inst->physEffAddr);
|
|
|
|
|
|
|
|
// Squash.
|
|
|
|
squashDueToMemViolation(inst);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
issuedOps[0]+= num_executed;
|
|
|
|
nIssuedDist[num_executed]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template<class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::instToCommit(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Sending instructions to commit [sn:%lli] PC %#x.\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
if (!inst->isSquashed()) {
|
|
|
|
if (inst->isExecuted()) {
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->setResultReady();
|
2006-04-23 01:10:39 +02:00
|
|
|
int dependents = wakeDependents(inst);
|
|
|
|
if (dependents) {
|
2006-08-02 18:05:34 +02:00
|
|
|
producerInst[0]++;
|
|
|
|
consumerInst[0]+= dependents;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
writeback.push_back(inst);
|
|
|
|
|
|
|
|
numInstsToWB[0]++;
|
|
|
|
|
2006-08-02 18:05:34 +02:00
|
|
|
writebackCount[0]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
2006-08-24 23:45:04 +02:00
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::readyInstsForCommit()
|
|
|
|
{
|
|
|
|
for (int i = numInstsToWB[-latency];
|
|
|
|
!writeback.empty() && i;
|
|
|
|
--i)
|
|
|
|
{
|
|
|
|
DynInstPtr inst = writeback.front();
|
|
|
|
writeback.pop_front();
|
|
|
|
if (!inst->isSquashed()) {
|
|
|
|
DPRINTF(BE, "Writing back instruction [sn:%lli] PC %#x.\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
inst->setCanCommit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-05-23 22:57:14 +02:00
|
|
|
#if 0
|
2006-04-23 01:10:39 +02:00
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::writebackInsts()
|
|
|
|
{
|
|
|
|
int wb_width = wbWidth;
|
|
|
|
// Using this method I'm not quite sure how to prevent an
|
|
|
|
// instruction from waking its own dependents multiple times,
|
|
|
|
// without the guarantee that commit always has enough bandwidth
|
|
|
|
// to accept all instructions being written back. This guarantee
|
|
|
|
// might not be too unrealistic.
|
|
|
|
InstListIt wb_inst_it = writeback.begin();
|
|
|
|
InstListIt wb_end_it = writeback.end();
|
|
|
|
int inst_num = 0;
|
|
|
|
int consumer_insts = 0;
|
|
|
|
|
|
|
|
for (; inst_num < wb_width &&
|
|
|
|
wb_inst_it != wb_end_it; inst_num++) {
|
|
|
|
DynInstPtr inst = (*wb_inst_it);
|
|
|
|
|
|
|
|
// Some instructions will be sent to commit without having
|
|
|
|
// executed because they need commit to handle them.
|
|
|
|
// E.g. Uncached loads have not actually executed when they
|
|
|
|
// are first sent to commit. Instead commit must tell the LSQ
|
|
|
|
// when it's ready to execute the uncached load.
|
|
|
|
if (!inst->isSquashed()) {
|
|
|
|
DPRINTF(BE, "Writing back instruction [sn:%lli] PC %#x.\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
inst->setCanCommit();
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->setResultReady();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
if (inst->isExecuted()) {
|
|
|
|
int dependents = wakeDependents(inst);
|
|
|
|
if (dependents) {
|
|
|
|
producer_inst[0]++;
|
|
|
|
consumer_insts+= dependents;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
writeback.erase(wb_inst_it++);
|
|
|
|
}
|
|
|
|
LSQ.writebackStores();
|
|
|
|
consumer_inst[0]+= consumer_insts;
|
|
|
|
writeback_count[0]+= inst_num;
|
|
|
|
}
|
2006-05-23 22:57:14 +02:00
|
|
|
#endif
|
2006-04-23 01:10:39 +02:00
|
|
|
template <class Impl>
|
|
|
|
bool
|
|
|
|
LWBackEnd<Impl>::commitInst(int inst_num)
|
|
|
|
{
|
|
|
|
// Read instruction from the head of the ROB
|
|
|
|
DynInstPtr inst = instList.back();
|
|
|
|
|
|
|
|
// Make sure instruction is valid
|
|
|
|
assert(inst);
|
|
|
|
|
|
|
|
if (!inst->readyToCommit())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
DPRINTF(BE, "Trying to commit instruction [sn:%lli] PC:%#x\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
thread->setPC(inst->readPC());
|
|
|
|
thread->setNextPC(inst->readNextPC());
|
2006-06-23 05:33:26 +02:00
|
|
|
inst->setAtCommit();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
// If the instruction is not executed yet, then it is a non-speculative
|
|
|
|
// or store inst. Signal backwards that it should be executed.
|
|
|
|
if (!inst->isExecuted()) {
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (inst->isNonSpeculative() ||
|
2006-09-28 06:14:15 +02:00
|
|
|
(inst->isStoreConditional() && inst->getFault() == NoFault) ||
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->isMemBarrier() ||
|
|
|
|
inst->isWriteBarrier()) {
|
2006-04-23 01:10:39 +02:00
|
|
|
#if !FULL_SYSTEM
|
|
|
|
// Hack to make sure syscalls aren't executed until all stores
|
|
|
|
// write back their data. This direct communication shouldn't
|
|
|
|
// be used for anything other than this.
|
|
|
|
if (inst_num > 0 || LSQ.hasStoresToWB())
|
|
|
|
#else
|
|
|
|
if ((inst->isMemBarrier() || inst->isWriteBarrier() ||
|
|
|
|
inst->isQuiesce()) &&
|
|
|
|
LSQ.hasStoresToWB())
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
DPRINTF(BE, "Waiting for all stores to writeback.\n");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
DPRINTF(BE, "Encountered a store or non-speculative "
|
|
|
|
"instruction at the head of the ROB, PC %#x.\n",
|
|
|
|
inst->readPC());
|
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (inst->isMemBarrier() || inst->isWriteBarrier()) {
|
|
|
|
DPRINTF(BE, "Waking dependents on barrier [sn:%lli]\n",
|
|
|
|
inst->seqNum);
|
|
|
|
assert(memBarrier);
|
|
|
|
wakeDependents(inst, true);
|
|
|
|
if (memBarrier == inst)
|
|
|
|
memBarrier = NULL;
|
|
|
|
inst->clearMemDependents();
|
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
// Send back the non-speculative instruction's sequence number.
|
|
|
|
if (inst->iqItValid) {
|
|
|
|
DPRINTF(BE, "Removing instruction from waiting list\n");
|
|
|
|
waitingList.erase(inst->iqIt);
|
|
|
|
inst->iqItValid = false;
|
|
|
|
waitingInsts--;
|
|
|
|
assert(waitingInsts >= 0);
|
|
|
|
if (inst->isStore())
|
|
|
|
removeWaitingMemOp(inst);
|
|
|
|
}
|
|
|
|
|
|
|
|
exeList.push(inst);
|
|
|
|
|
|
|
|
// Change the instruction so it won't try to commit again until
|
|
|
|
// it is executed.
|
|
|
|
inst->clearCanCommit();
|
|
|
|
|
|
|
|
// ++commitNonSpecStalls;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
} else if (inst->isLoad()) {
|
|
|
|
DPRINTF(BE, "[sn:%lli]: Uncached load, PC %#x.\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
|
|
|
|
|
|
|
// Send back the non-speculative instruction's sequence
|
|
|
|
// number. Maybe just tell the lsq to re-execute the load.
|
|
|
|
|
|
|
|
// Send back the non-speculative instruction's sequence number.
|
|
|
|
if (inst->iqItValid) {
|
|
|
|
DPRINTF(BE, "Removing instruction from waiting list\n");
|
|
|
|
waitingList.erase(inst->iqIt);
|
|
|
|
inst->iqItValid = false;
|
|
|
|
waitingInsts--;
|
|
|
|
assert(waitingInsts >= 0);
|
|
|
|
removeWaitingMemOp(inst);
|
|
|
|
}
|
|
|
|
replayMemInst(inst);
|
|
|
|
|
|
|
|
inst->clearCanCommit();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
panic("Trying to commit un-executed instruction "
|
|
|
|
"of unknown type!\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
// Not handled for now.
|
|
|
|
assert(!inst->isThreadSync());
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
assert(inst->memDepReady());
|
|
|
|
// Stores will mark themselves as totally completed as they need
|
|
|
|
// to wait to writeback to memory. @todo: Hack...attempt to fix
|
|
|
|
// having the checker be forced to wait until a store completes in
|
|
|
|
// order to check all of the instructions. If the store at the
|
|
|
|
// head of the check list misses, but a later store hits, then
|
|
|
|
// loads in the checker may see the younger store values instead
|
|
|
|
// of the store they should see. Either the checker needs its own
|
|
|
|
// memory (annoying to update), its own store buffer (how to tell
|
|
|
|
// which value is correct?), or something else...
|
|
|
|
if (!inst->isStore()) {
|
|
|
|
inst->setCompleted();
|
|
|
|
}
|
2006-04-23 01:10:39 +02:00
|
|
|
// Check if the instruction caused a fault. If so, trap.
|
|
|
|
Fault inst_fault = inst->getFault();
|
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Use checker prior to updating anything due to traps or PC
|
|
|
|
// based events.
|
2006-06-23 05:33:26 +02:00
|
|
|
#if USE_CHECKER
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
if (checker) {
|
2006-06-23 05:33:26 +02:00
|
|
|
checker->verify(inst);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
}
|
2006-06-23 05:33:26 +02:00
|
|
|
#endif
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
if (inst_fault != NoFault) {
|
2006-04-24 23:10:06 +02:00
|
|
|
DPRINTF(BE, "Inst [sn:%lli] PC %#x has a fault\n",
|
|
|
|
inst->seqNum, inst->readPC());
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
|
|
|
// Instruction is completed as it has a fault.
|
|
|
|
inst->setCompleted();
|
|
|
|
|
|
|
|
if (LSQ.hasStoresToWB()) {
|
|
|
|
DPRINTF(BE, "Stores still in flight, will wait until drained.\n");
|
|
|
|
return false;
|
|
|
|
} else if (inst_num != 0) {
|
|
|
|
DPRINTF(BE, "Will wait until instruction is head of commit group.\n");
|
|
|
|
return false;
|
|
|
|
}
|
2006-06-23 05:33:26 +02:00
|
|
|
#if USE_CHECKER
|
|
|
|
else if (checker && inst->isStore()) {
|
|
|
|
checker->verify(inst);
|
|
|
|
}
|
|
|
|
#endif
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
handleFault(inst_fault);
|
|
|
|
return false;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int freed_regs = 0;
|
|
|
|
|
|
|
|
for (int i = 0; i < inst->numDestRegs(); ++i) {
|
|
|
|
DPRINTF(BE, "Commit rename map setting reg %i to [sn:%lli]\n",
|
|
|
|
(int)inst->destRegIdx(i), inst->seqNum);
|
|
|
|
thread->renameTable[inst->destRegIdx(i)] = inst;
|
|
|
|
++freed_regs;
|
|
|
|
}
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
#if FULL_SYSTEM
|
|
|
|
if (thread->profile) {
|
|
|
|
// bool usermode =
|
2007-03-07 21:04:31 +01:00
|
|
|
// (xc->readMiscRegNoEffect(AlphaISA::IPR_DTB_CM) & 0x18) != 0;
|
2006-08-24 23:45:04 +02:00
|
|
|
// thread->profilePC = usermode ? 1 : inst->readPC();
|
|
|
|
thread->profilePC = inst->readPC();
|
2006-10-02 17:58:09 +02:00
|
|
|
ProfileNode *node = thread->profile->consume(thread->getTC(),
|
2006-08-24 23:45:04 +02:00
|
|
|
inst->staticInst);
|
|
|
|
|
|
|
|
if (node)
|
|
|
|
thread->profileNode = node;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
if (inst->traceData) {
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
inst->traceData->setFetchSeq(inst->seqNum);
|
|
|
|
inst->traceData->setCPSeq(thread->numInst);
|
2006-04-23 01:10:39 +02:00
|
|
|
inst->traceData->finalize();
|
|
|
|
inst->traceData = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
inst->clearDependents();
|
|
|
|
|
|
|
|
frontEnd->addFreeRegs(freed_regs);
|
|
|
|
|
|
|
|
instList.pop_back();
|
|
|
|
|
|
|
|
--numInsts;
|
|
|
|
++thread->funcExeInst;
|
2006-05-23 22:57:14 +02:00
|
|
|
// Maybe move this to where the fault is handled; if the fault is
|
|
|
|
// handled, don't try to set this myself as the fault will set it.
|
|
|
|
// If not, then I set thread->PC = thread->nextPC and
|
|
|
|
// thread->nextPC = thread->nextPC + 4.
|
2006-04-23 01:10:39 +02:00
|
|
|
thread->setPC(thread->readNextPC());
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
thread->setNextPC(thread->readNextPC() + sizeof(TheISA::MachInst));
|
2006-04-23 01:10:39 +02:00
|
|
|
updateComInstStats(inst);
|
|
|
|
|
|
|
|
// Write the done sequence number here.
|
|
|
|
toIEW->doneSeqNum = inst->seqNum;
|
2011-01-08 06:50:29 +01:00
|
|
|
lastCommitCycle = curTick();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
#if FULL_SYSTEM
|
|
|
|
int count = 0;
|
|
|
|
Addr oldpc;
|
|
|
|
do {
|
|
|
|
if (count == 0)
|
|
|
|
assert(!thread->inSyscall && !thread->trapPending);
|
|
|
|
oldpc = thread->readPC();
|
|
|
|
cpu->system->pcEventQueue.service(
|
2006-06-23 05:33:26 +02:00
|
|
|
thread->getTC());
|
2006-04-23 01:10:39 +02:00
|
|
|
count++;
|
|
|
|
} while (oldpc != thread->readPC());
|
|
|
|
if (count > 1) {
|
|
|
|
DPRINTF(BE, "PC skip function event, stopping commit\n");
|
2006-06-06 23:32:21 +02:00
|
|
|
tcSquash = true;
|
2006-04-23 01:10:39 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::commitInsts()
|
|
|
|
{
|
|
|
|
// Not sure this should be a loop or not.
|
|
|
|
int inst_num = 0;
|
2006-04-24 23:10:06 +02:00
|
|
|
while (!instList.empty() && inst_num < commitWidth) {
|
2006-04-23 01:10:39 +02:00
|
|
|
if (instList.back()->isSquashed()) {
|
|
|
|
instList.back()->clearDependents();
|
2006-08-24 23:45:04 +02:00
|
|
|
ROBSquashedInsts[instList.back()->threadNumber]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
instList.pop_back();
|
|
|
|
--numInsts;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!commitInst(inst_num++)) {
|
|
|
|
DPRINTF(BE, "Can't commit, Instruction [sn:%lli] PC "
|
|
|
|
"%#x is head of ROB and not ready\n",
|
|
|
|
instList.back()->seqNum, instList.back()->readPC());
|
2006-04-24 23:10:06 +02:00
|
|
|
--inst_num;
|
2006-04-23 01:10:39 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2006-08-02 18:05:34 +02:00
|
|
|
nCommittedDist.sample(inst_num);
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::squash(const InstSeqNum &sn)
|
|
|
|
{
|
|
|
|
LSQ.squash(sn);
|
|
|
|
|
|
|
|
int freed_regs = 0;
|
2006-08-24 23:45:04 +02:00
|
|
|
InstListIt insts_end_it = waitingList.end();
|
2006-04-23 01:10:39 +02:00
|
|
|
InstListIt insts_it = waitingList.begin();
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
while (insts_it != insts_end_it && (*insts_it)->seqNum > sn)
|
2006-04-23 01:10:39 +02:00
|
|
|
{
|
|
|
|
if ((*insts_it)->isSquashed()) {
|
|
|
|
++insts_it;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
DPRINTF(BE, "Squashing instruction on waitingList PC %#x, [sn:%lli].\n",
|
|
|
|
(*insts_it)->readPC(),
|
|
|
|
(*insts_it)->seqNum);
|
|
|
|
|
|
|
|
if ((*insts_it)->isMemRef()) {
|
|
|
|
DPRINTF(BE, "Squashing a waiting mem op [sn:%lli]\n",
|
|
|
|
(*insts_it)->seqNum);
|
|
|
|
removeWaitingMemOp((*insts_it));
|
|
|
|
}
|
|
|
|
|
|
|
|
waitingList.erase(insts_it++);
|
|
|
|
waitingInsts--;
|
|
|
|
}
|
|
|
|
assert(waitingInsts >= 0);
|
|
|
|
|
|
|
|
insts_it = instList.begin();
|
|
|
|
|
|
|
|
while (!instList.empty() && (*insts_it)->seqNum > sn)
|
|
|
|
{
|
|
|
|
if ((*insts_it)->isSquashed()) {
|
2006-08-24 23:45:04 +02:00
|
|
|
panic("Instruction should not be already squashed and on list!");
|
2006-04-23 01:10:39 +02:00
|
|
|
++insts_it;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
DPRINTF(BE, "Squashing instruction on inst list PC %#x, [sn:%lli].\n",
|
|
|
|
(*insts_it)->readPC(),
|
|
|
|
(*insts_it)->seqNum);
|
|
|
|
|
|
|
|
// Mark the instruction as squashed, and ready to commit so that
|
|
|
|
// it can drain out of the pipeline.
|
|
|
|
(*insts_it)->setSquashed();
|
|
|
|
|
|
|
|
(*insts_it)->setCanCommit();
|
|
|
|
|
2006-06-23 05:33:26 +02:00
|
|
|
(*insts_it)->clearInROB();
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
for (int i = 0; i < (*insts_it)->numDestRegs(); ++i) {
|
|
|
|
DynInstPtr prev_dest = (*insts_it)->getPrevDestInst(i);
|
|
|
|
DPRINTF(BE, "Commit rename map setting reg %i to [sn:%lli]\n",
|
|
|
|
(int)(*insts_it)->destRegIdx(i), prev_dest->seqNum);
|
|
|
|
renameTable[(*insts_it)->destRegIdx(i)] = prev_dest;
|
|
|
|
++freed_regs;
|
|
|
|
}
|
|
|
|
|
|
|
|
(*insts_it)->clearDependents();
|
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
squashedInsts[(*insts_it)->threadNumber]++;
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
instList.erase(insts_it++);
|
|
|
|
--numInsts;
|
|
|
|
}
|
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
while (memBarrier && memBarrier->seqNum > sn) {
|
2006-05-23 22:57:14 +02:00
|
|
|
DPRINTF(BE, "[sn:%lli] Memory barrier squashed (or previously "
|
|
|
|
"squashed)\n", memBarrier->seqNum);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
memBarrier->clearMemDependents();
|
|
|
|
if (memBarrier->memDepReady()) {
|
|
|
|
DPRINTF(BE, "No previous barrier\n");
|
|
|
|
memBarrier = NULL;
|
|
|
|
} else {
|
|
|
|
std::list<DynInstPtr> &srcs = memBarrier->getMemSrcs();
|
|
|
|
memBarrier = srcs.front();
|
|
|
|
srcs.pop_front();
|
|
|
|
assert(srcs.empty());
|
|
|
|
DPRINTF(BE, "Previous barrier: [sn:%lli]\n",
|
|
|
|
memBarrier->seqNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-24 23:45:04 +02:00
|
|
|
insts_it = replayList.begin();
|
|
|
|
insts_end_it = replayList.end();
|
|
|
|
while (!replayList.empty() && insts_it != insts_end_it) {
|
|
|
|
if ((*insts_it)->seqNum < sn) {
|
|
|
|
++insts_it;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
assert((*insts_it)->isSquashed());
|
|
|
|
|
|
|
|
replayList.erase(insts_it++);
|
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
frontEnd->addFreeRegs(freed_regs);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
2006-06-06 23:32:21 +02:00
|
|
|
LWBackEnd<Impl>::squashFromTC()
|
2006-04-23 01:10:39 +02:00
|
|
|
{
|
|
|
|
InstSeqNum squashed_inst = robEmpty() ? 0 : instList.back()->seqNum - 1;
|
|
|
|
squash(squashed_inst);
|
|
|
|
frontEnd->squash(squashed_inst, thread->readPC(),
|
|
|
|
false, false);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
frontEnd->interruptPending = false;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
thread->trapPending = false;
|
|
|
|
thread->inSyscall = false;
|
2006-06-06 23:32:21 +02:00
|
|
|
tcSquash = false;
|
2006-04-23 01:10:39 +02:00
|
|
|
commitStatus = Running;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::squashFromTrap()
|
|
|
|
{
|
|
|
|
InstSeqNum squashed_inst = robEmpty() ? 0 : instList.back()->seqNum - 1;
|
|
|
|
squash(squashed_inst);
|
|
|
|
frontEnd->squash(squashed_inst, thread->readPC(),
|
|
|
|
false, false);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
frontEnd->interruptPending = false;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
thread->trapPending = false;
|
|
|
|
thread->inSyscall = false;
|
|
|
|
trapSquash = false;
|
|
|
|
commitStatus = Running;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::squashDueToBranch(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
// Update the branch predictor state I guess
|
|
|
|
DPRINTF(BE, "Squashing due to branch [sn:%lli], will restart at PC %#x\n",
|
|
|
|
inst->seqNum, inst->readNextPC());
|
|
|
|
squash(inst->seqNum);
|
|
|
|
frontEnd->squash(inst->seqNum, inst->readNextPC(),
|
|
|
|
true, inst->mispredicted());
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::squashDueToMemViolation(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
// Update the branch predictor state I guess
|
|
|
|
DPRINTF(BE, "Squashing due to violation [sn:%lli], will restart at PC %#x\n",
|
|
|
|
inst->seqNum, inst->readNextPC());
|
|
|
|
squash(inst->seqNum);
|
|
|
|
frontEnd->squash(inst->seqNum, inst->readNextPC(),
|
|
|
|
false, inst->mispredicted());
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::squashDueToMemBlocked(DynInstPtr &inst)
|
|
|
|
{
|
|
|
|
DPRINTF(IEW, "Memory blocked, squashing load and younger insts, "
|
|
|
|
"PC: %#x [sn:%i].\n", inst->readPC(), inst->seqNum);
|
|
|
|
|
|
|
|
squash(inst->seqNum - 1);
|
|
|
|
frontEnd->squash(inst->seqNum - 1, inst->readPC());
|
|
|
|
}
|
|
|
|
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::switchOut()
|
2006-05-16 20:09:04 +02:00
|
|
|
{
|
|
|
|
switchPending = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::doSwitchOut()
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
{
|
|
|
|
switchedOut = true;
|
2006-05-16 20:09:04 +02:00
|
|
|
switchPending = false;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// Need to get rid of all committed, non-speculative state and write it
|
2006-06-06 23:32:21 +02:00
|
|
|
// to memory/TC. In this case this is stores that have committed and not
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
// yet written back.
|
2006-05-16 20:09:04 +02:00
|
|
|
assert(robEmpty());
|
|
|
|
assert(!LSQ.hasStoresToWB());
|
2006-08-24 23:45:04 +02:00
|
|
|
writeback.clear();
|
|
|
|
for (int i = 0; i < numInstsToWB.getSize() + 1; ++i)
|
|
|
|
numInstsToWB.advance();
|
|
|
|
|
|
|
|
// squash(0);
|
|
|
|
assert(waitingList.empty());
|
|
|
|
assert(instList.empty());
|
|
|
|
assert(replayList.empty());
|
|
|
|
assert(writeback.empty());
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
LSQ.switchOut();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
2006-06-23 05:33:26 +02:00
|
|
|
LWBackEnd<Impl>::takeOverFrom(ThreadContext *old_tc)
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
{
|
2006-08-24 23:45:04 +02:00
|
|
|
assert(!squashPending);
|
|
|
|
squashSeqNum = 0;
|
|
|
|
squashNextPC = 0;
|
2006-06-23 05:33:26 +02:00
|
|
|
tcSquash = false;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
trapSquash = false;
|
|
|
|
|
|
|
|
numInsts = 0;
|
|
|
|
numWaitingMemOps = 0;
|
|
|
|
waitingMemOps.clear();
|
|
|
|
waitingInsts = 0;
|
|
|
|
switchedOut = false;
|
|
|
|
dispatchStatus = Running;
|
|
|
|
commitStatus = Running;
|
2006-06-23 05:33:26 +02:00
|
|
|
LSQ.takeOverFrom(old_tc);
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
}
|
|
|
|
|
2006-04-23 01:10:39 +02:00
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::updateExeInstStats(DynInstPtr &inst)
|
|
|
|
{
|
2009-05-26 18:23:13 +02:00
|
|
|
ThreadID tid = inst->threadNumber;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Pick off the software prefetches
|
|
|
|
//
|
|
|
|
#ifdef TARGET_ALPHA
|
|
|
|
if (inst->isDataPrefetch())
|
2009-05-26 18:23:13 +02:00
|
|
|
exeSwp[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
else
|
2009-05-26 18:23:13 +02:00
|
|
|
exeInst[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
#else
|
2009-05-26 18:23:13 +02:00
|
|
|
exeInst[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Control operations
|
|
|
|
//
|
|
|
|
if (inst->isControl())
|
2009-05-26 18:23:13 +02:00
|
|
|
exeBranches[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Memory operations
|
|
|
|
//
|
|
|
|
if (inst->isMemRef()) {
|
2009-05-26 18:23:13 +02:00
|
|
|
exeRefs[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
if (inst->isLoad())
|
2009-05-26 18:23:13 +02:00
|
|
|
exeLoads[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::updateComInstStats(DynInstPtr &inst)
|
|
|
|
{
|
2009-05-26 18:23:13 +02:00
|
|
|
ThreadID tid = inst->threadNumber;
|
Fixes for ozone CPU to successfully boot and run linux.
cpu/base_dyn_inst.hh:
Remove snoop function (did not mean to commit it).
cpu/ozone/back_end_impl.hh:
Set instruction as having its result ready, not completed.
cpu/ozone/cpu.hh:
Fixes for store conditionals. Use an additional lock addr list to make sure that the access is valid. I don't know if this is fully necessary, but it gives me a peace of mind (at some performance cost).
Make sure to schedule for cycles(1) and not just 1 cycle in the future as tick = 1ps.
Also support the new Checker.
cpu/ozone/cpu_builder.cc:
Add parameter for maxOutstandingMemOps so it can be set through the config.
Also add in the checker. Right now it's a BaseCPU simobject, but that may change in the future.
cpu/ozone/cpu_impl.hh:
Add support for the checker. For now there's a dynamic cast to convert the simobject passed back from the builder to the proper Checker type. It's ugly, but only happens at startup, and is probably a justified use of dynamic cast.
Support switching out/taking over from other CPUs.
Correct indexing problem for float registers.
cpu/ozone/dyn_inst.hh:
Add ability for instructions to wait on memory instructions in addition to source register instructions. This is needed for memory dependence predictors and memory barriers.
cpu/ozone/dyn_inst_impl.hh:
Support waiting on memory operations.
Use "resultReady" to differentiate an instruction having its registers produced vs being totally completed.
cpu/ozone/front_end.hh:
Support switching out.
Also record if an interrupt is pending.
cpu/ozone/front_end_impl.hh:
Support switching out. Also support stalling the front end if an interrupt is pending.
cpu/ozone/lw_back_end.hh:
Add checker in.
Support switching out.
Support memory barriers.
cpu/ozone/lw_back_end_impl.hh:
Lots of changes to get things to work right.
Faults, traps, interrupts all wait until all stores have written back (important).
Memory barriers are supported, as is the general ability for instructions to be dependent on other memory instructions.
cpu/ozone/lw_lsq.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
cpu/ozone/lw_lsq_impl.hh:
Support switching out.
Also use store writeback events in all cases, not just dcache misses.
Support the checker CPU. Marks instructions as completed once the functional access is done (which has to be done for the checker to be able to verify results).
cpu/ozone/simple_params.hh:
Add max outstanding mem ops parameter.
python/m5/objects/OzoneCPU.py:
Add max outstanding mem ops, checker.
--HG--
extra : convert_revision : f4d408e1bb1f25836a097b6abe3856111e950c59
2006-05-12 01:18:36 +02:00
|
|
|
|
|
|
|
// keep an instruction count
|
|
|
|
thread->numInst++;
|
|
|
|
thread->numInsts++;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
2006-04-24 23:10:06 +02:00
|
|
|
cpu->numInst++;
|
2006-04-23 01:10:39 +02:00
|
|
|
//
|
|
|
|
// Pick off the software prefetches
|
|
|
|
//
|
|
|
|
#ifdef TARGET_ALPHA
|
|
|
|
if (inst->isDataPrefetch()) {
|
2006-08-02 18:05:34 +02:00
|
|
|
statComSwp[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
} else {
|
2006-08-02 18:05:34 +02:00
|
|
|
statComInst[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
#else
|
2006-08-02 18:05:34 +02:00
|
|
|
statComInst[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Control Instructions
|
|
|
|
//
|
|
|
|
if (inst->isControl())
|
2006-08-02 18:05:34 +02:00
|
|
|
statComBranches[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Memory references
|
|
|
|
//
|
|
|
|
if (inst->isMemRef()) {
|
2006-08-02 18:05:34 +02:00
|
|
|
statComRefs[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
|
|
|
|
if (inst->isLoad()) {
|
2006-08-02 18:05:34 +02:00
|
|
|
statComLoads[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (inst->isMemBarrier()) {
|
2006-08-02 18:05:34 +02:00
|
|
|
statComMembars[tid]++;
|
2006-04-23 01:10:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Impl>
|
|
|
|
void
|
|
|
|
LWBackEnd<Impl>::dumpInsts()
|
|
|
|
{
|
|
|
|
int num = 0;
|
|
|
|
int valid_num = 0;
|
|
|
|
|
|
|
|
InstListIt inst_list_it = --(instList.end());
|
|
|
|
|
|
|
|
cprintf("ExeList size: %i\n", exeList.size());
|
|
|
|
|
|
|
|
cprintf("Inst list size: %i\n", instList.size());
|
|
|
|
|
|
|
|
while (inst_list_it != instList.end())
|
2006-08-24 23:45:04 +02:00
|
|
|
{
|
|
|
|
cprintf("Instruction:%i\n",
|
|
|
|
num);
|
|
|
|
if (!(*inst_list_it)->isSquashed()) {
|
|
|
|
if (!(*inst_list_it)->isIssued()) {
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
} else if ((*inst_list_it)->isMemRef() &&
|
|
|
|
!(*inst_list_it)->memOpDone) {
|
|
|
|
// Loads that have not been marked as executed still count
|
|
|
|
// towards the total instructions.
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("PC:%#x\n[sn:%lli]\n[tid:%i]\n"
|
|
|
|
"Issued:%i\nSquashed:%i\n",
|
|
|
|
(*inst_list_it)->readPC(),
|
|
|
|
(*inst_list_it)->seqNum,
|
|
|
|
(*inst_list_it)->threadNumber,
|
|
|
|
(*inst_list_it)->isIssued(),
|
|
|
|
(*inst_list_it)->isSquashed());
|
|
|
|
|
|
|
|
if ((*inst_list_it)->isMemRef()) {
|
|
|
|
cprintf("MemOpDone:%i\n", (*inst_list_it)->memOpDone);
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("\n");
|
|
|
|
|
|
|
|
inst_list_it--;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
|
|
|
|
inst_list_it = --(writeback.end());
|
|
|
|
|
|
|
|
cprintf("Writeback list size: %i\n", writeback.size());
|
|
|
|
|
|
|
|
while (inst_list_it != writeback.end())
|
2006-04-23 01:10:39 +02:00
|
|
|
{
|
|
|
|
cprintf("Instruction:%i\n",
|
|
|
|
num);
|
|
|
|
if (!(*inst_list_it)->isSquashed()) {
|
|
|
|
if (!(*inst_list_it)->isIssued()) {
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
} else if ((*inst_list_it)->isMemRef() &&
|
|
|
|
!(*inst_list_it)->memOpDone) {
|
|
|
|
// Loads that have not been marked as executed still count
|
|
|
|
// towards the total instructions.
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("PC:%#x\n[sn:%lli]\n[tid:%i]\n"
|
|
|
|
"Issued:%i\nSquashed:%i\n",
|
|
|
|
(*inst_list_it)->readPC(),
|
|
|
|
(*inst_list_it)->seqNum,
|
|
|
|
(*inst_list_it)->threadNumber,
|
|
|
|
(*inst_list_it)->isIssued(),
|
|
|
|
(*inst_list_it)->isSquashed());
|
|
|
|
|
|
|
|
if ((*inst_list_it)->isMemRef()) {
|
|
|
|
cprintf("MemOpDone:%i\n", (*inst_list_it)->memOpDone);
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("\n");
|
|
|
|
|
|
|
|
inst_list_it--;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("Waiting list size: %i\n", waitingList.size());
|
|
|
|
|
|
|
|
inst_list_it = --(waitingList.end());
|
|
|
|
|
|
|
|
while (inst_list_it != waitingList.end())
|
|
|
|
{
|
|
|
|
cprintf("Instruction:%i\n",
|
|
|
|
num);
|
|
|
|
if (!(*inst_list_it)->isSquashed()) {
|
|
|
|
if (!(*inst_list_it)->isIssued()) {
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
} else if ((*inst_list_it)->isMemRef() &&
|
|
|
|
!(*inst_list_it)->memOpDone) {
|
|
|
|
// Loads that have not been marked as executed still count
|
|
|
|
// towards the total instructions.
|
|
|
|
++valid_num;
|
|
|
|
cprintf("Count:%i\n", valid_num);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("PC:%#x\n[sn:%lli]\n[tid:%i]\n"
|
|
|
|
"Issued:%i\nSquashed:%i\n",
|
|
|
|
(*inst_list_it)->readPC(),
|
|
|
|
(*inst_list_it)->seqNum,
|
|
|
|
(*inst_list_it)->threadNumber,
|
|
|
|
(*inst_list_it)->isIssued(),
|
|
|
|
(*inst_list_it)->isSquashed());
|
|
|
|
|
|
|
|
if ((*inst_list_it)->isMemRef()) {
|
|
|
|
cprintf("MemOpDone:%i\n", (*inst_list_it)->memOpDone);
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("\n");
|
|
|
|
|
|
|
|
inst_list_it--;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
|
|
|
|
cprintf("waitingMemOps list size: %i\n", waitingMemOps.size());
|
|
|
|
|
|
|
|
MemIt waiting_it = waitingMemOps.begin();
|
|
|
|
|
|
|
|
while (waiting_it != waitingMemOps.end())
|
|
|
|
{
|
|
|
|
cprintf("[sn:%lli] ", (*waiting_it));
|
|
|
|
waiting_it++;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
cprintf("\n");
|
|
|
|
}
|