Deleted Added
sdiff udiff text old ( 12811:269967d5b4e4 ) new ( 12812:8f14879aebe1 )
full compact
1/*
2 * Copyright (c) 2012-2013, 2016-2018 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

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

164 transition();
165 } else {
166 assert(curTick() >= nextPacketTick);
167 // get the next packet and try to send it
168 PacketPtr pkt = activeGenerator->getNextPacket();
169
170 // suppress packets that are not destined for a memory, such as
171 // device accesses that could be part of a trace
172 if (system->isMemAddr(pkt->getAddr())) {
173 numPackets++;
174 if (!port.sendTimingReq(pkt)) {
175 retryPkt = pkt;
176 retryPktTick = curTick();
177 }
178 } else {
179 DPRINTF(TrafficGen, "Suppressed packet %s 0x%x\n",
180 pkt->cmdString(), pkt->getAddr());
181
182 ++numSuppressed;
183 if (numSuppressed % 10000)
184 warn("%s suppressed %d packets with non-memory addresses\n",
185 name(), numSuppressed);
186

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

224 nextTransitionTick = MaxTick;
225 assert(!updateEvent.scheduled());
226 }
227}
228
229void
230BaseTrafficGen::scheduleUpdate()
231{
232 // schedule next update event based on either the next execute
233 // tick or the next transition, which ever comes first
234 const Tick nextEventTick = std::min(nextPacketTick, nextTransitionTick);
235 if (nextEventTick == MaxTick)
236 return;
237
238 DPRINTF(TrafficGen, "Next event scheduled at %lld\n", nextEventTick);
239
240 // The next transition tick may be in the past if there was a
241 // retry, so ensure that we don't schedule anything in the past.
242 schedule(updateEvent, std::max(curTick(), nextEventTick));
243}
244

--- 173 unchanged lines hidden ---