InterconnectMaster< MemType > Class Template Reference

#include <interconnect_master.hh>

Inheritance diagram for InterconnectMaster< MemType >:

InterconnectInterface List of all members.

Public Member Functions

 InterconnectMaster (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 ()

Detailed Description

template<class MemType>
class InterconnectMaster< MemType >

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

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

Author:
Magnus Jahre

Definition at line 27 of file interconnect_master.hh.


Constructor & Destructor Documentation

template<class MemType>
InterconnectMaster< MemType >::InterconnectMaster ( const std::string &  name,
Interconnect interconnect,
MemType *  cache,
HierParams *  hier 
)

This constructor creates a master interface and register it with the associated interconnect. In the terminiology of M5, master is synonymous with 'on the processor side of an interconnect'

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


Member Function Documentation

template<class MemType>
MemAccessResult InterconnectMaster< 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 36 of file interconnect_master_impl.hh.

template<class MemType>
void InterconnectMaster< MemType >::deliver ( MemReqPtr &  req  )  [virtual]

This method delivers the request to the associated cache.

Parameters:
req The memory request to deliver

Implements InterconnectInterface.

Definition at line 51 of file interconnect_master_impl.hh.

References InterconnectInterface::interfaceID, and InterconnectInterface::trace_on.

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

Convenience method that returns the name of the associated cache.

Returns:
The name of associated cache

Implements InterconnectInterface.

Definition at line 141 of file interconnect_master.hh.

template<class MemType>
pair< Addr, int > InterconnectMaster< MemType >::getTargetAddr (  )  [virtual]

This method accesses the cache and finds out which interface the next request should be sent to. Then, it returns a pair of the address and the destination interface.

Note that the destination interface might be -1. In this case, the interconnect must find the destination itself by inspecting the destination address.

Returns:
The address and the destination interface. If the destination is -1, the interconnect must derive the destination based on the requested address.

Implements InterconnectInterface.

Definition at line 143 of file interconnect_master_impl.hh.

References Interconnect::getInterconnectID(), and InterconnectInterface::thisInterconnect.

template<class MemType>
int InterconnectMaster< MemType >::getTargetId (  )  [inline, virtual]

This method is only valid for slave interfaces and produces a fatal error message if it is called.

Returns:
Nothing

Implements InterconnectInterface.

Definition at line 131 of file interconnect_master.hh.

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

When the interface is granted access to the interconnect, this method is called. It retrieves the request with the highest priority from the cache and provides it to the send method in the interconnect.

Returns:
True if another request is outstanding.

Implements InterconnectInterface.

Definition at line 96 of file interconnect_master_impl.hh.

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

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

Convenience method that identifies this interface as a master interface.

Returns:
True, since this is a master interface

Implements InterconnectInterface.

Definition at line 106 of file interconnect_master.hh.

template<class MemType>
void InterconnectMaster< MemType >::request ( Tick  time  )  [virtual]

Request access to the interconnect at the given time.

Parameters:
time The time to request the bus.

Implements InterconnectInterface.

Definition at line 86 of file interconnect_master_impl.hh.

References InterconnectInterface::interfaceID, Interconnect::request(), InterconnectInterface::thisInterconnect, and InterconnectInterface::trace_on.

template<class MemType>
void InterconnectMaster< MemType >::respond ( MemReqPtr &  req,
Tick  time 
) [inline, virtual]

Responses are carried out through the deliver method in the master interface. Consequently, this method exits with an error message if it is called.

Parameters:
req Not used.
time Not used.

Implements InterconnectInterface.

Definition at line 80 of file interconnect_master.hh.


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