gem5  v20.1.0.0
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 isWriteRequest (RubyRequestType type)
 
bool isDataReadRequest (RubyRequestType type)
 
bool isReadRequest (RubyRequestType type)
 
bool isHtmCmdRequest (RubyRequestType type)
 
RubyRequestType htmCmdToRubyRequestType (const Packet *pkt)
 
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

◆ addressToInt()

int addressToInt ( Addr  addr)
inline

Definition at line 76 of file RubySlicc_Util.hh.

References addr.

◆ countBoolVec()

int countBoolVec ( BoolVec  bVec)
inline

Definition at line 256 of file RubySlicc_Util.hh.

References X86ISA::count, and ArmISA::e.

◆ htmCmdToRubyRequestType()

RubyRequestType htmCmdToRubyRequestType ( const Packet pkt)
inline

Definition at line 153 of file RubySlicc_Util.hh.

References panic, and Packet::req.

Referenced by Sequencer::makeRequest().

◆ IDToInt()

int IDToInt ( NodeID  id)
inline

Definition at line 69 of file RubySlicc_Util.hh.

References ArmISA::id.

◆ intToAddress()

Addr intToAddress ( int  addr)
inline

Definition at line 83 of file RubySlicc_Util.hh.

References addr.

◆ intToID()

NodeID intToID ( int  nodenum)
inline

Definition at line 62 of file RubySlicc_Util.hh.

References ArmISA::id.

◆ isDataReadRequest()

bool isDataReadRequest ( RubyRequestType  type)
inline

Definition at line 118 of file RubySlicc_Util.hh.

References type.

Referenced by isReadRequest().

◆ isHtmCmdRequest()

bool isHtmCmdRequest ( RubyRequestType  type)
inline

Definition at line 140 of file RubySlicc_Util.hh.

References type.

Referenced by HTMSequencer::htmCallback(), and HTMSequencer::insertRequest().

◆ isReadRequest()

bool isReadRequest ( RubyRequestType  type)
inline

Definition at line 129 of file RubySlicc_Util.hh.

References isDataReadRequest(), and type.

◆ isWriteRequest()

bool isWriteRequest ( RubyRequestType  type)
inline

Definition at line 101 of file RubySlicc_Util.hh.

References type.

◆ max_tokens()

int max_tokens ( )
inline

Definition at line 95 of file RubySlicc_Util.hh.

◆ mod()

int mod ( int  val,
int  mod 
)
inline

◆ testAndRead()

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 182 of file RubySlicc_Util.hh.

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

◆ testAndReadMask()

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 208 of file RubySlicc_Util.hh.

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

◆ testAndWrite()

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 237 of file RubySlicc_Util.hh.

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

Referenced by RubyRequest::functionalWrite().

◆ zero_time()

Cycles zero_time ( )
inline

Definition at line 59 of file RubySlicc_Util.hh.


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