diff --git a/src/sst/elements/memHierarchy/Makefile.am b/src/sst/elements/memHierarchy/Makefile.am index f190c100ad..16c328c566 100644 --- a/src/sst/elements/memHierarchy/Makefile.am +++ b/src/sst/elements/memHierarchy/Makefile.am @@ -79,10 +79,6 @@ libmemHierarchy_la_SOURCES = \ scratchpad.cc \ coherencemgr/coherenceController.h \ coherencemgr/coherenceController.cc \ - memHierarchyInterface.cc \ - memHierarchyInterface.h \ - memHierarchyScratchInterface.cc \ - memHierarchyScratchInterface.h \ standardInterface.cc \ standardInterface.h \ coherencemgr/MESI_L1.h \ @@ -334,8 +330,6 @@ nobase_sst_HEADERS = \ memNICFour.h \ memLink.h \ memLinkBase.h \ - memHierarchyInterface.h \ - memHierarchyScratchInterface.h \ customcmd/customCmdMemory.h \ membackend/backing.h \ membackend/memBackend.h \ diff --git a/src/sst/elements/memHierarchy/memHierarchyInterface.cc b/src/sst/elements/memHierarchy/memHierarchyInterface.cc deleted file mode 100644 index 1f44dc360c..0000000000 --- a/src/sst/elements/memHierarchy/memHierarchyInterface.cc +++ /dev/null @@ -1,276 +0,0 @@ -// -*- mode: c++ -*- -// Copyright 2009-2023 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2023, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. -// - -#include -#include "memHierarchyInterface.h" - -#include -#include - -using namespace SST; -using namespace SST::MemHierarchy; -using namespace SST::Interfaces; - - -DISABLE_WARN_DEPRECATED_DECLARATION -MemHierarchyInterface::MemHierarchyInterface(SST::ComponentId_t id, Params ¶ms, TimeConverter * time, HandlerBase* handler) : - SimpleMem(id, params) -{ - - setDefaultTimeBase(time); // Required for link since we no longer inherit it from our parent - - output.init("", 1, 0, Output::STDOUT); - rqstr_ = ""; - initDone_ = false; - - output.output("DEPRECATION NOTICE: memHierarchy.memInterface uses the deprecated SST-Core SimpleMem Interface. This subcomponent is deprecated in favor of memHierarchy.standardMem which uses the SST-Core StandardMem Interface. memHierarchy.memInterface will be removed in SST 13\n"); - - recvHandler_ = handler; - std::string portname = params.find("port", "port"); - if ( NULL == recvHandler_) - link_ = configureLink(portname); - else - link_ = configureLink(portname, new Event::Handler(this, &MemHierarchyInterface::handleIncoming)); - - if (!link_) - output.fatal(CALL_INFO, -1, "%s, Error: unable to configure link on port '%s'\n", getName().c_str(), portname.c_str()); -} - -void MemHierarchyInterface::init(unsigned int phase) { - /* Send region message */ - if (!phase) { - MemRegion region; - region.start = 0; - region.end = (uint64_t) - 1; - region.interleaveStep = 0; - region.interleaveSize = 0; - link_->sendUntimedData(new MemEventInitRegion(getName(), region, false)); - - MemEventInitCoherence * event = new MemEventInitCoherence(getName(), Endpoint::CPU, false, false, 0, false); - link_->sendUntimedData(event); - - } - - while (SST::Event * ev = link_->recvUntimedData()) { - MemEventInit * memEvent = dynamic_cast(ev); - if (memEvent) { - if (memEvent->getCmd() == Command::NULLCMD) { - rqstr_ = memEvent->getSrc(); - if (memEvent->getInitCmd() == MemEventInit::InitCommand::Coherence) { - MemEventInitCoherence * memEventC = static_cast(memEvent); - baseAddrMask_ = ~(memEventC->getLineSize() - 1); - lineSize_ = memEventC->getLineSize(); - initDone_ = true; - } - } - } - delete ev; - } - - if (initDone_) { // Drain send queue - while (!initSendQueue_.empty()) { - link_->sendUntimedData(initSendQueue_.front()); - initSendQueue_.pop(); - } - } - -} - -void MemHierarchyInterface::sendInitData(SimpleMem::Request *req){ - MemEventInit *me = new MemEventInit(getName(), Command::Write, req->addrs[0], req->data); - if (initDone_) - link_->sendUntimedData(me); - else - initSendQueue_.push(me); -} - - -void MemHierarchyInterface::sendRequest(SimpleMem::Request *req){ - MemEventBase *me; - if (req->cmd == SimpleMem::Request::CustomCmd) { - me = createCustomEvent(req); - } else { - me = createMemEvent(req); - } - requests_[me->getID()] = req; - link_->send(me); -} - -SimpleMem::Request* MemHierarchyInterface::recvResponse(void){ - SST::Event *ev = link_->recv(); - if (NULL != ev) { - MemEventBase *me = static_cast(ev); - Request *req = processIncoming(me); - delete me; - return req; - } - return NULL; -} - -MemEventBase* MemHierarchyInterface::createMemEvent(SimpleMem::Request *req) const{ - Command cmd = Command::NULLCMD; - - switch ( req->cmd ) { - case SimpleMem::Request::Read: cmd = Command::GetS; break; - case SimpleMem::Request::Write: cmd = Command::Write; break; - case SimpleMem::Request::ReadResp: cmd = Command::GetXResp; break; - case SimpleMem::Request::WriteResp: cmd = Command::GetSResp; break; - case SimpleMem::Request::FlushLine: cmd = Command::FlushLine; break; - case SimpleMem::Request::FlushLineInv: cmd = Command::FlushLineInv; break; - case SimpleMem::Request::FlushLineResp: cmd = Command::FlushLineResp; break; - default: output.fatal(CALL_INFO, -1, "Unknown req->cmd in createMemEvent()\n"); - } - - Addr baseAddr = (req->addrs[0]) & baseAddrMask_; - - MemEvent *me = new MemEvent(getName(), req->addrs[0], baseAddr, cmd); - - me->setRqstr(rqstr_); - me->setDst(rqstr_); - me->setSize(req->size); - - if (SimpleMem::Request::Write == req->cmd) { - if (req->data.size() == 0) { - req->data.resize(req->size, 0); - } - if (req->data.size() != req->size) - output.output("Warning: In memHierarchyInterface, write request size does not match payload size. Request size: %zu. Payload size: %zu. MemEvent will use payload size\n", req->size, req->data.size()); - - me->setPayload(req->data); - } - - if(req->flags & SimpleMem::Request::F_NONCACHEABLE) - me->setFlag(MemEvent::F_NONCACHEABLE); - - if(req->flags & SimpleMem::Request::F_LOCKED) { - me->setFlag(MemEvent::F_LOCKED); - if (req->cmd == SimpleMem::Request::Read) - me->setCmd(Command::GetSX); - } - - if(req->flags & SimpleMem::Request::F_LLSC){ - me->setFlag(MemEvent::F_LLSC); - } - - me->setVirtualAddress(req->getVirtualAddress()); - me->setInstructionPointer(req->getInstructionPointer()); - - me->setMemFlags(req->memFlags); - -#ifdef __SST_DEBUG_OUTPUT__ - // These checks are only enabled if sst-core is configured with "--enable-debug" - // Check that we did actually complete the initialization during init, really should only check this once but no good place to do it - if (!initDone_) { - output.fatal(CALL_INFO, -1, "Error: In memHierarcnyInterface (%s), init() was never completed and line address mask was not set.\n", - getName().c_str()); - } - - // Check that the request doesn't span cache lines - Addr lastAddr = me->getAddr() + me->getSize() - 1; - lastAddr &= baseAddrMask_; - if (lastAddr != me->getBaseAddr()) { - output.fatal(CALL_INFO, -1, "Error: In memHierarchy Interface (%s), Request cannot span multiple cache lines! Line mask = %" PRIu64 ". Event is: %s\n", - getName().c_str(), baseAddrMask_, me->getVerboseString().c_str()); - } - -#endif - - return me; -} - - -MemEventBase* MemHierarchyInterface::createCustomEvent(SimpleMem::Request * req) const { - output.fatal(CALL_INFO, -1, "%s, Error: SimpleMem is deprecated in favor of StandardMem and no longer supports custom operations. Please switch to StandardMem instead.\n", - getName().c_str()); - return nullptr; -} - -/* Handle (response) events from memHierarchy - * Update original request - * Call owner's callback - */ -void MemHierarchyInterface::handleIncoming(SST::Event *ev){ - MemEventBase *me = static_cast(ev); - SimpleMem::Request *req = processIncoming(me); - if (req) (*recvHandler_)(req); - delete me; -} - -/* Match response to request. Update request with results. Return request to processor */ -SimpleMem::Request* MemHierarchyInterface::processIncoming(MemEventBase *ev){ - SimpleMem::Request *req = NULL; - Command cmd = ev->getCmd(); - MemEventBase::id_type origID = ev->getResponseToID(); - - std::map::iterator i = requests_.find(origID); - if(i != requests_.end()){ - req = i->second; - requests_.erase(i); - if (req->cmd == SimpleMem::Request::CustomCmd) { - updateCustomRequest(req, ev); - } else { - updateRequest(req, static_cast(ev)); - } - } else if (cmd == Command::Inv) { /* Invalidation notifications to core (only if enabled in caches) */ - MemEvent* event = static_cast(ev); - req = new SimpleMem::Request(SimpleMem::Request::Inv, event->getBaseAddr(), event->getSize()); - } else { - output.fatal(CALL_INFO, -1, "(%s interface) Unable to find matching request. Event: %s\n", getName().c_str(), ev->getVerboseString().c_str()); - } - return req; -} - -void MemHierarchyInterface::updateRequest(SimpleMem::Request* req, MemEvent *me) const{ - switch (me->getCmd()) { - case Command::GetSResp: - req->cmd = SimpleMem::Request::ReadResp; - req->data = me->getPayload(); - req->size = me->getPayload().size(); - break; - case Command::WriteResp: - case Command::GetXResp: - req->cmd = SimpleMem::Request::WriteResp; - if (me->success()) - req->flags |= (SimpleMem::Request::F_LLSC_RESP); - break; - case Command::FlushLineResp: - req->cmd = SimpleMem::Request::FlushLineResp; - if (me->success()) - req->flags |= (SimpleMem::Request::F_FLUSH_SUCCESS); - break; - default: - output.fatal(CALL_INFO, -1, "%s, Don't know how to deal with command %s\n", getName().c_str(), CommandString[(int)me->getCmd()]); - } - // Always update memFlags to faciliate mem->processor communication - req->memFlags = me->getMemFlags(); - -} - - -void MemHierarchyInterface::updateCustomRequest(SimpleMem::Request* req, MemEventBase *ev) const{ - CustomMemEvent* cev = static_cast(ev); - req->cmd = SimpleMem::Request::CustomCmd; -} - -bool MemHierarchyInterface::initialize(const std::string &linkName, HandlerBase *handler){ - recvHandler_ = handler; - if ( NULL == recvHandler_) link_ = configureLink(linkName); - else link_ = configureLink(linkName, new Event::Handler(this, &MemHierarchyInterface::handleIncoming)); - - return (link_ != NULL); -} -REENABLE_WARNING diff --git a/src/sst/elements/memHierarchy/memHierarchyInterface.h b/src/sst/elements/memHierarchy/memHierarchyInterface.h deleted file mode 100644 index ea25233c6b..0000000000 --- a/src/sst/elements/memHierarchy/memHierarchyInterface.h +++ /dev/null @@ -1,121 +0,0 @@ -// -*- mode: c++ -*- -// Copyright 2009-2023 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2023, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. -// - -#ifndef COMPONENTS_MEMHIERARCHY_MEMORYINTERFACE -#define COMPONENTS_MEMHIERARCHY_MEMORYINTERFACE - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "sst/elements/memHierarchy/memEventBase.h" -#include "sst/elements/memHierarchy/memEvent.h" -#include "sst/elements/memHierarchy/memEventCustom.h" - -namespace SST { - -class Component; -class Event; -/* - * THIS SUBCOMPONENT IS DEPRECATED - * This class implements the simpleMem interface which has been deprecated. - * Use the StandardMem interface with memHierarchy.standardInterface instead. - */ -namespace MemHierarchy { - -/** Class is used to interface a compute mode (CPU, GPU) to MemHierarchy */ -DISABLE_WARN_DEPRECATED_DECLARATION -class MemHierarchyInterface : public Interfaces::SimpleMem { - -public: -/* Element Library Info */ - SST_ELI_REGISTER_SUBCOMPONENT(MemHierarchyInterface, "memHierarchy", "memInterface", SST_ELI_ELEMENT_VERSION(1,0,0), - "[DEPRECATED: Use standInterface instead] Interface to memory hierarchy. Converts SimpleMem requests into MemEventBases.", SST::Interfaces::SimpleMem) - SST_ELI_DOCUMENT_PARAMS( {"port", "Optional, specify the owning component's port to used (not needed if this subcomponent is loaded in the input config)", ""} ) - - SST_ELI_DOCUMENT_PORTS( {"port", "Port to memory hierarchy (caches/memory/etc.)", {}} ) - -/* Begin class definition */ - MemHierarchyInterface(SST::ComponentId_t id, Params ¶ms, TimeConverter* time, HandlerBase* handler = NULL); - - /** Initialize the link to be used to connect with MemHierarchy */ - virtual bool initialize(const std::string &linkName, HandlerBase *handler = NULL); - - /** Link getter */ - virtual SST::Link* getLink(void) const { return link_; } - - [[deprecated("sendInitData() has been deprecated and will be removed in SST 14. Please use sendUntimedData().")]] - virtual void sendInitData(Request *req); - virtual void sendUntimedData(Request *req) { - DISABLE_WARN_DEPRECATED_DECLARATION - sendInitData(req); - REENABLE_WARNING - } - virtual void sendRequest(Request *req); - virtual Request* recvResponse(void); - - void init(unsigned int phase); - - virtual Addr getLineSize() { return lineSize_; } - -protected: - /** Function to create the custom memEvent that will be used by MemHierarchy */ - virtual MemEventBase* createCustomEvent(Interfaces::SimpleMem::Request* req) const; - - /** Function to update a SimpleMem request with a custom memEvent response */ - virtual void updateCustomRequest(Interfaces::SimpleMem::Request* req, MemEventBase *ev) const; - - std::map requests_; - Output output; - Addr baseAddrMask_; - Addr lineSize_; - std::string rqstr_; - - SST::Link* link_; - - bool initDone_; - std::queue initSendQueue_; - - -private: - - /** Convert any incoming events to updated Requests, and fire handler */ - void handleIncoming(SST::Event *ev); - - /** Process MemEvents into updated Requests*/ - Interfaces::SimpleMem::Request* processIncoming(MemEventBase *ev); - - /** Update Request with results of MemEvent. Calls updateCustomRequest for custom events. */ - void updateRequest(Interfaces::SimpleMem::Request* req, MemEvent *me) const; - - /** Function used internally to create the memEvent that will be used by MemHierarchy */ - MemEventBase* createMemEvent(Interfaces::SimpleMem::Request* req) const; - HandlerBase* recvHandler_; -}; -REENABLE_WARNING - -} -} - -#endif diff --git a/src/sst/elements/memHierarchy/memHierarchyScratchInterface.cc b/src/sst/elements/memHierarchy/memHierarchyScratchInterface.cc deleted file mode 100644 index 9328f88e6f..0000000000 --- a/src/sst/elements/memHierarchy/memHierarchyScratchInterface.cc +++ /dev/null @@ -1,243 +0,0 @@ -// -*- mode: c++ -*- -// Copyright 2009-2023 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2023, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. -// - -#include -#include "memHierarchyScratchInterface.h" - -#include -#include - - -using namespace SST; -using namespace SST::MemHierarchy; -using namespace SST::Interfaces; - - -DISABLE_WARN_DEPRECATED_DECLARATION -MemHierarchyScratchInterface::MemHierarchyScratchInterface(SST::ComponentId_t id, Params ¶ms, TimeConverter* time, HandlerBase* handler) : - SimpleMem(id, params) -{ - setDefaultTimeBase(time); - - output.init("", 1, 0, Output::STDOUT); - - output.output("DEPRECATION NOTICE: memHierarchy.scratchInterface uses the deprecated SST-Core SimpleMem Interface. This subcomponent is deprecated in favor of memHierarchy.standardMem which uses the SST-Core StandardMem Interface. memHierarchy.memInterface will be removed in SST 13\n"); - - bool found; - UnitAlgebra size = UnitAlgebra(params.find("scratchpad_size", "0B", found)); - if (!found) - output.fatal(CALL_INFO, -1, "Param not specified (%s): scratchpad_size - size of scratchpad\n", getName().c_str()); - if (!size.hasUnits("B")) - output.fatal(CALL_INFO, -1, "Invalid param (%s): scratchpad_size - must have units of 'B'. SI units ok. You specified '%s'\n", getName().c_str(), size.toString().c_str()); - remoteMemStart_ = size.getRoundedValue(); - - initDone_ = false; - - recvHandler_ = handler; - if ( NULL == recvHandler_) - link_ = configureLink("port"); - else - link_ = configureLink("port", new Event::Handler(this, &MemHierarchyScratchInterface::handleIncoming)); - - if (!link_) - output.fatal(CALL_INFO, -1, "%s, Error: unable to configure link on port 'port'\n", getName().c_str()); -} - - -void MemHierarchyScratchInterface::init(unsigned int phase) { - if (!phase) { - MemRegion region; - region.start = 0; - region.end = (uint64_t) - 1; - region.interleaveStep = 0; - region.interleaveSize = 0; - link_->sendUntimedData(new MemEventInitRegion(getName(), region, false)); - // Name, NULLCMD, Endpoint type, inclusive of all upper levels, will send writeback acks, line size - link_->sendUntimedData(new MemEventInitCoherence(getName(), Endpoint::CPU, false, false, 0, false)); - } - - while (SST::Event * ev = link_->recvUntimedData()) { - MemEventInit * memEvent = dynamic_cast(ev); - if (memEvent) { - if (memEvent->getInitCmd() == MemEventInit::InitCommand::Coherence) { - MemEventInitCoherence * memEventC = static_cast(memEvent); - baseAddrMask_ = ~(memEventC->getLineSize() - 1); - lineSize_ = memEventC->getLineSize(); - rqstr_ = memEventC->getSrc(); - allNoncache_ = (Endpoint::Scratchpad == memEventC->getType()); - initDone_ = true; - } - } - delete ev; - } - - if (initDone_) { - while (!initSendQueue_.empty()) { - link_->sendUntimedData(initSendQueue_.front()); - initSendQueue_.pop(); - } - } -} - -void MemHierarchyScratchInterface::sendInitData(SimpleMem::Request *req) { - MemEventInit * event = new MemEventInit(getName(), Command::GetX, req->addrs[0], req->data); - if (initDone_) - link_->sendUntimedData(event); - else - initSendQueue_.push(event); -} - - -void MemHierarchyScratchInterface::sendRequest(SimpleMem::Request *req){ - MemEventBase * event; - if (req->addrs.size() > 1) { - event = createMoveEvent(req); - } else { - event = createMemEvent(req); - } - requests_[event->getID()] = req; - link_->send(event); -} - -SimpleMem::Request* MemHierarchyScratchInterface::recvResponse(void){ - SST::Event *ev = link_->recv(); - if (NULL != ev) { - MemEventBase *event = static_cast(ev); - Request *req = processIncoming(event); - delete event; - return req; - } - return NULL; -} - -MemEvent * MemHierarchyScratchInterface::createMemEvent(SimpleMem::Request * req) const { - Command cmd = Command::NULLCMD; - - switch (req->cmd) { - case SimpleMem::Request::Read : cmd = Command::GetS; break; - case SimpleMem::Request::Write : cmd = Command::Write; break; - case SimpleMem::Request::FlushLine: cmd = Command::FlushLine; break; - case SimpleMem::Request::FlushLineInv: cmd = Command::FlushLineInv; break; - default: output.fatal(CALL_INFO, -1, "MemHierarchyScratchInterface received unknown command in createMemEvent\n"); - } - - Addr baseAddr = req->addrs[0] & baseAddrMask_; - - MemEvent * me = new MemEvent(getName(), req->addrs[0], baseAddr, cmd); - - /* Set remote memory accesses to noncacheable so that any cache avoids trying to cache the response */ - if (me->getAddr() >= remoteMemStart_ || allNoncache_) { - me->setFlag(MemEvent::F_NONCACHEABLE); - } - - me->setSize(req->size); - me->setRqstr(rqstr_); - me->setDst(rqstr_); - - if (SimpleMem::Request::Write == req->cmd) { - if (req->data.size() == 0) req->data.resize(req->size, 0); - if (req->data.size() != req->size) - output.output("Warning: In memHierarchyScratchInterface, write request size does not match payload size. Request size: %zu, Payload size: %zu. Using payload size.\n", req->size, req->data.size()); - me->setPayload(req->data); - } - return me; -} - - -MoveEvent* MemHierarchyScratchInterface::createMoveEvent(SimpleMem::Request *req) const{ - Command cmd = Command::NULLCMD; - - switch ( req->cmd ) { - case SimpleMem::Request::Read: cmd = Command::Get; break; - case SimpleMem::Request::Write: cmd = Command::Put; break; - default: output.fatal(CALL_INFO, -1, "Unknown req->cmd in createMoveEvent()\n"); - } - - MoveEvent *me = new MoveEvent(getName(), req->addrs[1], req->addrs[1], req->addrs[0], req->addrs[0], cmd); - - if (cmd == Command::Get) { - me->setDstBaseAddr(req->addrs[0] & baseAddrMask_); - } else { - me->setSrcBaseAddr(req->addrs[1] & baseAddrMask_); - } - - me->setRqstr(rqstr_); - me->setDst(rqstr_); - me->setSize(req->size); - - me->setDstVirtualAddress(req->getVirtualAddress()); - me->setInstructionPointer(req->getInstructionPointer()); - - me->setMemFlags(req->memFlags); - - return me; -} - - -void MemHierarchyScratchInterface::handleIncoming(SST::Event *ev){ - MemEventBase *me = static_cast(ev); - SimpleMem::Request *req = processIncoming(me); - if(req) (*recvHandler_)(req); - delete me; -} - -SimpleMem::Request* MemHierarchyScratchInterface::processIncoming(MemEventBase *ev){ - SimpleMem::Request *req = NULL; - Command cmd = ev->getCmd(); - SST::Event::id_type origID = ev->getResponseToID(); - - std::map::iterator i = requests_.find(origID); - if(i != requests_.end()){ - req = i->second; - requests_.erase(i); - updateRequest(req, ev); - } - else{ - output.fatal(CALL_INFO, -1, "Unable to find matching request. Cmd = %s, respID = %" PRIx64 "\n", CommandString[(int)ev->getCmd()], ev->getResponseToID().first); - } - return req; -} - -void MemHierarchyScratchInterface::updateRequest(SimpleMem::Request* req, MemEventBase *me) const{ - switch (me->getCmd()) { - case Command::AckMove: - req->cmd = SimpleMem::Request::ReadResp; - break; - case Command::GetSResp: - req->cmd = SimpleMem::Request::ReadResp; - req->data = static_cast(me)->getPayload(); - req->size = req->data.size(); - break; - case Command::WriteResp: - req->cmd = SimpleMem::Request::WriteResp; - break; - default: - output.fatal(CALL_INFO, -1, "Don't know how to deal with command %s\n", CommandString[(int)me->getCmd()]); - } - // Always update memFlags to faciliate mem->processor communication - req->memFlags = me->getMemFlags(); - -} - -bool MemHierarchyScratchInterface::initialize(const std::string &linkName, HandlerBase *handler){ - recvHandler_ = handler; - if ( NULL == recvHandler_) link_ = configureLink(linkName); - else link_ = configureLink(linkName, new Event::Handler(this, &MemHierarchyScratchInterface::handleIncoming)); - - return (link_ != NULL); -} -REENABLE_WARNING diff --git a/src/sst/elements/memHierarchy/memHierarchyScratchInterface.h b/src/sst/elements/memHierarchy/memHierarchyScratchInterface.h deleted file mode 100644 index f205d2440d..0000000000 --- a/src/sst/elements/memHierarchy/memHierarchyScratchInterface.h +++ /dev/null @@ -1,111 +0,0 @@ -// -*- mode: c++ -*- -// Copyright 2009-2023 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2023, NTESS -// All rights reserved. -// -// Portions are copyright of other developers: -// See the file CONTRIBUTORS.TXT in the top level directory -// of the distribution for more information. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. -// - -#ifndef COMPONENTS_MEMHIERARCHY_SCRATCHINTERFACE -#define COMPONENTS_MEMHIERARCHY_SCRATCHINTERFACE - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "sst/elements/memHierarchy/memEventBase.h" -#include "sst/elements/memHierarchy/moveEvent.h" -#include "sst/elements/memHierarchy/memEvent.h" - -namespace SST { - -class Component; -class Event; -/* - * THIS SUBCOMPONENT IS DEPRECATED - * This class implements the simpleMem interface which has been deprecated. - * Use the StandardMem interface with memHierarchy.standardInterface instead. - */ -namespace MemHierarchy { - -/** Class is used to interface a compute mode (CPU, GPU) to MemHierarchy Scratchpad */ -DISABLE_WARN_DEPRECATED_DECLARATION -class MemHierarchyScratchInterface : public Interfaces::SimpleMem { - -public: -/* Element Library Info */ - SST_ELI_REGISTER_SUBCOMPONENT(MemHierarchyScratchInterface, "memHierarchy", "scratchInterface", SST_ELI_ELEMENT_VERSION(1,0,0), - "[DEPRECATED: Use standard.interface instead] Interface to a scratchpad", SST::Interfaces::SimpleMem) - - SST_ELI_DOCUMENT_PARAMS( { "scratchpad_size", "Size of the scratchpad, with units" } ) - - SST_ELI_DOCUMENT_PORTS( {"port", "Port to memory hierarchy (caches/memory/etc.)", {}} ) - -/* Begin class definition */ - MemHierarchyScratchInterface(SST::ComponentId_t id, Params ¶ms, TimeConverter* time, HandlerBase *handler = NULL); - - /** Initialize the link to be used to connect with MemHierarchy */ - virtual bool initialize(const std::string &linkName, HandlerBase *handler = NULL); - - /** Link getter */ - virtual SST::Link* getLink(void) const { return link_; } - - virtual void init(unsigned int phase); - - virtual void sendInitData(Request *req); - virtual void sendRequest(Request *req); - virtual Request* recvResponse(void); - - virtual Addr getLineSize() { return lineSize_; } - - Output output; - -private: - - /** Convert any incoming events to updated Requests, and fire handler */ - void handleIncoming(SST::Event *ev); - - /** Process ScratchEvents into updated Requests*/ - Interfaces::SimpleMem::Request* processIncoming(MemEventBase *ev); - - /** Update Request with results of ScratchEvent */ - void updateRequest(Interfaces::SimpleMem::Request* req, MemEventBase *me) const; - - /** Function used internally to create the ScratchEvent that will be used by MemHierarchy */ - MoveEvent* createMoveEvent(Interfaces::SimpleMem::Request* req) const; - MemEvent* createMemEvent(Interfaces::SimpleMem::Request* req) const; - - std::map requests_; - HandlerBase* recvHandler_; - SST::Link* link_; - Addr baseAddrMask_; - Addr lineSize_; - std::string rqstr_; - Addr remoteMemStart_; - bool allNoncache_; - - bool initDone_; - std::queue initSendQueue_; -}; -REENABLE_WARNING - -} -} - -#endif diff --git a/src/sst/elements/shogun/shogun_nic.cc b/src/sst/elements/shogun/shogun_nic.cc index be96d096e9..f4643faca7 100644 --- a/src/sst/elements/shogun/shogun_nic.cc +++ b/src/sst/elements/shogun/shogun_nic.cc @@ -54,11 +54,6 @@ ShogunNIC::~ShogunNIC() delete output; } -void ShogunNIC::sendInitData(SimpleNetwork::Request* req) -{ - sendUntimedData(req); -} - void ShogunNIC::sendUntimedData(SimpleNetwork::Request* req) { output->verbose(CALL_INFO, 8, 0, "Send init-data called.\n"); @@ -72,11 +67,6 @@ void ShogunNIC::sendUntimedData(SimpleNetwork::Request* req) output->verbose(CALL_INFO, 8, 0, "Send init-data completed.\n"); } -SimpleNetwork::Request* ShogunNIC::recvInitData() -{ - return recvUntimedData(); -} - SimpleNetwork::Request* ShogunNIC::recvUntimedData() { output->verbose(CALL_INFO, 8, 0, "Recv init-data on net: %5" PRId64 " init-events have %5zu events.\n", netID, initReqs.size()); diff --git a/src/sst/elements/shogun/shogun_nic.h b/src/sst/elements/shogun/shogun_nic.h index f0179dfd59..bcf38729c7 100644 --- a/src/sst/elements/shogun/shogun_nic.h +++ b/src/sst/elements/shogun/shogun_nic.h @@ -57,16 +57,12 @@ namespace Shogun { * Sends a network request during the init() phase */ void sendUntimedData(Request* req) override; - // Remove sendInitData() for SST 14 - void sendInitData(Request* req) override; /** * Receive any data during the init() phase. * @see SST::Link::recvInitData() */ Request* recvUntimedData() override; - // Remove recvInitData() for SST 14 - Request* recvInitData() override; /**