From 2952c34096357dffc207778ea1b73e71387ac010 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Mon, 16 Apr 2007 11:31:54 -0400 Subject: Fixes for splash, may conflict with Korey's SMT work and doesn't support 03cpu yet. src/cpu/simple/base.cc: Cpu's should start as unallocated, not suspended src/cpu/simple_thread.cc: Wait for a thread to be assigned to activate the cpu src/kern/tru64/tru64.hh: When looking for a open cpu to assign threads, look for an unallocated one, not a suspended one. --HG-- extra : convert_revision : 5e3ad2e96b4a715ed38293ceaccff5b9f4ea7985 --- src/cpu/simple/base.cc | 2 +- src/cpu/simple_thread.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index 877dc5bd4..4fed2059b 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -79,7 +79,7 @@ BaseSimpleCPU::BaseSimpleCPU(Params *p) /* asid */ 0); #endif // !FULL_SYSTEM - thread->setStatus(ThreadContext::Suspended); + thread->setStatus(ThreadContext::Unallocated); tc = thread->getTC(); diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 39f31782b..191ae2f2e 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -221,10 +221,10 @@ SimpleThread::activate(int delay) lastActivate = curTick; - if (status() == ThreadContext::Unallocated) { - cpu->activateWhenReady(tid); - return; - } +// if (status() == ThreadContext::Unallocated) { +// cpu->activateWhenReady(tid); +// return; +// } _status = ThreadContext::Active; -- cgit v1.2.3 From 53ba34391ff7b82dd143c7cce0d31bf56882d5ae Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Sat, 21 Apr 2007 19:11:38 -0400 Subject: fixes for solaris compile --HG-- extra : convert_revision : c82a62a61650e3700d237da917c453e5a9676320 --- src/cpu/o3/lsq_unit.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh index f24de20d9..cc33e025d 100644 --- a/src/cpu/o3/lsq_unit.hh +++ b/src/cpu/o3/lsq_unit.hh @@ -33,6 +33,7 @@ #define __CPU_O3_LSQ_UNIT_HH__ #include +#include #include #include @@ -292,7 +293,7 @@ class LSQUnit { : inst(NULL), req(NULL), size(0), canWB(0), committed(0), completed(0) { - bzero(data, sizeof(data)); + std::memset(data, 0, sizeof(data)); } /** Constructs a store queue entry for a given instruction. */ @@ -300,7 +301,7 @@ class LSQUnit { : inst(_inst), req(NULL), size(0), canWB(0), committed(0), completed(0) { - bzero(data, sizeof(data)); + std::memset(data, 0, sizeof(data)); } /** The store instruction. */ -- cgit v1.2.3 From 8c7a6e1654bc682677b0e48764183198c2c7e868 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Sun, 22 Apr 2007 15:11:54 -0400 Subject: Use proper cycles for IPC and CPI equations. src/cpu/o3/cpu.cc: Use proper cycles for these equations. --HG-- extra : convert_revision : cd49410eed978c789d788e80462abed6cb89fbae --- src/cpu/o3/cpu.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 2e6a43f9c..a775b66d5 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -384,25 +384,25 @@ FullO3CPU::fullCPURegStats() .name(name() + ".cpi") .desc("CPI: Cycles Per Instruction") .precision(6); - cpi = simTicks / committedInsts; + cpi = numCycles / committedInsts; totalCpi .name(name() + ".cpi_total") .desc("CPI: Total CPI of All Threads") .precision(6); - totalCpi = simTicks / totalCommittedInsts; + totalCpi = numCycles / totalCommittedInsts; ipc .name(name() + ".ipc") .desc("IPC: Instructions Per Cycle") .precision(6); - ipc = committedInsts / simTicks; + ipc = committedInsts / numCycles; totalIpc .name(name() + ".ipc_total") .desc("IPC: Total IPC of All Threads") .precision(6); - totalIpc = totalCommittedInsts / simTicks; + totalIpc = totalCommittedInsts / numCycles; } -- cgit v1.2.3 From 15cc194d714ce9c3f5fe706487534ed447847d88 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Thu, 26 Apr 2007 00:02:37 -0400 Subject: Remove unnecessary check. --HG-- extra : convert_revision : 8cc2943ebc41e4d430789ee7923dd0dc878be06b --- src/cpu/o3/commit_impl.hh | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh index 65625065d..dd4c333d3 100644 --- a/src/cpu/o3/commit_impl.hh +++ b/src/cpu/o3/commit_impl.hh @@ -641,9 +641,6 @@ DefaultCommit::handleInterrupt() // an interrupt needed to be handled. DPRINTF(Commit, "Interrupt detected.\n"); - Fault new_interrupt = cpu->getInterrupts(); - assert(new_interrupt != NoFault); - // Clear the interrupt now that it's going to be handled toIEW->commitInfo[0].clearInterrupt = true; -- cgit v1.2.3 From 092951e2b1daab7049608b35b723f318d2fac948 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Thu, 26 Apr 2007 00:07:42 -0400 Subject: Remove extra delete that was causing segfault. --HG-- extra : convert_revision : 8a27ed80308c95988f3bc43d670dc0ac9e946d39 --- src/cpu/o3/lsq_unit_impl.hh | 1 - 1 file changed, 1 deletion(-) (limited to 'src/cpu') diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 44e2cea76..bde4f8079 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -680,7 +680,6 @@ LSQUnit::writebackStores() inst->seqNum); WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this); wb->schedule(curTick + 1); - delete state; completeStore(storeWBIdx); incrStIdx(storeWBIdx); continue; -- cgit v1.2.3 From a38c79ec22918b02c529c930827e64e440984d29 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 7 May 2007 18:58:38 -0400 Subject: the bridge never returns false when recvTiming() is called on its ports now, it always returns true and nacks the packet if there isn't sufficient buffer space fix the timing cpu to handle receiving a nacked packet src/cpu/simple/timing.cc: make the timing cpu handle receiving a nacked packet src/mem/bridge.cc: src/mem/bridge.hh: the bridge never returns false when recvTiming() is called on its ports now, it always returns true and nacks the packet if there isn't sufficient buffer space --HG-- extra : convert_revision : 5e12d0cf6ce985a5f72bcb7ce26c83a76c34c50a --- src/cpu/simple/timing.cc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 45da7c3eb..fa7bb4f86 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -574,10 +574,16 @@ TimingSimpleCPU::IcachePort::recvTiming(PacketPtr pkt) return true; } - else { - //Snooping a Coherence Request, do nothing - return true; + else if (pkt->result == Packet::Nacked) { + assert(cpu->_status == IcacheWaitResponse); + pkt->reinitNacked(); + if (!sendTiming(pkt)) { + cpu->_status = IcacheRetry; + cpu->ifetch_pkt = pkt; + } } + //Snooping a Coherence Request, do nothing + return true; } void @@ -663,10 +669,16 @@ TimingSimpleCPU::DcachePort::recvTiming(PacketPtr pkt) return true; } - else { - //Snooping a coherence req, do nothing - return true; + else if (pkt->result == Packet::Nacked) { + assert(cpu->_status == DcacheWaitResponse); + pkt->reinitNacked(); + if (!sendTiming(pkt)) { + cpu->_status = DcacheRetry; + cpu->dcache_pkt = pkt; + } } + //Snooping a Coherence Request, do nothing + return true; } void -- cgit v1.2.3 From 37b45e3c8cb2aef57e1d5dd8efd46705b8d46c16 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Wed, 9 May 2007 15:37:46 -0400 Subject: fix the translating ports so it can add a page on a fault --HG-- extra : convert_revision : 56f6f2cbf4e92b7f2dd8c9453831fab86d83ef80 --- src/cpu/thread_state.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc index 4b65ca4b8..be8f822f2 100644 --- a/src/cpu/thread_state.cc +++ b/src/cpu/thread_state.cc @@ -169,9 +169,8 @@ ThreadState::getMemPort() return port; /* Use this port to for syscall emulation writes to memory. */ - port = new TranslatingPort(csprintf("%s-%d-funcport", - baseCpu->name(), tid), - process->pTable, false); + port = new TranslatingPort(csprintf("%s-%d-funcport", baseCpu->name(), tid), + process, TranslatingPort::NextPage); connectToMemFunc(port); -- cgit v1.2.3