34 #ifndef __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
35 #define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
39 #include "debug/RubySlicc.hh"
66 assert(!(addr & 0xffffffff00000000));
73 assert(!(addr & 0xffffffff00000000));
106 if (pktLineAddr == lineAddr) {
108 unsigned int size_in_bytes = pkt->
getSize();
109 unsigned startByte = pkt->
getAddr() - lineAddr;
111 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
132 if (pktLineAddr == lineAddr) {
134 unsigned int size_in_bytes = pkt->
getSize();
135 unsigned startByte = pkt->
getAddr() - lineAddr;
136 bool was_read =
false;
138 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
139 if (mask.
test(
i + startByte)) {
161 if (pktLineAddr == lineAddr) {
163 unsigned int size_in_bytes = pkt->
getSize();
164 unsigned startByte = pkt->
getAddr() - lineAddr;
166 for (
unsigned i = 0;
i < size_in_bytes; ++
i) {
178 for (
const auto &it: bVec) {
186 #endif // __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
Cycles is a wrapper class for representing cycle counts, i.e.
int addressToInt(Addr addr)
uint8_t getByte(int whichByte) const
bool testAndReadMask(Addr addr, DataBlock &blk, WriteMask &mask, Packet *pkt)
This function accepts an address, a data block, a write mask and a packet.
T * getPtr()
get a pointer to the data ptr.
void setByte(int whichByte, uint8_t data)
int mod(int val, int mod)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
NodeID intToID(int nodenum)
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Addr makeLineAddress(Addr addr)
Declaration of the Packet class.
bool testAndWrite(Addr addr, DataBlock &blk, Packet *pkt)
This function accepts an address, a data block and a packet.
bool testAndRead(Addr addr, DataBlock &blk, Packet *pkt)
This function accepts an address, a data block and a packet.
Addr intToAddress(int addr)
const T * getConstPtr() const
int countBoolVec(BoolVec bVec)