Merge zizzer:/bk/newmem
into zower.eecs.umich.edu:/eecshome/m5/newmem
src/cpu/o3/commit_impl.hh:
Hand Merge
--HG--
extra : convert_revision : 6984db90d5b5ec71c31f1c345f5a77eed540059e
This commit is contained in:
@@ -333,6 +333,7 @@ makeEnv('fast', '.fo', strip = True,
|
||||
# Profiled binary
|
||||
makeEnv('prof', '.po',
|
||||
CCFLAGS = Split('-O3 -g -pg'),
|
||||
CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
|
||||
LINKFLAGS = '-pg')
|
||||
|
||||
Return('envList')
|
||||
|
||||
@@ -733,7 +733,6 @@ DefaultCommit<Impl>::commit()
|
||||
|
||||
if (!squash_bdelay_slot)
|
||||
bdelay_done_seq_num++;
|
||||
|
||||
#endif
|
||||
|
||||
if (fromIEW->includeSquashInst[tid] == true) {
|
||||
|
||||
@@ -497,8 +497,6 @@ FullO3CPU<Impl>::init()
|
||||
}
|
||||
|
||||
#if FULL_SYSTEM
|
||||
src_tc->init();
|
||||
|
||||
TheISA::initCPU(src_tc, src_tc->readCpuId());
|
||||
#endif
|
||||
}
|
||||
@@ -554,6 +552,12 @@ template <class Impl>
|
||||
void
|
||||
FullO3CPU<Impl>::activateContext(int tid, int delay)
|
||||
{
|
||||
#if FULL_SYSTEM
|
||||
// Connect the ThreadContext's memory ports (Functional/Virtual
|
||||
// Ports)
|
||||
threadContexts[tid]->connectMemPorts();
|
||||
#endif
|
||||
|
||||
// Needs to set each stage to running as well.
|
||||
if (delay){
|
||||
DPRINTF(O3CPU, "[tid:%i]: Scheduling thread context to activate "
|
||||
|
||||
@@ -1139,6 +1139,8 @@ DefaultFetch<Impl>::fetch(bool &status_change)
|
||||
ext_inst = TheISA::makeExtMI(inst, fetch_PC);
|
||||
#elif THE_ISA == SPARC_ISA
|
||||
ext_inst = TheISA::makeExtMI(inst, cpu->thread[tid]->getTC());
|
||||
#elif THE_ISA == MIPS_ISA
|
||||
ext_inst = TheISA::makeExtMI(inst, cpu->thread[tid]->getTC());
|
||||
#endif
|
||||
|
||||
// Create a new DynInst from the instruction fetched.
|
||||
|
||||
@@ -92,7 +92,7 @@ class O3ThreadContext : public ThreadContext
|
||||
|
||||
void delVirtPort(VirtualPort *vp);
|
||||
|
||||
virtual void init() { thread->init(); }
|
||||
virtual void connectMemPorts() { thread->connectMemPorts(); }
|
||||
#else
|
||||
virtual TranslatingPort *getMemPort() { return thread->getMemPort(); }
|
||||
|
||||
|
||||
@@ -102,8 +102,10 @@ template <class Impl>
|
||||
void
|
||||
O3ThreadContext<Impl>::delVirtPort(VirtualPort *vp)
|
||||
{
|
||||
delete vp->getPeer();
|
||||
delete vp;
|
||||
if (vp != thread->getVirtPort()) {
|
||||
delete vp->getPeer();
|
||||
delete vp;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -77,9 +77,6 @@ AtomicSimpleCPU::init()
|
||||
for (int i = 0; i < threadContexts.size(); ++i) {
|
||||
ThreadContext *tc = threadContexts[i];
|
||||
|
||||
// initialize the mem pointers
|
||||
tc->init();
|
||||
|
||||
// initialize CPU, including PC
|
||||
TheISA::initCPU(tc, tc->readCpuId());
|
||||
}
|
||||
@@ -240,6 +237,13 @@ AtomicSimpleCPU::activateContext(int thread_num, int delay)
|
||||
assert(!tickEvent.scheduled());
|
||||
|
||||
notIdleFraction++;
|
||||
|
||||
#if FULL_SYSTEM
|
||||
// Connect the ThreadContext's memory ports (Functional/Virtual
|
||||
// Ports)
|
||||
tc->connectMemPorts();
|
||||
#endif
|
||||
|
||||
//Make sure ticks are still on multiples of cycles
|
||||
tickEvent.schedule(nextCycle(curTick + cycles(delay)));
|
||||
_status = Running;
|
||||
|
||||
@@ -59,9 +59,6 @@ TimingSimpleCPU::init()
|
||||
for (int i = 0; i < threadContexts.size(); ++i) {
|
||||
ThreadContext *tc = threadContexts[i];
|
||||
|
||||
// initialize the mem pointers
|
||||
tc->init();
|
||||
|
||||
// initialize CPU, including PC
|
||||
TheISA::initCPU(tc, tc->readCpuId());
|
||||
}
|
||||
@@ -241,6 +238,13 @@ TimingSimpleCPU::activateContext(int thread_num, int delay)
|
||||
|
||||
notIdleFraction++;
|
||||
_status = Running;
|
||||
|
||||
#if FULL_SYSTEM
|
||||
// Connect the ThreadContext's memory ports (Functional/Virtual
|
||||
// Ports)
|
||||
tc->connectMemPorts();
|
||||
#endif
|
||||
|
||||
// kick things off by initiating the fetch of the next instruction
|
||||
fetchEvent =
|
||||
new EventWrapper<TimingSimpleCPU, &TimingSimpleCPU::fetch>(this, false);
|
||||
|
||||
@@ -134,7 +134,7 @@ class ThreadContext
|
||||
|
||||
virtual void delVirtPort(VirtualPort *vp) = 0;
|
||||
|
||||
virtual void init() = 0;
|
||||
virtual void connectMemPorts() = 0;
|
||||
#else
|
||||
virtual TranslatingPort *getMemPort() = 0;
|
||||
|
||||
@@ -308,7 +308,7 @@ class ProxyThreadContext : public ThreadContext
|
||||
|
||||
void delVirtPort(VirtualPort *vp) { return actualTC->delVirtPort(vp); }
|
||||
|
||||
void init() {actualTC->init(); }
|
||||
void connectMemPorts() { actualTC->connectMemPorts(); }
|
||||
#else
|
||||
TranslatingPort *getMemPort() { return actualTC->getMemPort(); }
|
||||
|
||||
|
||||
@@ -113,23 +113,29 @@ ThreadState::unserialize(Checkpoint *cp, const std::string §ion)
|
||||
|
||||
#if FULL_SYSTEM
|
||||
void
|
||||
ThreadState::init()
|
||||
ThreadState::connectMemPorts()
|
||||
{
|
||||
initPhysPort();
|
||||
initVirtPort();
|
||||
connectPhysPort();
|
||||
connectVirtPort();
|
||||
}
|
||||
|
||||
void
|
||||
ThreadState::initPhysPort()
|
||||
ThreadState::connectPhysPort()
|
||||
{
|
||||
// @todo: For now this disregards any older port that may have
|
||||
// already existed. Fix this memory leak once the bus port IDs
|
||||
// for functional ports is resolved.
|
||||
physPort = new FunctionalPort(csprintf("%s-%d-funcport",
|
||||
baseCpu->name(), tid));
|
||||
connectToMemFunc(physPort);
|
||||
}
|
||||
|
||||
void
|
||||
ThreadState::initVirtPort()
|
||||
ThreadState::connectVirtPort()
|
||||
{
|
||||
// @todo: For now this disregards any older port that may have
|
||||
// already existed. Fix this memory leak once the bus port IDs
|
||||
// for functional ports is resolved.
|
||||
virtPort = new VirtualPort(csprintf("%s-%d-vport",
|
||||
baseCpu->name(), tid));
|
||||
connectToMemFunc(virtPort);
|
||||
|
||||
@@ -91,11 +91,11 @@ struct ThreadState {
|
||||
Tick readLastSuspend() { return lastSuspend; }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
void init();
|
||||
void connectMemPorts();
|
||||
|
||||
void initPhysPort();
|
||||
void connectPhysPort();
|
||||
|
||||
void initVirtPort();
|
||||
void connectVirtPort();
|
||||
|
||||
void dumpFuncProfile();
|
||||
|
||||
|
||||
4
src/mem/cache/coherence/uni_coherence.cc
vendored
4
src/mem/cache/coherence/uni_coherence.cc
vendored
@@ -94,10 +94,6 @@ UniCoherence::handleBusRequest(PacketPtr &pkt, CacheBlk *blk, MSHR *mshr,
|
||||
bool
|
||||
UniCoherence::propogateInvalidate(PacketPtr pkt, bool isTiming)
|
||||
{
|
||||
//Make sure we don't snoop a write
|
||||
//we are expecting writeInvalidates on the snoop port of a uni-coherent cache
|
||||
assert(!(!pkt->isInvalidate() && pkt->isWrite()));
|
||||
|
||||
if (pkt->isInvalidate()) {
|
||||
/* Temp Fix for now, forward all invalidates up as functional accesses */
|
||||
if (isTiming) {
|
||||
|
||||
Reference in New Issue
Block a user