InterconnectSlave< MemType > Class Template Reference

#include <interconnect_slave.hh>

Inheritance diagram for InterconnectSlave< MemType >:

InterconnectInterface List of all members.

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

Detailed Description

template<class MemType>
class InterconnectSlave< MemType >

This class implements a slave interface as needed by the M5 cache implementation. In the terminiology of M5, slave is synonymous with 'on the memory side of an interconnect'

This class is based on the slave_interface files in the original M5 memory system but has been rewritten from scratch.

Author:
Magnus Jahre

Definition at line 27 of file interconnect_slave.hh.


Constructor & Destructor Documentation

template<class MemType>
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.

Parameters:
name The name from the config file
interconnect A pointer to the interconnect
cache A pointer to the cache
hier Hierarchy parameters for BaseHier


Member Function Documentation

template<class MemType>
MemAccessResult InterconnectSlave< MemType >::access ( MemReqPtr &  req  )  [virtual]

Access the connect memory to perform the given request.

Parameters:
req The request to perform.
Returns:
The result of the access.

Implements InterconnectInterface.

Definition at line 31 of file interconnect_slave_impl.hh.

References InterconnectInterface::trace_on.

template<class MemType>
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.

Parameters:
req Not used.

Implements InterconnectInterface.

Definition at line 124 of file interconnect_slave.hh.

template<class MemType>
std::string InterconnectSlave< MemType >::getCacheName (  )  [inline, virtual]

Retrieves the name of the associated cache.

Returns:
The name of the associated cache.

Implements InterconnectInterface.

Definition at line 165 of file interconnect_slave.hh.

template<class MemType>
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.

Returns:
Nothing.

Implements InterconnectInterface.

Definition at line 143 of file interconnect_slave.hh.

template<class MemType>
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.

Returns:
The destination interface.

Implements InterconnectInterface.

Definition at line 155 of file interconnect_slave.hh.

template<class MemType>
bool InterconnectSlave< MemType >::grantData (  )  [virtual]

Called when this interface is granted access to the interconnect.

Returns:
True if another request is outstanding.

Implements InterconnectInterface.

Definition at line 88 of file interconnect_slave_impl.hh.

References InterconnectInterface::interfaceID, Interconnect::send(), InterconnectInterface::thisInterconnect, and InterconnectInterface::updateProfileValues().

template<class MemType>
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.

Parameters:
addr The address to be checked
Returns:
True if this interface is responsible for this address.

Definition at line 109 of file interconnect_slave_impl.hh.

template<class MemType>
bool InterconnectSlave< MemType >::isMaster (  )  [inline, virtual]

Since this is a slave interface, this method always returns false.

Returns:
False, since this is a slave interface.

Implements InterconnectInterface.

Definition at line 133 of file interconnect_slave.hh.

template<class MemType>
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.

Parameters:
time Not used.

Implements InterconnectInterface.

Definition at line 94 of file interconnect_slave.hh.

template<class MemType>
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.

Parameters:
req The request being responded to.
time The time the response is ready.
See also:
InterconnectResponse

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.


The documentation for this class was generated from the following files:
Generated on Tue Jun 5 12:55:20 2007 for M5InterconnectExtensions by  doxygen 1.4.7