1/* 2 * Copyright (c) 2012 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 --- 37 unchanged lines hidden (view full) --- 46 * @file 47 * Port object definitions. 48 */ 49#include "base/trace.hh" 50#include "mem/mem_object.hh" 51#include "mem/port.hh" 52 53Port::Port(const std::string &_name, MemObject& _owner, PortID _id) |
54 : portName(_name), id(_id), owner(_owner) |
55{ 56} 57 58Port::~Port() 59{ 60} 61 62/** --- 18 unchanged lines hidden (view full) --- 81 return *_slavePort; 82} 83 84void 85MasterPort::bind(SlavePort& slave_port) 86{ 87 // master port keeps track of the slave port 88 _slavePort = &slave_port; |
89 90 // slave port also keeps track of master port 91 _slavePort->bind(*this); 92} 93 94bool 95MasterPort::isConnected() const 96{ --- 30 unchanged lines hidden (view full) --- 127bool 128MasterPort::sendTimingSnoopResp(PacketPtr pkt) 129{ 130 assert(pkt->isResponse()); 131 return _slavePort->recvTimingSnoopResp(pkt); 132} 133 134void |
135MasterPort::sendRetry() 136{ 137 _slavePort->recvRetry(); 138} 139 140void |
141MasterPort::printAddr(Addr a) 142{ 143 Request req(a, 1, 0, Request::funcMasterId); 144 Packet pkt(&req, MemCmd::PrintReq); 145 Packet::PrintReqState prs(std::cerr); 146 pkt.senderState = &prs; 147 148 sendFunctional(&pkt); --- 10 unchanged lines hidden (view full) --- 159SlavePort::~SlavePort() 160{ 161} 162 163void 164SlavePort::bind(MasterPort& master_port) 165{ 166 _masterPort = &master_port; |
167} 168 169MasterPort& 170SlavePort::getMasterPort() const 171{ 172 if (_masterPort == NULL) 173 panic("Cannot getMasterPort on slave port %s that is not connected\n", 174 name()); --- 35 unchanged lines hidden (view full) --- 210} 211 212void 213SlavePort::sendTimingSnoopReq(PacketPtr pkt) 214{ 215 assert(pkt->isRequest()); 216 _masterPort->recvTimingSnoopReq(pkt); 217} |
218 219void 220SlavePort::sendRetry() 221{ 222 _masterPort->recvRetry(); 223} |