gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
memhelpers.hh File Reference
#include "arch/isa_traits.hh"
#include "base/types.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
#include "sim/byteswap.hh"
#include "sim/insttracer.hh"

Go to the source code of this file.

Functions

template<class XC , class MemT >
Fault initiateMemRead (XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem, Request::Flags flags)
 Initiate a read from memory in timing mode. More...
 
template<class MemT >
void getMem (PacketPtr pkt, MemT &mem, Trace::InstRecord *traceData)
 Extract the data returned from a timing mode read. More...
 
template<class XC , class MemT >
Fault readMemAtomic (XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem, Request::Flags flags)
 Read from memory in atomic mode. More...
 
template<class XC , class MemT >
Fault writeMemTiming (XC *xc, Trace::InstRecord *traceData, MemT mem, Addr addr, Request::Flags flags, uint64_t *res)
 Write to memory in timing mode. More...
 
template<class XC , class MemT >
Fault writeMemAtomic (XC *xc, Trace::InstRecord *traceData, const MemT &mem, Addr addr, Request::Flags flags, uint64_t *res)
 Write to memory in atomic mode. More...
 

Function Documentation

template<class MemT >
void getMem ( PacketPtr  pkt,
MemT &  mem,
Trace::InstRecord traceData 
)

Extract the data returned from a timing mode read.

Definition at line 67 of file memhelpers.hh.

References Packet::get(), and Trace::InstRecord::setData().

template<class XC , class MemT >
Fault initiateMemRead ( XC *  xc,
Trace::InstRecord traceData,
Addr  addr,
MemT &  mem,
Request::Flags  flags 
)

Initiate a read from memory in timing mode.

Note that the 'mem' parameter is unused; only the type of that parameter is used to determine the size of the access.

Definition at line 58 of file memhelpers.hh.

template<class XC , class MemT >
Fault readMemAtomic ( XC *  xc,
Trace::InstRecord traceData,
Addr  addr,
MemT &  mem,
Request::Flags  flags 
)

Read from memory in atomic mode.

Definition at line 77 of file memhelpers.hh.

References BigEndianGuest::gtoh(), NoFault, and Trace::InstRecord::setData().

template<class XC , class MemT >
Fault writeMemAtomic ( XC *  xc,
Trace::InstRecord traceData,
const MemT &  mem,
Addr  addr,
Request::Flags  flags,
uint64_t *  res 
)

Write to memory in atomic mode.

Definition at line 106 of file memhelpers.hh.

References BigEndianGuest::gtoh(), BigEndianGuest::htog(), Request::MEM_SWAP, Request::MEM_SWAP_COND, NoFault, and Trace::InstRecord::setData().

template<class XC , class MemT >
Fault writeMemTiming ( XC *  xc,
Trace::InstRecord traceData,
MemT  mem,
Addr  addr,
Request::Flags  flags,
uint64_t *  res 
)

Write to memory in timing mode.

Definition at line 93 of file memhelpers.hh.

References BigEndianGuest::htog(), and Trace::InstRecord::setData().


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