base.hh (14197:26cca0c29be6) base.hh (14198:9c2f67392409)
1/*
2 * Copyright (c) 2011-2013, 2017 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

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

153 public:
154
155 /**
156 * Purely virtual method that returns a reference to the data
157 * port. All subclasses must implement this method.
158 *
159 * @return a reference to the data port
160 */
1/*
2 * Copyright (c) 2011-2013, 2017 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

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

153 public:
154
155 /**
156 * Purely virtual method that returns a reference to the data
157 * port. All subclasses must implement this method.
158 *
159 * @return a reference to the data port
160 */
161 virtual MasterPort &getDataPort() = 0;
161 virtual Port &getDataPort() = 0;
162
163 /**
164 * Returns a sendFunctional delegate for use with port proxies.
165 */
166 virtual PortProxy::SendFunctionalFunc
167 getSendFunctional()
168 {
162
163 /**
164 * Returns a sendFunctional delegate for use with port proxies.
165 */
166 virtual PortProxy::SendFunctionalFunc
167 getSendFunctional()
168 {
169 MasterPort &port = getDataPort();
170 return [&port](PacketPtr pkt)->void { port.sendFunctional(pkt); };
169 auto port = dynamic_cast<MasterPort *>(&getDataPort());
170 assert(port);
171 return [port](PacketPtr pkt)->void { port->sendFunctional(pkt); };
171 }
172
173 /**
174 * Purely virtual method that returns a reference to the instruction
175 * port. All subclasses must implement this method.
176 *
177 * @return a reference to the instruction port
178 */
172 }
173
174 /**
175 * Purely virtual method that returns a reference to the instruction
176 * port. All subclasses must implement this method.
177 *
178 * @return a reference to the instruction port
179 */
179 virtual MasterPort &getInstPort() = 0;
180 virtual Port &getInstPort() = 0;
180
181 /** Reads this CPU's ID. */
182 int cpuId() const { return _cpuId; }
183
184 /** Reads this CPU's Socket ID. */
185 uint32_t socketId() const { return _socketId; }
186
187 /** Reads this CPU's unique data requestor ID */

--- 476 unchanged lines hidden ---
181
182 /** Reads this CPU's ID. */
183 int cpuId() const { return _cpuId; }
184
185 /** Reads this CPU's Socket ID. */
186 uint32_t socketId() const { return _socketId; }
187
188 /** Reads this CPU's unique data requestor ID */

--- 476 unchanged lines hidden ---