Deleted Added
sdiff udiff text old ( 12748:ae5ce8e42de7 ) new ( 12749:223c83ed9979 )
full compact
1/*
2 * Copyright (c) 2016 Georgia Institute of Technology
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;

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

124{
125 numPacketsSent = 0;
126}
127
128
129void
130GarnetSyntheticTraffic::completeRequest(PacketPtr pkt)
131{
132 RequestPtr req = pkt->req;
133
134 DPRINTF(GarnetSyntheticTraffic,
135 "Completed injection of %s packet for address %x\n",
136 pkt->isWrite() ? "write" : "read\n",
137 req->getPaddr());
138
139 assert(pkt->isResponse());
140 noResponseCycles = 0;
141 delete req;
142 delete pkt;
143}
144
145
146void
147GarnetSyntheticTraffic::tick()
148{
149 if (++noResponseCycles >= responseLimit) {

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

291 {
292 // randomly inject in any vnet
293 injReqType = random_mt.random(0, 2);
294 }
295
296 if (injReqType == 0) {
297 // generate packet for virtual network 0
298 requestType = MemCmd::ReadReq;
299 req = new Request(paddr, access_size, flags, masterId);
300 } else if (injReqType == 1) {
301 // generate packet for virtual network 1
302 requestType = MemCmd::ReadReq;
303 flags.set(Request::INST_FETCH);
304 req = new Request(0, 0x0, access_size, flags, masterId, 0x0, 0);
305 req->setPaddr(paddr);
306 } else { // if (injReqType == 2)
307 // generate packet for virtual network 2
308 requestType = MemCmd::WriteReq;
309 req = new Request(paddr, access_size, flags, masterId);
310 }
311
312 req->setContext(id);
313
314 //No need to do functional simulation
315 //We just do timing simulation of the network
316
317 DPRINTF(GarnetSyntheticTraffic,

--- 43 unchanged lines hidden ---