Wei-Han Chen has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/67591?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: fastmodel: forward stream ID to gem5
......................................................................

fastmodel: forward stream ID to gem5

This CL enables forwarding stream ID from amba_pv to gem5 world.

The stream ID information is originally stored in master_id of
pv::TransactionAtrribute, then it will be stored to m_id of
amba_pv::amba_pv_extension.

This CL brings the information to stream ID field of
Gem5SystemC::ControlExtension. Then the information can be set to stream
ID of the gem5 packet's request.

After bringing the information to gem5, we can identify the packet's
stream ID from gem5 side. One example usage is PL330. In PL330_DMAC, each
transaction is associated with a stream ID. If we can identitfy the
stream ID, we can, for example, set attribute to specific DMAC channel.

Change-Id: I943ce49fde57b0bcfc18b58c7566eec61cc676f4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67591
Reviewed-by: Yu-hsin Wang <yuhsi...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
---
M src/arch/arm/fastmodel/FastModel.py
M src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
M src/arch/arm/fastmodel/amba_to_tlm_bridge.hh
3 files changed, 39 insertions(+), 1 deletion(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Yu-hsin Wang: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/fastmodel/FastModel.py b/src/arch/arm/fastmodel/FastModel.py
index 8a28522..1ea3c5e 100644
--- a/src/arch/arm/fastmodel/FastModel.py
+++ b/src/arch/arm/fastmodel/FastModel.py
@@ -108,6 +108,10 @@
     amba = AmbaTargetSocket(64, "AMBA PV target socket")
     tlm = TlmInitiatorSocket(64, "TLM initiator socket")

+    set_stream_id = Param.Bool(
+        False, "Set this true to forward stream ID to gem5 world"
+    )
+

 class AmbaFromTlmBridge64(SystemC_ScModule):
     type = "AmbaFromTlmBridge64"
diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
index 888e077..2f065fc 100644
--- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
+++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.cc
@@ -77,7 +77,8 @@
     targetProxy("target_proxy"),
     initiatorProxy("initiator_proxy"),
     tlmWrapper(initiatorProxy, std::string(name) + ".tlm", -1),
-    ambaWrapper(amba_pv_s, std::string(name) + ".amba", -1)
+    ambaWrapper(amba_pv_s, std::string(name) + ".amba", -1),
+    setStreamId(params.set_stream_id)
 {
     targetProxy.register_b_transport(this, &AmbaToTlmBridge64::bTransport);
     targetProxy.register_get_direct_mem_ptr(
@@ -191,6 +192,10 @@
     control_ex->setSecure(!amba_ex->is_non_secure());
     control_ex->setInstruction(amba_ex->is_instruction());

+    if (setStreamId) {
+        control_ex->setStreamId(amba_ex->get_id());
+    }
+
     if (trans.has_mm()) {
         trans.set_auto_extension(control_ex);
     } else {
diff --git a/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh b/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh
index 176d31f..6729604 100644
--- a/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh
+++ b/src/arch/arm/fastmodel/amba_to_tlm_bridge.hh
@@ -71,6 +71,7 @@
AmbaToTlmBridge64, 64, tlm::tlm_base_protocol_types> initiatorProxy;
     sc_gem5::TlmInitiatorWrapper<64> tlmWrapper;
     AmbaTarget ambaWrapper;
+    bool setStreamId;
 };

 } // namespace fastmodel

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/67591?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I943ce49fde57b0bcfc18b58c7566eec61cc676f4
Gerrit-Change-Number: 67591
Gerrit-PatchSet: 3
Gerrit-Owner: Wei-Han Chen <weihanc...@google.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Wei-Han Chen <weihanc...@google.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to