1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 27 unchanged lines hidden (view full) --- 36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 */ 41 42#include "cpu/testers/rubytest/RubyTester.hh" 43#include "debug/Config.hh" |
44#include "debug/Drain.hh" |
45#include "debug/Ruby.hh" 46#include "mem/protocol/AccessPermission.hh" 47#include "mem/ruby/slicc_interface/AbstractController.hh" 48#include "mem/ruby/system/RubyPort.hh" 49#include "sim/system.hh" 50 51RubyPort::RubyPort(const Params *p) 52 : MemObject(p), m_version(p->version), m_controller(NULL), --- 467 unchanged lines hidden (view full) --- 520} 521 522void 523RubyPort::testDrainComplete() 524{ 525 //If we weren't able to drain before, we might be able to now. 526 if (drainEvent != NULL) { 527 unsigned int drainCount = getDrainCount(drainEvent); |
528 DPRINTF(Drain, "Drain count: %u\n", drainCount); |
529 if (drainCount == 0) { |
530 DPRINTF(Drain, "RubyPort done draining, processing drain event\n"); |
531 drainEvent->process(); 532 // Clear the drain event once we're done with it. 533 drainEvent = NULL; 534 } 535 } 536} 537 538unsigned int --- 42 unchanged lines hidden (view full) --- 581 } 582 583 int count = getDrainCount(de); 584 585 // Set status 586 if (count != 0) { 587 drainEvent = de; 588 |
589 DPRINTF(Drain, "RubyPort not drained\n"); |
590 changeState(SimObject::Draining); 591 return count; 592 } 593 594 changeState(SimObject::Drained); 595 return 0; 596} 597 --- 111 unchanged lines hidden --- |