mem: Use Packet writing functions instead of memcpy
[gem5.git] / src / mem / cache / mshr_queue.hh
index f0b5c2ab0762a1c22794b4091c75f729fac75810..1e4eaeb514a2d7bd099adf1e6a67c10aea8a007c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, 2015-2016 ARM Limited
+ * Copyright (c) 2012-2013, 2015-2016, 2018 ARM Limited
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
 #ifndef __MEM_CACHE_MSHR_QUEUE_HH__
 #define __MEM_CACHE_MSHR_QUEUE_HH__
 
-#include <vector>
+#include <string>
 
+#include "base/types.hh"
 #include "mem/cache/mshr.hh"
 #include "mem/cache/queue.hh"
+#include "mem/packet.hh"
 
 /**
  * A Class for maintaining a list of pending and allocated memory requests.
@@ -104,6 +106,15 @@ class MSHRQueue : public Queue<MSHR>
      */
     void moveToFront(MSHR *mshr);
 
+    /**
+     * Adds a delay to the provided MSHR and moves MSHRs that will be
+     * ready earlier than this entry to the top of the list
+     *
+     * @param mshr that needs to be delayed
+     * @param delay_ticks ticks of the desired delay
+     */
+    void delay(MSHR *mshr, Tick delay_ticks);
+
     /**
      * Mark the given MSHR as in service. This removes the MSHR from the
      * readyList or deallocates the MSHR if it does not expect a response.