Skip to content

Commit

Permalink
refactor Miranda to use new interface for accessing
Browse files Browse the repository at this point in the history
CustomRequest/Response data
  • Loading branch information
bwhitchurch committed Jan 9, 2024
1 parent 04711df commit d414eec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sst/elements/memHierarchy/standardInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions src/sst/elements/miranda/mirandaCPU.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d414eec

Please sign in to comment.