gem5  v20.1.0.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BankedArray Class Reference

#include <BankedArray.hh>


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
std::vector< AccessRecordbusyBanks

Detailed Description

Definition at line 41 of file BankedArray.hh.

Constructor & Destructor Documentation

◆ BankedArray()

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

Definition at line 37 of file

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

Member Function Documentation

◆ getLatency()

Cycles BankedArray::getLatency ( ) const

Definition at line 75 of file BankedArray.hh.

References accessLatency.

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

◆ mapIndexToBank()

unsigned int BankedArray::mapIndexToBank ( int64_t  idx)

Definition at line 95 of file

References banks.

Referenced by reserve(), and tryAccess().

◆ reserve()

void BankedArray::reserve ( int64_t  idx)

◆ tryAccess()

bool BankedArray::tryAccess ( int64_t  idx)

Definition at line 53 of file

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

Referenced by CacheMemory::checkResourceAvailable().

Member Data Documentation

◆ accessLatency

Cycles BankedArray::accessLatency

Definition at line 45 of file BankedArray.hh.

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

◆ bankBits

unsigned int BankedArray::bankBits

Definition at line 46 of file BankedArray.hh.

Referenced by BankedArray().

◆ banks

unsigned int BankedArray::banks

Definition at line 44 of file BankedArray.hh.

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

◆ busyBanks

std::vector<AccessRecord> BankedArray::busyBanks

Definition at line 61 of file BankedArray.hh.

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

◆ m_ruby_system

RubySystem* BankedArray::m_ruby_system

Definition at line 48 of file BankedArray.hh.

Referenced by reserve().

◆ startIndexBit

unsigned int BankedArray::startIndexBit

Definition at line 47 of file BankedArray.hh.

Referenced by BankedArray().

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

Generated on Wed Sep 30 2020 14:02:21 for gem5 by doxygen 1.8.17