RubyPort.cc (9090:e4e22240398f) RubyPort.cc (9152:86c0e6ca5e7c)
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"
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"
44#include "debug/Ruby.hh"
45#include "mem/protocol/AccessPermission.hh"
46#include "mem/ruby/slicc_interface/AbstractController.hh"
47#include "mem/ruby/system/RubyPort.hh"
48#include "sim/system.hh"
49
50RubyPort::RubyPort(const Params *p)
51 : MemObject(p), m_version(p->version), m_controller(NULL),

--- 467 unchanged lines hidden (view full) ---

519}
520
521void
522RubyPort::testDrainComplete()
523{
524 //If we weren't able to drain before, we might be able to now.
525 if (drainEvent != NULL) {
526 unsigned int drainCount = getDrainCount(drainEvent);
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);
527 DPRINTF(Config, "Drain count: %u\n", drainCount);
528 DPRINTF(Drain, "Drain count: %u\n", drainCount);
528 if (drainCount == 0) {
529 if (drainCount == 0) {
530 DPRINTF(Drain, "RubyPort done draining, processing drain event\n");
529 drainEvent->process();
530 // Clear the drain event once we're done with it.
531 drainEvent = NULL;
532 }
533 }
534}
535
536unsigned int

--- 42 unchanged lines hidden (view full) ---

579 }
580
581 int count = getDrainCount(de);
582
583 // Set status
584 if (count != 0) {
585 drainEvent = de;
586
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");
587 changeState(SimObject::Draining);
588 return count;
589 }
590
591 changeState(SimObject::Drained);
592 return 0;
593}
594

--- 111 unchanged lines hidden ---
590 changeState(SimObject::Draining);
591 return count;
592 }
593
594 changeState(SimObject::Drained);
595 return 0;
596}
597

--- 111 unchanged lines hidden ---