mem: Align the Substream naming in Request
authorYu-hsin Wang <yuhsingw@google.com>
Fri, 11 Dec 2020 03:32:02 +0000 (11:32 +0800)
committerYu-hsin Wang <yuhsingw@google.com>
Mon, 14 Dec 2020 01:49:06 +0000 (01:49 +0000)
Change-Id: Iac6a18d8872c7df4ade8ecf8914fa807cc3584e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38457
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/testers/traffic_gen/base.cc
src/cpu/testers/traffic_gen/base.hh
src/cpu/testers/traffic_gen/stream_gen.hh
src/dev/dma_device.cc
src/mem/request.hh

index 5cf532074f4a89c725de30e3bb59f6d52e16f5fe..737adbb68b5f427a7add015c72d1b6a3b6435749 100644 (file)
@@ -183,12 +183,12 @@ BaseTrafficGen::update()
         // try to pick and assign them to the new packet
         if (streamGenerator) {
             auto sid = streamGenerator->pickStreamID();
-            auto ssid = streamGenerator->pickSubStreamID();
+            auto ssid = streamGenerator->pickSubstreamID();
 
             pkt->req->setStreamId(sid);
 
             if (streamGenerator->ssidValid()) {
-                pkt->req->setSubStreamId(ssid);
+                pkt->req->setSubstreamId(ssid);
             }
         }
 
index 01b560e60f5f5967759d5f1bc198c0fd1f93ff25..018028b4c85f1c60bc7a8a37f8db5816f547a792 100644 (file)
@@ -331,7 +331,7 @@ class BaseTrafficGen : public ClockedObject
     /** Currently active generator */
     std::shared_ptr<BaseGen> activeGenerator;
 
-    /** Stream/SubStreamID Generator */
+    /** Stream/SubstreamID Generator */
     std::unique_ptr<StreamGen> streamGenerator;
 };
 
index a4eb5bbc73d534cb87e5f566f5e11ef0eff867e3..01aab9be533d34c96f8c61dd15a7c33329cd2173 100644 (file)
@@ -64,7 +64,7 @@ class StreamGen
     virtual ~StreamGen() {};
 
     virtual uint32_t pickStreamID() = 0;
-    virtual uint32_t pickSubStreamID() = 0;
+    virtual uint32_t pickSubstreamID() = 0;
 
     /**
      * Factory method for constructing a Stream generator.
@@ -92,7 +92,7 @@ class StreamGen
      * Store preset Stream and Substream IDs to use for requests
      * This is the set of available streamIDs the generator can
      * pick. The actual ID being picked for a specific memory
-     * request is selected by the pickStreamID and pickSubStreamID
+     * request is selected by the pickStreamID and pickSubstreamID
      * methods.
      */
     std::vector<uint32_t> streamIds;
@@ -114,7 +114,7 @@ class FixedStreamGen : public StreamGen
     uint32_t pickStreamID() override
     { return streamIds[0]; }
 
-    uint32_t pickSubStreamID() override
+    uint32_t pickSubstreamID() override
     { return substreamIds[0]; }
 };
 
@@ -128,7 +128,7 @@ class RandomStreamGen : public StreamGen
     uint32_t pickStreamID() override
     { return randomPick(streamIds); }
 
-    uint32_t pickSubStreamID() override
+    uint32_t pickSubstreamID() override
     { return randomPick(substreamIds); }
 
   protected:
index 0caf2b94715b39534a25a66cb9988b40b130d133..ba20366541d57e4d2226b19e32f13669f6289b05 100644 (file)
@@ -169,7 +169,7 @@ DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
             gen.addr(), gen.size(), flag, requestorId);
 
         req->setStreamId(sid);
-        req->setSubStreamId(ssid);
+        req->setSubstreamId(ssid);
 
         req->taskId(ContextSwitchTaskId::DMA);
         PacketPtr pkt = new Packet(req, cmd);
index b2326fdb14c4ed1847315876b09353f819cdb38e..79cb724f7ca6b31b810ec7ba1cb5a3b73d33b5c7 100644 (file)
@@ -489,7 +489,7 @@ class Request
     }
 
     void
-    setSubStreamId(uint32_t ssid)
+    setSubstreamId(uint32_t ssid)
     {
         assert(hasStreamId());
         _substreamId = ssid;