diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-11-19 17:43:03 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-11-19 17:43:03 -0500 |
commit | a2113fd3dc85798c7dcc1d67691ffd29a86ef5a0 (patch) | |
tree | eb2a28bb316c4748a156bccae6dada417afa4495 /src/cpu/simple_thread.cc | |
parent | a00e13b1fe1f7f552bbb4623c4a4638f69e42000 (diff) | |
download | gem5-a2113fd3dc85798c7dcc1d67691ffd29a86ef5a0.tar.xz |
Update Virtual and Physical ports.
src/cpu/o3/alpha/cpu_impl.hh:
Handle the PhysicalPort and VirtualPort in the ThreadState.
src/cpu/o3/cpu.cc:
Initialize the thread context.
src/cpu/o3/thread_context.hh:
Add new function to initialize thread context.
src/cpu/o3/thread_context_impl.hh:
Use code now put into function.
src/cpu/simple_thread.cc:
Move code to ThreadState and use the new helper function.
src/cpu/simple_thread.hh:
Remove init() in this derived class; use init() from ThreadState base class.
src/cpu/thread_state.cc:
Move setting up of Physical and Virtual ports here. Change getMemFuncPort() to connectToMemFunc(), which connects a port to a functional port of the memory object below the CPU.
src/cpu/thread_state.hh:
Update functions.
--HG--
extra : convert_revision : ff254715ef0b259dc80d08f13543b63e4024ca8d
Diffstat (limited to 'src/cpu/simple_thread.cc')
-rw-r--r-- | src/cpu/simple_thread.cc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index e07d6e7c1..13d0e2e29 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -104,25 +104,6 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, #endif -#if FULL_SYSTEM -void -SimpleThread::init() -{ - Port *mem_port; - physPort = new FunctionalPort(csprintf("%s-%d-funcport", - cpu->name(), tid)); - mem_port = getMemFuncPort(); - mem_port->setPeer(physPort); - physPort->setPeer(mem_port); - - virtPort = new VirtualPort(csprintf("%s-%d-vport", - cpu->name(), tid)); - mem_port = getMemFuncPort(); - mem_port->setPeer(virtPort); - virtPort->setPeer(mem_port); -} -#endif - SimpleThread::SimpleThread() #if FULL_SYSTEM : ThreadState(NULL, -1, -1) @@ -316,10 +297,7 @@ SimpleThread::getVirtPort(ThreadContext *src_tc) return virtPort; VirtualPort *vp = new VirtualPort("tc-vport", src_tc); - Port *mem_port = getMemFuncPort(); - - mem_port->setPeer(vp); - vp->setPeer(mem_port); + connectToMemFunc(vp); return vp; } |