#include <interconnect_slave.hh>
Inheritance diagram for InterconnectSlave< MemType >:
Public Member Functions | |
InterconnectSlave (const std::string &name, Interconnect *interconnect, MemType *cache, HierParams *hier) | |
MemAccessResult | access (MemReqPtr &req) |
void | request (Tick time) |
void | respond (MemReqPtr &req, Tick time) |
bool | grantData () |
void | deliver (MemReqPtr &req) |
bool | isMaster () |
std::pair< Addr, int > | getTargetAddr () |
int | getTargetId () |
std::string | getCacheName () |
virtual bool | inRange (Addr addr) |
Classes | |
class | InterconnectResponse |
This class is based on the slave_interface files in the original M5 memory system but has been rewritten from scratch.
Definition at line 27 of file interconnect_slave.hh.
InterconnectSlave< MemType >::InterconnectSlave | ( | const std::string & | name, | |
Interconnect * | interconnect, | |||
MemType * | cache, | |||
HierParams * | hier | |||
) |
This constructor creates an interconnect slave interface and registers it with the provided interconnect.
name | The name from the config file | |
interconnect | A pointer to the interconnect | |
cache | A pointer to the cache | |
hier | Hierarchy parameters for BaseHier |
MemAccessResult InterconnectSlave< MemType >::access | ( | MemReqPtr & | req | ) | [virtual] |
Access the connect memory to perform the given request.
req | The request to perform. |
Implements InterconnectInterface.
Definition at line 31 of file interconnect_slave_impl.hh.
References InterconnectInterface::trace_on.
void InterconnectSlave< MemType >::deliver | ( | MemReqPtr & | req | ) | [inline, virtual] |
The deliver method is not used in a slave interface and issues a fatal error message if it is called.
req | Not used. |
Implements InterconnectInterface.
Definition at line 124 of file interconnect_slave.hh.
std::string InterconnectSlave< MemType >::getCacheName | ( | ) | [inline, virtual] |
Retrieves the name of the associated cache.
Implements InterconnectInterface.
Definition at line 165 of file interconnect_slave.hh.
std::pair<Addr, int> InterconnectSlave< MemType >::getTargetAddr | ( | ) | [inline, virtual] |
This method has no relevance for a slave interface and issues a fatal error message if it is called.
Implements InterconnectInterface.
Definition at line 143 of file interconnect_slave.hh.
int InterconnectSlave< MemType >::getTargetId | ( | ) | [inline, virtual] |
This method is used to find the destination interface of the request at the head of response queue. This information is stored in the request, so this method simply accesses this information.
Implements InterconnectInterface.
Definition at line 155 of file interconnect_slave.hh.
bool InterconnectSlave< MemType >::grantData | ( | ) | [virtual] |
Called when this interface is granted access to the interconnect.
Implements InterconnectInterface.
Definition at line 88 of file interconnect_slave_impl.hh.
References InterconnectInterface::interfaceID, Interconnect::send(), InterconnectInterface::thisInterconnect, and InterconnectInterface::updateProfileValues().
bool InterconnectSlave< MemType >::inRange | ( | Addr | addr | ) | [virtual] |
This method overloaded here to implement modulo bank addressing. The default in M5 is that each bank is responsible for a contigous part of the address space. This functionality is retained, but in addition it implements modulo addressing. In this case the address modulo the number of banks is used to decide which bank should service a given request.
A configuration option in the cache selects which bank addressing type should be used.
addr | The address to be checked |
Definition at line 109 of file interconnect_slave_impl.hh.
bool InterconnectSlave< MemType >::isMaster | ( | ) | [inline, virtual] |
Since this is a slave interface, this method always returns false.
Implements InterconnectInterface.
Definition at line 133 of file interconnect_slave.hh.
void InterconnectSlave< MemType >::request | ( | Tick | time | ) | [inline, virtual] |
The request method is not needed in slave interfaces and is not implemented. If it is called, it issues a fatal error message.
time | Not used. |
Implements InterconnectInterface.
Definition at line 94 of file interconnect_slave.hh.
void InterconnectSlave< MemType >::respond | ( | MemReqPtr & | req, | |
Tick | time | |||
) | [virtual] |
The respond method is called when the connected cache responds to an access. Then, an InterconnectResponse object is allocated and put into a queue. Furthermore, access to the interconnect is requested.
req | The request being responded to. | |
time | The time the response is ready. |
Implements InterconnectInterface.
Definition at line 64 of file interconnect_slave_impl.hh.
References Interconnect::getInterconnectID(), InterconnectInterface::interfaceID, Interconnect::request(), InterconnectInterface::thisInterconnect, and InterconnectInterface::trace_on.