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