From 09786817280b27158a00b661fb445c367e134c5c Mon Sep 17 00:00:00 2001 From: Yu-hsin Wang Date: Fri, 11 Dec 2020 11:32:02 +0800 Subject: [PATCH] mem: Align the Substream naming in Request Change-Id: Iac6a18d8872c7df4ade8ecf8914fa807cc3584e3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38457 Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/cpu/testers/traffic_gen/base.cc | 4 ++-- src/cpu/testers/traffic_gen/base.hh | 2 +- src/cpu/testers/traffic_gen/stream_gen.hh | 8 ++++---- src/dev/dma_device.cc | 2 +- src/mem/request.hh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cpu/testers/traffic_gen/base.cc b/src/cpu/testers/traffic_gen/base.cc index 5cf532074..737adbb68 100644 --- a/src/cpu/testers/traffic_gen/base.cc +++ b/src/cpu/testers/traffic_gen/base.cc @@ -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); } } diff --git a/src/cpu/testers/traffic_gen/base.hh b/src/cpu/testers/traffic_gen/base.hh index 01b560e60..018028b4c 100644 --- a/src/cpu/testers/traffic_gen/base.hh +++ b/src/cpu/testers/traffic_gen/base.hh @@ -331,7 +331,7 @@ class BaseTrafficGen : public ClockedObject /** Currently active generator */ std::shared_ptr activeGenerator; - /** Stream/SubStreamID Generator */ + /** Stream/SubstreamID Generator */ std::unique_ptr streamGenerator; }; diff --git a/src/cpu/testers/traffic_gen/stream_gen.hh b/src/cpu/testers/traffic_gen/stream_gen.hh index a4eb5bbc7..01aab9be5 100644 --- a/src/cpu/testers/traffic_gen/stream_gen.hh +++ b/src/cpu/testers/traffic_gen/stream_gen.hh @@ -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 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: diff --git a/src/dev/dma_device.cc b/src/dev/dma_device.cc index 0caf2b947..ba2036654 100644 --- a/src/dev/dma_device.cc +++ b/src/dev/dma_device.cc @@ -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); diff --git a/src/mem/request.hh b/src/mem/request.hh index b2326fdb1..79cb724f7 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -489,7 +489,7 @@ class Request } void - setSubStreamId(uint32_t ssid) + setSubstreamId(uint32_t ssid) { assert(hasStreamId()); _substreamId = ssid; -- 2.30.2