gem5  v20.1.0.0
Functions
memhelpers.hh File Reference
#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<ByteOrder Order, class MemT >
void getMem (PacketPtr pkt, MemT &mem, Trace::InstRecord *traceData)
 Extract the data returned from a timing mode read. More...
 
template<class MemT >
void getMemLE (PacketPtr pkt, MemT &mem, Trace::InstRecord *traceData)
 
template<class MemT >
void getMemBE (PacketPtr pkt, MemT &mem, Trace::InstRecord *traceData)
 
template<ByteOrder Order, 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 readMemAtomicLE (XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem, Request::Flags flags)
 
template<class XC , class MemT >
Fault readMemAtomicBE (XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem, Request::Flags flags)
 
template<ByteOrder Order, 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 writeMemTimingLE (XC *xc, Trace::InstRecord *traceData, MemT mem, Addr addr, Request::Flags flags, uint64_t *res)
 
template<class XC , class MemT >
Fault writeMemTimingBE (XC *xc, Trace::InstRecord *traceData, MemT mem, Addr addr, Request::Flags flags, uint64_t *res)
 
template<ByteOrder Order, 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...
 
template<class XC , class MemT >
Fault writeMemAtomicLE (XC *xc, Trace::InstRecord *traceData, const MemT &mem, Addr addr, Request::Flags flags, uint64_t *res)
 
template<class XC , class MemT >
Fault writeMemAtomicBE (XC *xc, Trace::InstRecord *traceData, const MemT &mem, Addr addr, Request::Flags flags, uint64_t *res)
 
template<ByteOrder Order, class XC , class MemT >
Fault amoMemAtomic (XC *xc, Trace::InstRecord *traceData, MemT &mem, Addr addr, Request::Flags flags, AtomicOpFunctor *_amo_op)
 Do atomic read-modify-write (AMO) in atomic mode. More...
 
template<class XC , class MemT >
Fault amoMemAtomicLE (XC *xc, Trace::InstRecord *traceData, MemT &mem, Addr addr, Request::Flags flags, AtomicOpFunctor *_amo_op)
 
template<class XC , class MemT >
Fault amoMemAtomicBE (XC *xc, Trace::InstRecord *traceData, MemT &mem, Addr addr, Request::Flags flags, AtomicOpFunctor *_amo_op)
 
template<class XC , class MemT >
Fault initiateMemAMO (XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem, Request::Flags flags, AtomicOpFunctor *_amo_op)
 Do atomic read-modify-wrote (AMO) in timing mode. More...
 

Function Documentation

◆ amoMemAtomic()

template<ByteOrder Order, class XC , class MemT >
Fault amoMemAtomic ( XC *  xc,
Trace::InstRecord traceData,
MemT &  mem,
Addr  addr,
Request::Flags  flags,
AtomicOpFunctor _amo_op 
)

Do atomic read-modify-write (AMO) in atomic mode.

Definition at line 191 of file memhelpers.hh.

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

◆ amoMemAtomicBE()

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

Definition at line 222 of file memhelpers.hh.

References addr, and mem.

◆ amoMemAtomicLE()

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

Definition at line 213 of file memhelpers.hh.

References addr, and mem.

◆ getMem()

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

Extract the data returned from a timing mode read.

Definition at line 64 of file memhelpers.hh.

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

◆ getMemBE()

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

Definition at line 80 of file memhelpers.hh.

References mem.

◆ getMemLE()

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

Definition at line 73 of file memhelpers.hh.

References mem.

◆ initiateMemAMO()

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

Do atomic read-modify-wrote (AMO) in timing mode.

Definition at line 232 of file memhelpers.hh.

References addr.

◆ initiateMemRead()

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 55 of file memhelpers.hh.

References addr.

◆ readMemAtomic()

template<ByteOrder Order, 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 88 of file memhelpers.hh.

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

◆ readMemAtomicBE()

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

Definition at line 112 of file memhelpers.hh.

References addr, and mem.

◆ readMemAtomicLE()

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

Definition at line 103 of file memhelpers.hh.

References addr, and mem.

◆ writeMemAtomic()

template<ByteOrder Order, 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 152 of file memhelpers.hh.

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

◆ writeMemAtomicBE()

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

Definition at line 181 of file memhelpers.hh.

References addr, and mem.

◆ writeMemAtomicLE()

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

Definition at line 172 of file memhelpers.hh.

References addr, and mem.

◆ writeMemTiming()

template<ByteOrder Order, 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 121 of file memhelpers.hh.

References addr, htog(), mem, and Trace::InstRecord::setData().

◆ writeMemTimingBE()

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

Definition at line 142 of file memhelpers.hh.

References addr, and mem.

◆ writeMemTimingLE()

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

Definition at line 133 of file memhelpers.hh.

References addr, and mem.


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