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 <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53625 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -40,6 +40,7 @@ SSTResponderSubComponent::SSTResponderSubComponent(SST::ComponentId_t id,
|
||||
{
|
||||
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 @@ SSTResponderSubComponent::setTimeConverter(SST::TimeConverter* tc)
|
||||
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
|
||||
|
||||
@@ -67,6 +67,7 @@ class SSTResponderSubComponent: public SST::SubComponent
|
||||
std::vector<SST::Interfaces::SimpleMem::Request*> initRequests;
|
||||
|
||||
std::string gem5SimObjectName;
|
||||
std::string memSize;
|
||||
|
||||
public:
|
||||
SSTResponderSubComponent(SST::ComponentId_t id, SST::Params& params);
|
||||
|
||||
Reference in New Issue
Block a user