From 04711dfd6632342f43e6318d714194d59480c33d Mon Sep 17 00:00:00 2001 From: Brandon Michael Whitchurch Date: Tue, 12 Dec 2023 09:34:13 -0800 Subject: [PATCH 1/3] Replace direct acceses of stdMem CustomData objects with calls to get/set functions --- src/sst/elements/memHierarchy/standardInterface.cc | 4 ++-- src/sst/elements/miranda/mirandaCPU.cc | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sst/elements/memHierarchy/standardInterface.cc b/src/sst/elements/memHierarchy/standardInterface.cc index 0d4eb206fe..bdb977a4bb 100644 --- a/src/sst/elements/memHierarchy/standardInterface.cc +++ b/src/sst/elements/memHierarchy/standardInterface.cc @@ -525,7 +525,7 @@ Event* StandardInterface::MemEventConverter::convert(StandardMem::MoveData* req) return move; } Event* StandardInterface::MemEventConverter::convert(StandardMem::CustomReq* req) { - CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->data); + CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->getData()); if (!req->needsResponse()) creq->setFlag(MemEventBase::F_NORESPONSE); @@ -620,7 +620,7 @@ StandardMem::Request* StandardInterface::convertResponseCustomResp(StandardMem:: StandardMem::Request* resp = req->needsResponse() ? req->makeResponse() : nullptr; StandardMem::CustomResp* cresp = static_cast(resp); if (cresp) { - cresp->data = static_cast(meb)->getCustomData(); + cresp->setData(static_cast(meb)->getCustomData()); } return cresp; } diff --git a/src/sst/elements/miranda/mirandaCPU.cc b/src/sst/elements/miranda/mirandaCPU.cc index 09e9b4f580..79d3baff31 100644 --- a/src/sst/elements/miranda/mirandaCPU.cc +++ b/src/sst/elements/miranda/mirandaCPU.cc @@ -263,9 +263,6 @@ void RequestGenCPU::StdMemHandler::handle(Interfaces::StandardMem::WriteResp* rs void RequestGenCPU::StdMemHandler::handle(Interfaces::StandardMem::CustomResp* rsp) { cpu->requestsPending[CUSTOM]--; - // The CustomResp destructor does not delete the data - // Do not need to delete the cpuReq data as the memory system should take care of that - delete rsp->data; } void RequestGenCPU::issueCustomRequest(CustomOpRequest* req) { From d414eec6d52cbd33655f5a8c1ab722136b9bcc93 Mon Sep 17 00:00:00 2001 From: Brandon Michael Whitchurch Date: Mon, 8 Jan 2024 17:28:15 -0800 Subject: [PATCH 2/3] refactor Miranda to use new interface for accessing CustomRequest/Response data --- src/sst/elements/memHierarchy/standardInterface.cc | 2 +- src/sst/elements/miranda/mirandaCPU.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sst/elements/memHierarchy/standardInterface.cc b/src/sst/elements/memHierarchy/standardInterface.cc index bdb977a4bb..681a8861f4 100644 --- a/src/sst/elements/memHierarchy/standardInterface.cc +++ b/src/sst/elements/memHierarchy/standardInterface.cc @@ -525,7 +525,7 @@ Event* StandardInterface::MemEventConverter::convert(StandardMem::MoveData* req) return move; } Event* StandardInterface::MemEventConverter::convert(StandardMem::CustomReq* req) { - CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->getData()); + CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->releaseData()); if (!req->needsResponse()) creq->setFlag(MemEventBase::F_NORESPONSE); diff --git a/src/sst/elements/miranda/mirandaCPU.cc b/src/sst/elements/miranda/mirandaCPU.cc index 79d3baff31..823c480938 100644 --- a/src/sst/elements/miranda/mirandaCPU.cc +++ b/src/sst/elements/miranda/mirandaCPU.cc @@ -263,6 +263,9 @@ void RequestGenCPU::StdMemHandler::handle(Interfaces::StandardMem::WriteResp* rs void RequestGenCPU::StdMemHandler::handle(Interfaces::StandardMem::CustomResp* rsp) { cpu->requestsPending[CUSTOM]--; + // The CustomResp destructor does not delete the data + // Do not need to delete the cpuReq data as the memory system should take care of that + delete rsp->releaseData(); } void RequestGenCPU::issueCustomRequest(CustomOpRequest* req) { From eaf9ecb20fc993d5a26795de8db5b068c043c27d Mon Sep 17 00:00:00 2001 From: Brandon Michael Whitchurch Date: Mon, 8 Jan 2024 19:25:50 -0800 Subject: [PATCH 3/3] change default --std to c++17 (supported in latest pinCRT) --- src/sst/elements/osseous/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sst/elements/osseous/Makefile.am b/src/sst/elements/osseous/Makefile.am index 6f4dc66b73..5d05870594 100644 --- a/src/sst/elements/osseous/Makefile.am +++ b/src/sst/elements/osseous/Makefile.am @@ -2,7 +2,7 @@ # # INCLUDE = -I$(top_srcdir)/src/sst/elements/osseous/eras_datatypes/ -I$(top_srcdir)/src/sst/elements/ariel/ -FLAGS = -fpermissive -std=c++11 +FLAGS = -fpermissive -std=c++17 AM_CPPFLAGS += \