Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/53625 )

Change subject: ext: Make gem5-SST Memory Size configurable from script
......................................................................

ext: Make gem5-SST Memory Size configurable from script

The memory interface param was hardcoded to 8GiB therefore
not matching any python changes in the memory size

Change-Id: I180f57f662886010a38a9b7ebbdbb73e0ae48276
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53625
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M ext/sst/sst_responder_subcomponent.cc
M ext/sst/sst_responder_subcomponent.hh
2 files changed, 21 insertions(+), 1 deletion(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Hoa Nguyen: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/ext/sst/sst_responder_subcomponent.cc b/ext/sst/sst_responder_subcomponent.cc
index 4c895ac..366f99a 100644
--- a/ext/sst/sst_responder_subcomponent.cc
+++ b/ext/sst/sst_responder_subcomponent.cc
@@ -40,6 +40,7 @@
 {
     sstResponder = new SSTResponder(this);
gem5SimObjectName = params.find<std::string>("response_receiver_name", "");
+    memSize = params.find<std::string>("mem_size", "8GiB");
     if (gem5SimObjectName == "")
         assert(false && "The response_receiver_name must be specified");
 }
@@ -58,7 +59,7 @@
     SST::Params interface_params;
// This is how you tell the interface the name of the port it should use
     interface_params.insert("port", "port");
-    interface_params.insert("mem_size", "8GiB");
+    interface_params.insert("mem_size", memSize.c_str());
// Loads a “memHierarchy.memInterface” into index 0 of the “memory” slot // SHARE_PORTS means the interface can use our port as if it were its own
     // INSERT_STATS means the interface will inherit our statistic
diff --git a/ext/sst/sst_responder_subcomponent.hh b/ext/sst/sst_responder_subcomponent.hh
index a897deb..51bc4f9 100644
--- a/ext/sst/sst_responder_subcomponent.hh
+++ b/ext/sst/sst_responder_subcomponent.hh
@@ -67,6 +67,7 @@
     std::vector<SST::Interfaces::SimpleMem::Request*> initRequests;

     std::string gem5SimObjectName;
+    std::string memSize;

   public:
     SSTResponderSubComponent(SST::ComponentId_t id, SST::Params& params);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53625
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: I180f57f662886010a38a9b7ebbdbb73e0ae48276
Gerrit-Change-Number: 53625
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Bobby Bruce <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to