From d658b6e1cc22de852fef611e28f448257acc298a Mon Sep 17 00:00:00 2001 From: Tony Gutierrez Date: Tue, 19 Jan 2016 13:57:50 -0500 Subject: * * * mem: support for gpu-style RMWs in ruby This patch adds support for GPU-style read-modify-write (RMW) operations in ruby. Such atomic operations are traditionally executed at the memory controller (instead of through an L1 cache using cache-line locking). Currently, this patch works by propogating operation functors through the memory system. --- src/mem/packet.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mem/packet.hh') diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 0e7135d73..19c7e6397 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -660,6 +660,12 @@ class Packet : public Printable return _isSecure; } + /** + * Accessor function to atomic op. + */ + AtomicOpFunctor *getAtomicOp() const { return req->getAtomicOpFunctor(); } + bool isAtomicOp() const { return req->isAtomic(); } + /** * It has been determined that the SC packet should successfully update * memory. Therefore, convert this SC packet to a normal write. -- cgit v1.2.3