Deleted Added
sdiff udiff text old ( 13784:1941dc118243 ) new ( 13892:0182a0601f66 )
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;

--- 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)
78 : MemObject(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
119 return MemObject::getPort(if_name, idx);
120}
121
122void
123GarnetSyntheticTraffic::init()
124{
125 numPacketsSent = 0;
126}
127

--- 231 unchanged lines hidden ---