tport.cc (3403:92c08efc9d53) tport.cc (3450:4dbe91f2b2cf)
1/*
2 * Copyright (c) 2006 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;

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

39
40 while (i != end && !done) {
41 PacketPtr target = i->second;
42 // If the target contains data, and it overlaps the
43 // probed request, need to update data
44 if (target->intersect(pkt))
45 done = fixPacket(pkt, target);
46
1/*
2 * Copyright (c) 2006 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;

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

39
40 while (i != end && !done) {
41 PacketPtr target = i->second;
42 // If the target contains data, and it overlaps the
43 // probed request, need to update data
44 if (target->intersect(pkt))
45 done = fixPacket(pkt, target);
46
47 i++;
47 }
48
49 //Then just do an atomic access and throw away the returned latency
50 if (pkt->result != Packet::Success)
51 recvAtomic(pkt);
52}
53
54bool

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

93 drainEvent->process();
94 drainEvent = NULL;
95 }
96}
97
98void
99SimpleTimingPort::sendTiming(PacketPtr pkt, Tick time)
100{
48 }
49
50 //Then just do an atomic access and throw away the returned latency
51 if (pkt->result != Packet::Success)
52 recvAtomic(pkt);
53}
54
55bool

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

94 drainEvent->process();
95 drainEvent = NULL;
96 }
97}
98
99void
100SimpleTimingPort::sendTiming(PacketPtr pkt, Tick time)
101{
102 // Nothing is on the list: add it and schedule an event
101 if (transmitList.empty()) {
102 assert(!sendEvent.scheduled());
103 sendEvent.schedule(curTick+time);
103 if (transmitList.empty()) {
104 assert(!sendEvent.scheduled());
105 sendEvent.schedule(curTick+time);
106 transmitList.push_back(std::pair<Tick,PacketPtr>(time+curTick,pkt));
107 return;
104 }
108 }
105 transmitList.push_back(std::pair<Tick,PacketPtr>(time+curTick,pkt));
109
110 // something is on the list and this belongs at the end
111 if (time+curTick >= transmitList.back().first) {
112 transmitList.push_back(std::pair<Tick,PacketPtr>(time+curTick,pkt));
113 return;
114 }
115 // Something is on the list and this belongs somewhere else
116 std::list<std::pair<Tick,PacketPtr> >::iterator i = transmitList.begin();
117 std::list<std::pair<Tick,PacketPtr> >::iterator end = transmitList.end();
118 bool done = false;
119
120 while (i != end && !done) {
121 if (time+curTick < i->first)
122 transmitList.insert(i,std::pair<Tick,PacketPtr>(time+curTick,pkt));
123 i++;
124 }
106}
107
108void
109SimpleTimingPort::SendEvent::process()
110{
111 assert(port->transmitList.size());
112 assert(port->transmitList.front().first <= curTick);
113 if (port->Port::sendTiming(port->transmitList.front().second)) {

--- 26 unchanged lines hidden ---
125}
126
127void
128SimpleTimingPort::SendEvent::process()
129{
130 assert(port->transmitList.size());
131 assert(port->transmitList.front().first <= curTick);
132 if (port->Port::sendTiming(port->transmitList.front().second)) {

--- 26 unchanged lines hidden ---