gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
RubySlicc_Util.hh File Reference
#include <cassert>
#include "debug/RubySlicc.hh"
#include "mem/packet.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/BoolVec.hh"
#include "mem/ruby/common/DataBlock.hh"
#include "mem/ruby/common/TypeDefines.hh"
#include "mem/ruby/common/WriteMask.hh"

Go to the source code of this file.

Functions

Cycles zero_time ()
 
NodeID intToID (int nodenum)
 
int IDToInt (NodeID id)
 
int addressToInt (Addr addr)
 
Addr intToAddress (int addr)
 
int mod (int val, int mod)
 
int max_tokens ()
 
bool testAndRead (Addr addr, DataBlock &blk, Packet *pkt)
 This function accepts an address, a data block and a packet. More...
 
bool testAndReadMask (Addr addr, DataBlock &blk, WriteMask &mask, Packet *pkt)
 This function accepts an address, a data block, a write mask and a packet. More...
 
bool testAndWrite (Addr addr, DataBlock &blk, Packet *pkt)
 This function accepts an address, a data block and a packet. More...
 
int countBoolVec (BoolVec bVec)
 

Function Documentation

int addressToInt ( Addr  addr)
inline

Definition at line 64 of file RubySlicc_Util.hh.

References addr.

int countBoolVec ( BoolVec  bVec)
inline

Definition at line 175 of file RubySlicc_Util.hh.

References X86ISA::count.

int IDToInt ( NodeID  id)
inline

Definition at line 57 of file RubySlicc_Util.hh.

References SparcISA::id.

Addr intToAddress ( int  addr)
inline

Definition at line 71 of file RubySlicc_Util.hh.

References addr.

NodeID intToID ( int  nodenum)
inline

Definition at line 50 of file RubySlicc_Util.hh.

References SparcISA::id.

int max_tokens ( )
inline

Definition at line 83 of file RubySlicc_Util.hh.

int mod ( int  val,
int  mod 
)
inline

Definition at line 78 of file RubySlicc_Util.hh.

bool testAndRead ( Addr  addr,
DataBlock blk,
Packet pkt 
)
inline

This function accepts an address, a data block and a packet.

If the address range for the data block contains the address which the packet needs to read, then the data from the data block is written to the packet. True is returned if the data block was read, otherwise false is returned.

This is used during a functional access "search the world" operation. The functional access looks in every place that might hold a valid data block and, if it finds one, checks to see if it is holding the address the access is searching for. During the access check, the WriteMask could be in any state, including empty.

Definition at line 101 of file RubySlicc_Util.hh.

References data, Packet::getAddr(), DataBlock::getByte(), Packet::getPtr(), Packet::getSize(), ArmISA::i, and makeLineAddress().

bool testAndReadMask ( Addr  addr,
DataBlock blk,
WriteMask mask,
Packet pkt 
)
inline

This function accepts an address, a data block, a write mask and a packet.

If the valid address range for the data block contains the address which the packet needs to read, then the data from the data block is written to the packet. True is returned if any part of the data block was read, otherwise false is returned.

Definition at line 127 of file RubySlicc_Util.hh.

References data, Packet::getAddr(), DataBlock::getByte(), Packet::getPtr(), Packet::getSize(), ArmISA::i, makeLineAddress(), and WriteMask::test().

bool testAndWrite ( Addr  addr,
DataBlock blk,
Packet pkt 
)
inline

This function accepts an address, a data block and a packet.

If the address range for the data block contains the address which the packet needs to write, then the data from the packet is written to the data block. True is returned if the data block was written, otherwise false is returned.

Definition at line 156 of file RubySlicc_Util.hh.

References data, Packet::getAddr(), Packet::getConstPtr(), Packet::getSize(), ArmISA::i, makeLineAddress(), and DataBlock::setByte().

Cycles zero_time ( )
inline

Definition at line 47 of file RubySlicc_Util.hh.


Generated on Fri Jun 9 2017 13:03:59 for gem5 by doxygen 1.8.6