base.cc (13784:1941dc118243) | base.cc (13892:0182a0601f66) |
---|---|
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 --- 54 unchanged lines hidden (view full) --- 63#if HAVE_PROTOBUF 64#include "cpu/testers/traffic_gen/trace_gen.hh" 65#endif 66 67 68using namespace std; 69 70BaseTrafficGen::BaseTrafficGen(const BaseTrafficGenParams* p) | 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 --- 54 unchanged lines hidden (view full) --- 63#if HAVE_PROTOBUF 64#include "cpu/testers/traffic_gen/trace_gen.hh" 65#endif 66 67 68using namespace std; 69 70BaseTrafficGen::BaseTrafficGen(const BaseTrafficGenParams* p) |
71 : MemObject(p), | 71 : ClockedObject(p), |
72 system(p->system), 73 elasticReq(p->elastic_req), 74 progressCheck(p->progress_check), 75 noProgressEvent([this]{ noProgress(); }, name()), 76 nextTransitionTick(0), 77 nextPacketTick(0), 78 port(name() + ".port", *this), 79 retryPkt(NULL), --- 9 unchanged lines hidden (view full) --- 89} 90 91Port & 92BaseTrafficGen::getPort(const string &if_name, PortID idx) 93{ 94 if (if_name == "port") { 95 return port; 96 } else { | 72 system(p->system), 73 elasticReq(p->elastic_req), 74 progressCheck(p->progress_check), 75 noProgressEvent([this]{ noProgress(); }, name()), 76 nextTransitionTick(0), 77 nextPacketTick(0), 78 port(name() + ".port", *this), 79 retryPkt(NULL), --- 9 unchanged lines hidden (view full) --- 89} 90 91Port & 92BaseTrafficGen::getPort(const string &if_name, PortID idx) 93{ 94 if (if_name == "port") { 95 return port; 96 } else { |
97 return MemObject::getPort(if_name, idx); | 97 return ClockedObject::getPort(if_name, idx); |
98 } 99} 100 101void 102BaseTrafficGen::init() 103{ | 98 } 99} 100 101void 102BaseTrafficGen::init() 103{ |
104 MemObject::init(); | 104 ClockedObject::init(); |
105 106 if (!port.isConnected()) 107 fatal("The port of %s is not connected!\n", name()); 108} 109 110DrainState 111BaseTrafficGen::drain() 112{ --- 345 unchanged lines hidden --- | 105 106 if (!port.isConnected()) 107 fatal("The port of %s is not connected!\n", name()); 108} 109 110DrainState 111BaseTrafficGen::drain() 112{ --- 345 unchanged lines hidden --- |