mem: Add accessor function for vaddr
authorMitch Hayenga <mitch.hayenga@arm.com>
Tue, 9 Sep 2014 08:36:33 +0000 (04:36 -0400)
committerMitch Hayenga <mitch.hayenga@arm.com>
Tue, 9 Sep 2014 08:36:33 +0000 (04:36 -0400)
Determine if a request has an associated virtual address.

src/mem/request.hh

index a064e0b05099de044543dca36867f56e133b4c51..799439f02558391e0095663457e2cf79c4e51cc4 100644 (file)
@@ -497,8 +497,14 @@ class Request
     }
 
     /** Accessor function for vaddr.*/
+    bool
+    hasVaddr() const
+    {
+        return privateFlags.isSet(VALID_VADDR);
+    }
+
     Addr
-    getVaddr()
+    getVaddr() const
     {
         assert(privateFlags.isSet(VALID_VADDR));
         return _vaddr;