gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BankedArray Class Reference

#include <BankedArray.hh>

Classes

class  AccessRecord
 

Public Member Functions

 BankedArray (unsigned int banks, Cycles accessLatency, unsigned int startIndexBit, RubySystem *rs)
 
bool tryAccess (int64_t idx)
 
void reserve (int64_t idx)
 
Cycles getLatency () const
 

Private Member Functions

unsigned int mapIndexToBank (int64_t idx)
 

Private Attributes

unsigned int banks
 
Cycles accessLatency
 
unsigned int bankBits
 
unsigned int startIndexBit
 
RubySystemm_ruby_system
 
std::vector< AccessRecordbusyBanks
 

Detailed Description

Definition at line 41 of file BankedArray.hh.

Constructor & Destructor Documentation

BankedArray::BankedArray ( unsigned int  banks,
Cycles  accessLatency,
unsigned int  startIndexBit,
RubySystem rs 
)

Definition at line 37 of file BankedArray.cc.

References accessLatency, bankBits, banks, busyBanks, floorLog2(), and startIndexBit.

Member Function Documentation

Cycles BankedArray::getLatency ( ) const
inline

Definition at line 75 of file BankedArray.hh.

References accessLatency.

Referenced by CacheMemory::getDataLatency(), and CacheMemory::getTagLatency().

unsigned int BankedArray::mapIndexToBank ( int64_t  idx)
private

Definition at line 95 of file BankedArray.cc.

References banks.

Referenced by reserve(), and tryAccess().

void BankedArray::reserve ( int64_t  idx)
bool BankedArray::tryAccess ( int64_t  idx)

Definition at line 53 of file BankedArray.cc.

References accessLatency, banks, busyBanks, curTick(), and mapIndexToBank().

Referenced by CacheMemory::checkResourceAvailable().

Member Data Documentation

Cycles BankedArray::accessLatency
private

Definition at line 45 of file BankedArray.hh.

Referenced by BankedArray(), getLatency(), reserve(), and tryAccess().

unsigned int BankedArray::bankBits
private

Definition at line 46 of file BankedArray.hh.

Referenced by BankedArray().

unsigned int BankedArray::banks
private

Definition at line 44 of file BankedArray.hh.

Referenced by BankedArray(), mapIndexToBank(), reserve(), and tryAccess().

std::vector<AccessRecord> BankedArray::busyBanks
private

Definition at line 61 of file BankedArray.hh.

Referenced by BankedArray(), reserve(), and tryAccess().

RubySystem* BankedArray::m_ruby_system
private

Definition at line 48 of file BankedArray.hh.

Referenced by reserve().

unsigned int BankedArray::startIndexBit
private

Definition at line 47 of file BankedArray.hh.

Referenced by BankedArray().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:02 for gem5 by doxygen 1.8.6