bridge.cc (13784:1941dc118243) | bridge.cc (13892:0182a0601f66) |
---|---|
1/* 2 * Copyright (c) 2011-2013, 2015 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 --- 63 unchanged lines hidden (view full) --- 72 Cycles _delay, int _req_limit) 73 : MasterPort(_name, &_bridge), bridge(_bridge), slavePort(_slavePort), 74 delay(_delay), reqQueueLimit(_req_limit), 75 sendEvent([this]{ trySendTiming(); }, _name) 76{ 77} 78 79Bridge::Bridge(Params *p) | 1/* 2 * Copyright (c) 2011-2013, 2015 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 --- 63 unchanged lines hidden (view full) --- 72 Cycles _delay, int _req_limit) 73 : MasterPort(_name, &_bridge), bridge(_bridge), slavePort(_slavePort), 74 delay(_delay), reqQueueLimit(_req_limit), 75 sendEvent([this]{ trySendTiming(); }, _name) 76{ 77} 78 79Bridge::Bridge(Params *p) |
80 : MemObject(p), | 80 : ClockedObject(p), |
81 slavePort(p->name + ".slave", *this, masterPort, 82 ticksToCycles(p->delay), p->resp_size, p->ranges), 83 masterPort(p->name + ".master", *this, slavePort, 84 ticksToCycles(p->delay), p->req_size) 85{ 86} 87 88Port & 89Bridge::getPort(const std::string &if_name, PortID idx) 90{ 91 if (if_name == "master") 92 return masterPort; 93 else if (if_name == "slave") 94 return slavePort; 95 else 96 // pass it along to our super class | 81 slavePort(p->name + ".slave", *this, masterPort, 82 ticksToCycles(p->delay), p->resp_size, p->ranges), 83 masterPort(p->name + ".master", *this, slavePort, 84 ticksToCycles(p->delay), p->req_size) 85{ 86} 87 88Port & 89Bridge::getPort(const std::string &if_name, PortID idx) 90{ 91 if (if_name == "master") 92 return masterPort; 93 else if (if_name == "slave") 94 return slavePort; 95 else 96 // pass it along to our super class |
97 return MemObject::getPort(if_name, idx); | 97 return ClockedObject::getPort(if_name, idx); |
98} 99 100void 101Bridge::init() 102{ 103 // make sure both sides are connected and have the same block size 104 if (!slavePort.isConnected() || !masterPort.isConnected()) 105 fatal("Both ports of a bridge must be connected.\n"); --- 295 unchanged lines hidden --- | 98} 99 100void 101Bridge::init() 102{ 103 // make sure both sides are connected and have the same block size 104 if (!slavePort.isConnected() || !masterPort.isConnected()) 105 fatal("Both ports of a bridge must be connected.\n"); --- 295 unchanged lines hidden --- |