GarnetSyntheticTraffic.cc (13784:1941dc118243) | GarnetSyntheticTraffic.cc (13892:0182a0601f66) |
---|---|
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; --- 26 unchanged lines hidden (view full) --- 35#include <set> 36#include <string> 37#include <vector> 38 39#include "base/logging.hh" 40#include "base/random.hh" 41#include "base/statistics.hh" 42#include "debug/GarnetSyntheticTraffic.hh" | 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; --- 26 unchanged lines hidden (view full) --- 35#include <set> 36#include <string> 37#include <vector> 38 39#include "base/logging.hh" 40#include "base/random.hh" 41#include "base/statistics.hh" 42#include "debug/GarnetSyntheticTraffic.hh" |
43#include "mem/mem_object.hh" | |
44#include "mem/packet.hh" 45#include "mem/port.hh" 46#include "mem/request.hh" 47#include "sim/sim_events.hh" 48#include "sim/stats.hh" 49#include "sim/system.hh" 50 51using namespace std; --- 18 unchanged lines hidden (view full) --- 70{ 71 if (!cachePort.sendTimingReq(pkt)) { 72 retryPkt = pkt; // RubyPort will retry sending 73 } 74 numPacketsSent++; 75} 76 77GarnetSyntheticTraffic::GarnetSyntheticTraffic(const Params *p) | 43#include "mem/packet.hh" 44#include "mem/port.hh" 45#include "mem/request.hh" 46#include "sim/sim_events.hh" 47#include "sim/stats.hh" 48#include "sim/system.hh" 49 50using namespace std; --- 18 unchanged lines hidden (view full) --- 69{ 70 if (!cachePort.sendTimingReq(pkt)) { 71 retryPkt = pkt; // RubyPort will retry sending 72 } 73 numPacketsSent++; 74} 75 76GarnetSyntheticTraffic::GarnetSyntheticTraffic(const Params *p) |
78 : MemObject(p), | 77 : ClockedObject(p), |
79 tickEvent([this]{ tick(); }, "GarnetSyntheticTraffic tick", 80 false, Event::CPU_Tick_Pri), 81 cachePort("GarnetSyntheticTraffic", this), 82 retryPkt(NULL), 83 size(p->memory_size), 84 blockSizeBits(p->block_offset), 85 numDestinations(p->num_dest), 86 simCycles(p->sim_cycles), --- 24 unchanged lines hidden (view full) --- 111} 112 113Port & 114GarnetSyntheticTraffic::getPort(const std::string &if_name, PortID idx) 115{ 116 if (if_name == "test") 117 return cachePort; 118 else | 78 tickEvent([this]{ tick(); }, "GarnetSyntheticTraffic tick", 79 false, Event::CPU_Tick_Pri), 80 cachePort("GarnetSyntheticTraffic", this), 81 retryPkt(NULL), 82 size(p->memory_size), 83 blockSizeBits(p->block_offset), 84 numDestinations(p->num_dest), 85 simCycles(p->sim_cycles), --- 24 unchanged lines hidden (view full) --- 110} 111 112Port & 113GarnetSyntheticTraffic::getPort(const std::string &if_name, PortID idx) 114{ 115 if (if_name == "test") 116 return cachePort; 117 else |
119 return MemObject::getPort(if_name, idx); | 118 return ClockedObject::getPort(if_name, idx); |
120} 121 122void 123GarnetSyntheticTraffic::init() 124{ 125 numPacketsSent = 0; 126} 127 --- 231 unchanged lines hidden --- | 119} 120 121void 122GarnetSyntheticTraffic::init() 123{ 124 numPacketsSent = 0; 125} 126 --- 231 unchanged lines hidden --- |