packet_queue.cc (11195:6f8b2a005abb) packet_queue.cc (11207:7b7e352f8d7f)
1/*
2 * Copyright (c) 2012,2015 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

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

43
44#include "base/trace.hh"
45#include "debug/Drain.hh"
46#include "debug/PacketQueue.hh"
47#include "mem/packet_queue.hh"
48
49using namespace std;
50
1/*
2 * Copyright (c) 2012,2015 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

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

43
44#include "base/trace.hh"
45#include "debug/Drain.hh"
46#include "debug/PacketQueue.hh"
47#include "mem/packet_queue.hh"
48
49using namespace std;
50
51PacketQueue::PacketQueue(EventManager& _em, const std::string& _label)
52 : em(_em), sendEvent(this), label(_label),
53 waitingOnRetry(false)
51PacketQueue::PacketQueue(EventManager& _em, const std::string& _label,
52 bool disable_sanity_check)
53 : em(_em), sendEvent(this), _disableSanityCheck(disable_sanity_check),
54 label(_label), waitingOnRetry(false)
54{
55}
56
57PacketQueue::~PacketQueue()
58{
59}
60
61void

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

109 // we can still send a packet before the end of this tick
110 assert(when >= curTick());
111
112 // express snoops should never be queued
113 assert(!pkt->isExpressSnoop());
114
115 // add a very basic sanity check on the port to ensure the
116 // invisible buffer is not growing beyond reasonable limits
55{
56}
57
58PacketQueue::~PacketQueue()
59{
60}
61
62void

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

110 // we can still send a packet before the end of this tick
111 assert(when >= curTick());
112
113 // express snoops should never be queued
114 assert(!pkt->isExpressSnoop());
115
116 // add a very basic sanity check on the port to ensure the
117 // invisible buffer is not growing beyond reasonable limits
117 if (transmitList.size() > 100) {
118 if (!_disableSanityCheck && transmitList.size() > 100) {
118 panic("Packet queue %s has grown beyond 100 packets\n",
119 name());
120 }
121
122 // nothing on the list
123 if (transmitList.empty()) {
124 transmitList.emplace_front(when, pkt);
125 schedSendEvent(when);

--- 146 unchanged lines hidden ---
119 panic("Packet queue %s has grown beyond 100 packets\n",
120 name());
121 }
122
123 // nothing on the list
124 if (transmitList.empty()) {
125 transmitList.emplace_front(when, pkt);
126 schedSendEvent(when);

--- 146 unchanged lines hidden ---