base.cc (5336:c7e21f4e5a2e) | base.cc (5476:758c2413765a) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 337 unchanged lines hidden (view full) --- 346 347 if (profileEvent) 348 profileEvent->schedule(curTick); 349#endif 350 351 // Connect new CPU to old CPU's memory only if new CPU isn't 352 // connected to anything. Also connect old CPU's memory to new 353 // CPU. | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 337 unchanged lines hidden (view full) --- 346 347 if (profileEvent) 348 profileEvent->schedule(curTick); 349#endif 350 351 // Connect new CPU to old CPU's memory only if new CPU isn't 352 // connected to anything. Also connect old CPU's memory to new 353 // CPU. |
354 Port *peer; 355 if (ic->getPeer() == NULL || ic->getPeer()->isDefaultPort()) { 356 peer = oldCPU->getPort("icache_port")->getPeer(); | 354 if (!ic->isConnected()) { 355 Port *peer = oldCPU->getPort("icache_port")->getPeer(); |
357 ic->setPeer(peer); | 356 ic->setPeer(peer); |
358 } else { 359 peer = ic->getPeer(); | 357 peer->setPeer(ic); |
360 } | 358 } |
361 peer->setPeer(ic); | |
362 | 359 |
363 if (dc->getPeer() == NULL || dc->getPeer()->isDefaultPort()) { 364 peer = oldCPU->getPort("dcache_port")->getPeer(); | 360 if (!dc->isConnected()) { 361 Port *peer = oldCPU->getPort("dcache_port")->getPeer(); |
365 dc->setPeer(peer); | 362 dc->setPeer(peer); |
366 } else { 367 peer = dc->getPeer(); | 363 peer->setPeer(dc); |
368 } | 364 } |
369 peer->setPeer(dc); | |
370} 371 372 373#if FULL_SYSTEM 374BaseCPU::ProfileEvent::ProfileEvent(BaseCPU *_cpu, int _interval) 375 : Event(&mainEventQueue), cpu(_cpu), interval(_interval) 376{ } 377 --- 77 unchanged lines hidden --- | 365} 366 367 368#if FULL_SYSTEM 369BaseCPU::ProfileEvent::ProfileEvent(BaseCPU *_cpu, int _interval) 370 : Event(&mainEventQueue), cpu(_cpu), interval(_interval) 371{ } 372 --- 77 unchanged lines hidden --- |