Go to the documentation of this file.
46 #ifndef __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_UTIL_HH__
47 #define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_UTIL_HH__
51 #include "debug/RubySlicc.hh"
78 assert(!(
addr & 0xffffffff00000000));
85 assert(!(
addr & 0xffffffff00000000));
103 if ((
type == RubyRequestType_ST) ||
104 (
type == RubyRequestType_ATOMIC) ||
105 (
type == RubyRequestType_RMW_Read) ||
106 (
type == RubyRequestType_RMW_Write) ||
107 (
type == RubyRequestType_Store_Conditional) ||
108 (
type == RubyRequestType_Locked_RMW_Read) ||
109 (
type == RubyRequestType_Locked_RMW_Write) ||
110 (
type == RubyRequestType_FLUSH)) {
120 if ((
type == RubyRequestType_LD) ||
121 (
type == RubyRequestType_Load_Linked)) {
132 (
type == RubyRequestType_IFETCH)) {
142 if ((
type == RubyRequestType_HTM_Start) ||
143 (
type == RubyRequestType_HTM_Commit) ||
144 (
type == RubyRequestType_HTM_Cancel) ||
145 (
type == RubyRequestType_HTM_Abort)) {
152 inline RubyRequestType
155 if (pkt->
req->isHTMStart()) {
156 return RubyRequestType_HTM_Start;
157 }
else if (pkt->
req->isHTMCommit()) {
158 return RubyRequestType_HTM_Commit;
159 }
else if (pkt->
req->isHTMCancel()) {
160 return RubyRequestType_HTM_Cancel;
161 }
else if (pkt->
req->isHTMAbort()) {
162 return RubyRequestType_HTM_Abort;
165 panic(
"invalid ruby packet type\n");
187 if (pktLineAddr == lineAddr) {
189 unsigned int size_in_bytes = pkt->
getSize();
190 unsigned startByte = pkt->
getAddr() - lineAddr;
192 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
213 if (pktLineAddr == lineAddr) {
215 unsigned int size_in_bytes = pkt->
getSize();
216 unsigned startByte = pkt->
getAddr() - lineAddr;
217 bool was_read =
false;
219 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
220 if (
mask.test(
i + startByte)) {
242 if (pktLineAddr == lineAddr) {
244 unsigned int size_in_bytes = pkt->
getSize();
245 unsigned startByte = pkt->
getAddr() - lineAddr;
247 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
259 for (
const bool e: bVec) {
267 #endif //__MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_UTIL_HH__
RubyRequestType htmCmdToRubyRequestType(const Packet *pkt)
Addr makeLineAddress(Addr addr)
int mod(int val, int mod)
RequestPtr req
A pointer to the original request.
bool testAndRead(Addr addr, DataBlock &blk, Packet *pkt)
This function accepts an address, a data block and a packet.
int addressToInt(Addr addr)
bool testAndReadMask(Addr addr, DataBlock &blk, WriteMask &mask, Packet *pkt)
This function accepts an address, a data block, a write mask and a packet.
bool isWriteRequest(RubyRequestType type)
int countBoolVec(BoolVec bVec)
void setByte(int whichByte, uint8_t data)
bool testAndWrite(Addr addr, DataBlock &blk, Packet *pkt)
This function accepts an address, a data block and a packet.
Addr intToAddress(int addr)
bool isDataReadRequest(RubyRequestType type)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool isReadRequest(RubyRequestType type)
uint8_t getByte(int whichByte) const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Cycles is a wrapper class for representing cycle counts, i.e.
NodeID intToID(int nodenum)
T * getPtr()
get a pointer to the data ptr.
const T * getConstPtr() const
#define panic(...)
This implements a cprintf based panic() function.
bool isHtmCmdRequest(RubyRequestType type)
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17