diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-11-17 22:01:18 -0500 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-11-17 22:01:18 -0500 |
commit | a00e13b1fe1f7f552bbb4623c4a4638f69e42000 (patch) | |
tree | ca711ddb66ffbff105de2defd3c6bf40cfd52aab /src/cpu/simple_thread.cc | |
parent | f028865d351fbeae38230183e58a77bc0ad0cc12 (diff) | |
parent | cd0b65508e3f9d9f72cd834aeccf9fd1f0349351 (diff) | |
download | gem5-a00e13b1fe1f7f552bbb4623c4a4638f69e42000.tar.xz |
Merge zizzer:/bk/newmem
into zazzer.eecs.umich.edu:/z/rdreslin/m5bk/newmemcleanest
--HG--
extra : convert_revision : 1fc55d7d5707bb7c63790aab306ca5ea8ade5fab
Diffstat (limited to 'src/cpu/simple_thread.cc')
-rw-r--r-- | src/cpu/simple_thread.cc | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 1edcbf352..e07d6e7c1 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -91,18 +91,6 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, } else { kernelStats = NULL; } - Port *mem_port; - physPort = new FunctionalPort(csprintf("%s-%d-funcport", - cpu->name(), tid)); - mem_port = system->physmem->getPort("functional"); - mem_port->setPeer(physPort); - physPort->setPeer(mem_port); - - virtPort = new VirtualPort(csprintf("%s-%d-vport", - cpu->name(), tid)); - mem_port = system->physmem->getPort("functional"); - mem_port->setPeer(virtPort); - virtPort->setPeer(mem_port); } #else SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, @@ -116,6 +104,25 @@ 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) |