SplitTransBus Class Reference

#include <split_trans_bus.hh>

Inheritance diagram for SplitTransBus:

Interconnect List of all members.

Public Member Functions

 SplitTransBus (const std::string &_name, int _width, int _clock, int _transDelay, int _arbDelay, int _cpu_count, bool _pipelined, HierParams *_hier)
 ~SplitTransBus ()
void request (Tick time, int fromID)
void send (MemReqPtr &req, Tick time, int fromID)
void arbitrate (Tick cycle)
void deliver (MemReqPtr &req, Tick cycle, int toID, int fromID)
void setBlocked (int fromInterface)
void clearBlocked (int fromInterface)
int getChannelCount ()
std::vector< int > getChannelSample ()
void writeChannelDecriptor (std::ofstream &stream)

Detailed Description

This class implements a Split Transaction Bus interconnect. Here, all interfaces are connected to one transmission channel. After arbitration, a request is granted both the address bus and the data bus.

Two bus types have been implemented. One version has pipelined arbitration and pipelined transfer while the other one is not pipelined. The pipelined version is not realistic as it assumes that a request can be injected into the data bus from any interface each clock cycle.

Author:
Magnus Jahre

Definition at line 25 of file split_trans_bus.hh.


Constructor & Destructor Documentation

SplitTransBus::SplitTransBus ( const std::string &  _name,
int  _width,
int  _clock,
int  _transDelay,
int  _arbDelay,
int  _cpu_count,
bool  _pipelined,
HierParams *  _hier 
) [inline]

This constructor creates a split transaction bus object. If the bus is not pipelined the arbitration delay must be longer or equal to the transfer delay. The reason is that the arbitration method assumes that the previous bus transfer has finished when an arbitration operation finishes.

Parameters:
_name The name provided in the config file
_width The bus width in bytes
_clock The number of processor clock in one bus cycle
_transDelay The number of bus cycles one transfer takes
_arbDelay The number of bus cycles one arbitration takes
_cpu_count The number of processors in the system
_hier Hierarchy params for BaseHier

Definition at line 73 of file split_trans_bus.hh.

References Interconnect::arbitrationDelay, and Interconnect::transferDelay.

SplitTransBus::~SplitTransBus (  )  [inline]

Default destructor. Deletes the dynamically allocated slaveRequestQueue if the bus is pipelined.

Definition at line 109 of file split_trans_bus.hh.


Member Function Documentation

void SplitTransBus::arbitrate ( Tick  cycle  )  [virtual]

This method is called when an arbitration event is serviced. Each time it is called, it issues at least one request. In the non-pipelined version the oldest request is granted access. In the pipelined version, the oldest master request and the oldest slave request are granted access.

The method assumes that the request queues are sorted.

Parameters:
cycle The clock cycle the arbitration method is called

Implements Interconnect.

Definition at line 109 of file split_trans_bus.cc.

References Interconnect::arbitrationDelay, and Interconnect::blocked.

void SplitTransBus::clearBlocked ( int  fromInterface  )  [virtual]

This method is called when a slave cache can recieve requests again.

Parameters:
fromInterface The interface that is no longer blocked

Implements Interconnect.

Definition at line 377 of file split_trans_bus.cc.

References Interconnect::blocked, Interconnect::blockedAt, Interconnect::numClearBlocked, Interconnect::transferDelay, and Interconnect::waitingFor.

void SplitTransBus::deliver ( MemReqPtr &  req,
Tick  cycle,
int  toID,
int  fromID 
) [virtual]

This method is called when a InterconnectDeliverQueueEvent is serviced. It delivers one request each time it is called. If the cache does not block and there are more requests that need to be delivered, it checks whether a delivery event has been registered. This is needed because there might be requests waiting from an earlier cache blocking.

Parameters:
req The request to deliver
cycle The clock tick the method was called
toID The interface ID of the destination interface
fromID The interface ID of the sender interface

Implements Interconnect.

Definition at line 302 of file split_trans_bus.cc.

References Interconnect::allInterfaces, Interconnect::blocked, Interconnect::perCpuTotalTransferCycles, Interconnect::perCpuTotalTransQueueCycles, Interconnect::sentRequests, Interconnect::totalTransferCycles, Interconnect::totalTransQueueCycles, and Interconnect::transferDelay.

int SplitTransBus::getChannelCount (  )  [inline, virtual]

This method is called from the InterconnectProfile class when it needs to know how many transmission channels the bus has.

Returns:
1 since the bus only has one channel
See also:
InterconnectProfile

Implements Interconnect.

Definition at line 196 of file split_trans_bus.hh.

vector< int > SplitTransBus::getChannelSample (  )  [virtual]

This method is called from the InterconnectProfile class and returns the number of clock cycles the bus was in use since the last time it was called.

Returns:
The number of clock cycles the bus was used since the last time the method was called.
See also:
InterconnectProfile

Implements Interconnect.

Definition at line 425 of file split_trans_bus.cc.

void SplitTransBus::request ( Tick  time,
int  fromID 
) [virtual]

This method is called when a interface needs to use the bus. It adds the request to a queue and schedules an arbitration event. If the bus is pipelined, there are two request queues. The reason is that there are two buses in this case. One runs from the slave interfaces to the master interfaces and one in the opposite direction.

Parameters:
time The clock cycle the request is requested
fromID The ID of the interface requesting access

Implements Interconnect.

Definition at line 8 of file split_trans_bus.cc.

References Interconnect::allInterfaces, Interconnect::arbitrationDelay, Interconnect::arbitrationEvents, Interconnect::blocked, and Interconnect::requests.

void SplitTransBus::send ( MemReqPtr &  req,
Tick  time,
int  fromID 
) [virtual]

This methods takes creates an InterconnectDelivery object based on the arguments given. Then, an InterconnectDeliverQueueEvent is scheduled after the specified transmission delay. The request queue(s) are kept sorted in ascending order with the oldest request first.

Parameters:
req The memory request
time The clock cycle the method is called in
fromID The ID of the interface sending the request
See also:
InterconnectDelivery

InterconnectDeliverQueueEvent

Implements Interconnect.

Definition at line 208 of file split_trans_bus.cc.

References Interconnect::allInterfaces, Interconnect::blocked, Interconnect::transferDelay, and Interconnect::width.

void SplitTransBus::setBlocked ( int  fromInterface  )  [virtual]

This method is called if one of the slave cache banks blocks. Then, it removes all arbitration and deliver events. Requests that arrive while a cache bank is blocked are simply queued.

Parameters:
fromInterface The interface that is blocked

Implements Interconnect.

Definition at line 347 of file split_trans_bus.cc.

References Interconnect::arbitrationEvents, Interconnect::blocked, Interconnect::blockedAt, Interconnect::deliverEvents, Interconnect::numSetBlocked, and Interconnect::waitingFor.

void SplitTransBus::writeChannelDecriptor ( std::ofstream &  stream  )  [inline, virtual]

This method writes a desciption of the transmission channels used to the provided stream.

Parameters:
stream The stream to write to

Implements Interconnect.

Definition at line 218 of file split_trans_bus.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