addr_mapper.cc (11284:b3926db25371) addr_mapper.cc (13784:1941dc118243)
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

--- 39 unchanged lines hidden (view full) ---

48
49void
50AddrMapper::init()
51{
52 if (!slavePort.isConnected() || !masterPort.isConnected())
53 fatal("Address mapper is not connected on both sides.\n");
54}
55
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

--- 39 unchanged lines hidden (view full) ---

48
49void
50AddrMapper::init()
51{
52 if (!slavePort.isConnected() || !masterPort.isConnected())
53 fatal("Address mapper is not connected on both sides.\n");
54}
55
56BaseMasterPort&
57AddrMapper::getMasterPort(const std::string& if_name, PortID idx)
56Port &
57AddrMapper::getPort(const std::string &if_name, PortID idx)
58{
59 if (if_name == "master") {
60 return masterPort;
58{
59 if (if_name == "master") {
60 return masterPort;
61 } else {
62 return MemObject::getMasterPort(if_name, idx);
63 }
64}
65
66BaseSlavePort&
67AddrMapper::getSlavePort(const std::string& if_name, PortID idx)
68{
69 if (if_name == "slave") {
61 } else if (if_name == "slave") {
70 return slavePort;
71 } else {
62 return slavePort;
63 } else {
72 return MemObject::getSlavePort(if_name, idx);
64 return MemObject::getPort(if_name, idx);
73 }
74}
75
76void
77AddrMapper::recvFunctional(PacketPtr pkt)
78{
79 Addr orig_addr = pkt->getAddr();
80 pkt->setAddr(remapAddr(orig_addr));

--- 176 unchanged lines hidden ---
65 }
66}
67
68void
69AddrMapper::recvFunctional(PacketPtr pkt)
70{
71 Addr orig_addr = pkt->getAddr();
72 pkt->setAddr(remapAddr(orig_addr));

--- 176 unchanged lines hidden ---