diff --git a/src/sst/elements/GNA/Makefile.am b/src/sst/elements/GNA/Makefile.am deleted file mode 100644 index 863d207935..0000000000 --- a/src/sst/elements/GNA/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -*- Makefile -*- -# -# - -AM_CPPFLAGS += \ - $(MPI_CPPFLAGS) \ - -I$(top_srcdir)/src - -compdir = $(pkglibdir) -comp_LTLIBRARIES = libGNA.la -libGNA_la_SOURCES = \ - neuron.h \ - neuron.cc \ - GNA.h \ - GNA.cc \ - OutputHolder.h - -EXTRA_DIST = \ - README \ - tests/testsuite_default_GNA.py \ - tests/test_GNA_1.py \ - tests/model \ - tests/OutputParser.py - -libGNA_la_LDFLAGS = -module -avoid-version - -install-exec-hook: - $(SST_REGISTER_TOOL) SST_ELEMENT_SOURCE GNA=$(abs_srcdir) - $(SST_REGISTER_TOOL) SST_ELEMENT_TESTS GNA=$(abs_srcdir)/tests - diff --git a/src/sst/elements/gensa/Makefile.am b/src/sst/elements/gensa/Makefile.am new file mode 100644 index 0000000000..6c535f557d --- /dev/null +++ b/src/sst/elements/gensa/Makefile.am @@ -0,0 +1,30 @@ +# -*- Makefile -*- +# +# + +AM_CPPFLAGS += \ + $(MPI_CPPFLAGS) \ + -I$(top_srcdir)/src + +compdir = $(pkglibdir) +comp_LTLIBRARIES = libgensa.la +libgensa_la_SOURCES = \ + neuron.h \ + neuron.cc \ + gensa.h \ + gensa.cc \ + OutputHolder.h + +EXTRA_DIST = \ + README \ + tests/testsuite_default_gensa.py \ + tests/test_gensa_1.py \ + tests/model \ + tests/OutputParser.py + +libgensa_la_LDFLAGS = -module -avoid-version + +install-exec-hook: + $(SST_REGISTER_TOOL) SST_ELEMENT_SOURCE gensa=$(abs_srcdir) + $(SST_REGISTER_TOOL) SST_ELEMENT_TESTS gensa=$(abs_srcdir)/tests + diff --git a/src/sst/elements/GNA/OutputHolder.h b/src/sst/elements/gensa/OutputHolder.h similarity index 100% rename from src/sst/elements/GNA/OutputHolder.h rename to src/sst/elements/gensa/OutputHolder.h diff --git a/src/sst/elements/GNA/README b/src/sst/elements/gensa/README similarity index 100% rename from src/sst/elements/GNA/README rename to src/sst/elements/gensa/README diff --git a/src/sst/elements/GNA/GNA.cc b/src/sst/elements/gensa/gensa.cc similarity index 95% rename from src/sst/elements/GNA/GNA.cc rename to src/sst/elements/gensa/gensa.cc index f7dfa35748..ade2f2beec 100644 --- a/src/sst/elements/GNA/GNA.cc +++ b/src/sst/elements/gensa/gensa.cc @@ -14,7 +14,7 @@ // distribution. #include -#include "GNA.h" +#include "gensa.h" #include @@ -25,11 +25,11 @@ using namespace SST; //using namespace SST::MemHierarchy; -using namespace SST::GNAComponent; +using namespace SST::gensaComponent; using namespace std; -GNA::GNA (ComponentId_t id, Params & params) +gensa::gensa (ComponentId_t id, Params & params) : Component (id) { now = 0; @@ -40,7 +40,7 @@ GNA::GNA (ComponentId_t id, Params & params) numDeliveries = 0; uint32_t outputLevel = params.find ("verbose", 0); - out.init ("GNA:@p:@l: ", outputLevel, 0, Output::STDOUT); + out.init ("gensa:@p:@l: ", outputLevel, 0, Output::STDOUT); // get parameters modelPath = params.find("modelPath", "model"); @@ -50,7 +50,7 @@ GNA::GNA (ComponentId_t id, Params & params) //set our clock string clockFreq = params.find ("clock", "1GHz"); - clockTC = registerClock (clockFreq, new Clock::Handler (this, &GNA::clockTic)); + clockTC = registerClock (clockFreq, new Clock::Handler (this, &gensa::clockTic)); // tell the simulator not to end without us registerAsPrimaryComponent (); @@ -60,7 +60,7 @@ GNA::GNA (ComponentId_t id, Params & params) memory = loadUserSubComponent ( "memory", ComponentInfo::SHARE_NONE, clockTC, - new Interfaces::StandardMem::Handler (this, &GNA::handleMemory) + new Interfaces::StandardMem::Handler (this, &gensa::handleMemory) ); if (!memory) { @@ -68,23 +68,23 @@ GNA::GNA (ComponentId_t id, Params & params) memory = loadAnonymousSubComponent ( "memHierarchy.standardInterface", "memory", 0, ComponentInfo::SHARE_PORTS, params, clockTC, - new Interfaces::StandardMem::Handler(this, &GNA::handleMemory) + new Interfaces::StandardMem::Handler(this, &gensa::handleMemory) ); } if (!memory) out.fatal (CALL_INFO, -1, "Unable to load memHierarchy.standardInterface subcomponent\n"); link = loadUserSubComponent ("networkIF", ComponentInfo::SHARE_NONE, 1); if (!link) out.fatal (CALL_INFO, 1, "No networkIF subcomponent\n"); - link->setNotifyOnReceive (new Interfaces::SimpleNetwork::Handler (this, &GNA::handleNetwork)); + link->setNotifyOnReceive (new Interfaces::SimpleNetwork::Handler (this, &gensa::handleNetwork)); } -GNA::GNA () +gensa::gensa () : Component(-1) { // for serialization only } -GNA::~GNA () +gensa::~gensa () { for (auto n : neurons) delete n; while (! networkRequests.empty ()) @@ -95,7 +95,7 @@ GNA::~GNA () } void -GNA::init (unsigned int phase) +gensa::init (unsigned int phase) { memory->init (phase); link ->init (phase); @@ -274,21 +274,21 @@ GNA::init (unsigned int phase) } void -GNA::setup () +gensa::setup () { memory->setup (); link->setup (); } void -GNA::complete (unsigned int phase) +gensa::complete (unsigned int phase) { memory->complete (phase); link->complete (phase); } void -GNA::finish () +gensa::finish () { memory->finish (); link ->finish (); @@ -305,7 +305,7 @@ GNA::finish () // Retrieving synapse records and transmitting spike packets can run in parallel with executing the LIF model, // but the LIF model needs to stall until all spikes are sent. bool -GNA::clockTic (Cycle_t t) +gensa::clockTic (Cycle_t t) { using namespace Interfaces; if (! networkRequests.empty ()) @@ -366,7 +366,7 @@ GNA::clockTic (Cycle_t t) } void -GNA::handleMemory (Interfaces::StandardMem::Request * req) +gensa::handleMemory (Interfaces::StandardMem::Request * req) { SST::Interfaces::StandardMem::ReadResp * resp = dynamic_cast (req); assert (resp); @@ -386,7 +386,7 @@ GNA::handleMemory (Interfaces::StandardMem::Request * req) } bool -GNA::handleNetwork (int vn) +gensa::handleNetwork (int vn) { // Ignore vn. It should always be 0 because that's all we registered for. diff --git a/src/sst/elements/GNA/GNA.h b/src/sst/elements/gensa/gensa.h similarity index 88% rename from src/sst/elements/GNA/GNA.h rename to src/sst/elements/gensa/gensa.h index ccdd2c2e94..669d9a6f27 100755 --- a/src/sst/elements/GNA/GNA.h +++ b/src/sst/elements/gensa/gensa.h @@ -13,8 +13,8 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef _GNA_H -#define _GNA_H +#ifndef _gensa_h +#define _gensa_h #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -37,13 +37,13 @@ namespace SST { -namespace GNAComponent { +namespace gensaComponent { -class GNA : public SST::Component { +class gensa : public SST::Component { public: // Element Library Info - SST_ELI_REGISTER_COMPONENT(GNA, "GNA", "core", SST_ELI_ELEMENT_VERSION(1,0,0), + SST_ELI_REGISTER_COMPONENT(gensa, "gensa", "core", SST_ELI_ELEMENT_VERSION(1,0,0), "Spiking Processor", COMPONENT_CATEGORY_PROCESSOR) SST_ELI_DOCUMENT_PARAMS( @@ -82,12 +82,12 @@ class GNA : public SST::Component { std::set memoryRequests; std::queue networkRequests; - GNA (SST::ComponentId_t id, SST::Params& params); // regular constructor - GNA (); // for serialization only - GNA (const GNA&) = delete; - ~GNA(); + gensa (SST::ComponentId_t id, SST::Params& params); // regular constructor + gensa (); // for serialization only + gensa (const gensa&) = delete; + ~gensa(); - void operator= (const GNA&) = delete; + void operator= (const gensa&) = delete; void init (unsigned int phase); void setup (); @@ -112,4 +112,4 @@ class SyncEvent : public SST::Event } } -#endif /* _GNA_H */ +#endif /* _gensa_h */ diff --git a/src/sst/elements/GNA/neuron.cc b/src/sst/elements/gensa/neuron.cc similarity index 98% rename from src/sst/elements/GNA/neuron.cc rename to src/sst/elements/gensa/neuron.cc index 3e26317f6d..014d2ec3a0 100644 --- a/src/sst/elements/GNA/neuron.cc +++ b/src/sst/elements/gensa/neuron.cc @@ -17,7 +17,7 @@ #include #include "neuron.h" -using namespace SST::GNAComponent; +using namespace SST::gensaComponent; using namespace std; diff --git a/src/sst/elements/GNA/neuron.h b/src/sst/elements/gensa/neuron.h similarity index 99% rename from src/sst/elements/GNA/neuron.h rename to src/sst/elements/gensa/neuron.h index a62be41032..b81a6227e5 100644 --- a/src/sst/elements/GNA/neuron.h +++ b/src/sst/elements/gensa/neuron.h @@ -26,7 +26,7 @@ namespace SST { -namespace GNAComponent { +namespace gensaComponent { struct Synapse { float weight; diff --git a/src/sst/elements/GNA/tests/OutputParser.py b/src/sst/elements/gensa/tests/OutputParser.py similarity index 100% rename from src/sst/elements/GNA/tests/OutputParser.py rename to src/sst/elements/gensa/tests/OutputParser.py diff --git a/src/sst/elements/GNA/tests/model b/src/sst/elements/gensa/tests/model similarity index 100% rename from src/sst/elements/GNA/tests/model rename to src/sst/elements/gensa/tests/model diff --git a/src/sst/elements/GNA/tests/refFiles/test_GNA_1.out b/src/sst/elements/gensa/tests/refFiles/test_gensa_1.out similarity index 100% rename from src/sst/elements/GNA/tests/refFiles/test_GNA_1.out rename to src/sst/elements/gensa/tests/refFiles/test_gensa_1.out diff --git a/src/sst/elements/GNA/tests/sweep.csh b/src/sst/elements/gensa/tests/sweep.csh similarity index 100% rename from src/sst/elements/GNA/tests/sweep.csh rename to src/sst/elements/gensa/tests/sweep.csh diff --git a/src/sst/elements/GNA/tests/sweep2.csh b/src/sst/elements/gensa/tests/sweep2.csh similarity index 100% rename from src/sst/elements/GNA/tests/sweep2.csh rename to src/sst/elements/gensa/tests/sweep2.csh diff --git a/src/sst/elements/GNA/tests/test.py b/src/sst/elements/gensa/tests/test.py similarity index 97% rename from src/sst/elements/GNA/tests/test.py rename to src/sst/elements/gensa/tests/test.py index d5c8eee446..557ea8cfc9 100644 --- a/src/sst/elements/GNA/tests/test.py +++ b/src/sst/elements/gensa/tests/test.py @@ -14,7 +14,7 @@ (options, args) = op.parse_args() # Define the simulation components -comp_gna = sst.Component("GNA", "GNA.GNA") +comp_gna = sst.Component("gensa", "gensa.core") comp_gna.addParams({ "verbose" : 1, "neurons" : options.neurons, diff --git a/src/sst/elements/GNA/tests/test.ref.out b/src/sst/elements/gensa/tests/test.ref.out similarity index 100% rename from src/sst/elements/GNA/tests/test.ref.out rename to src/sst/elements/gensa/tests/test.ref.out diff --git a/src/sst/elements/GNA/tests/test_GNA_1.py b/src/sst/elements/gensa/tests/test_gensa_1.py similarity index 98% rename from src/sst/elements/GNA/tests/test_GNA_1.py rename to src/sst/elements/gensa/tests/test_gensa_1.py index 607159ec2a..194f8ee22e 100644 --- a/src/sst/elements/GNA/tests/test_GNA_1.py +++ b/src/sst/elements/gensa/tests/test_gensa_1.py @@ -13,7 +13,7 @@ # Define the simulation components -core = sst.Component("GNA", "GNA.core") +core = sst.Component("gensa", "gensa.core") core.addParams({ "verbose" : 1, "modelPath" : options.neurons, diff --git a/src/sst/elements/GNA/tests/testsuite_default_GNA.py b/src/sst/elements/gensa/tests/testsuite_default_gensa.py similarity index 92% rename from src/sst/elements/GNA/tests/testsuite_default_GNA.py rename to src/sst/elements/gensa/tests/testsuite_default_gensa.py index 66097c67dc..e52f94e7c1 100644 --- a/src/sst/elements/GNA/tests/testsuite_default_GNA.py +++ b/src/sst/elements/gensa/tests/testsuite_default_gensa.py @@ -25,7 +25,7 @@ def initializeTestModule_SingleInstance(class_inst): ################################################################################ -class testcase_GNA_Component(SSTTestCase): +class testcase_gensa_Component(SSTTestCase): def initializeClass(self, testName): super(type(self), self).initializeClass(testName) @@ -43,12 +43,12 @@ def tearDown(self): ##### - def test_GNA_1(self): - self.GNA_test_template("1") + def test_gensa_1(self): + self.gensa_test_template("1") ##### - def GNA_test_template(self, testcase): + def gensa_test_template(self, testcase): # Note: testcase param is ignored for now # Get the path to the test files test_path = self.get_testsuite_dir() @@ -56,7 +56,7 @@ def GNA_test_template(self, testcase): tmpdir = self.get_test_output_tmp_dir() # Set the various file paths - testDataFileName="test_GNA_{0}".format(testcase) + testDataFileName="test_gensa_{0}".format(testcase) sdlfile = "{0}/{1}.py".format(test_path, testDataFileName) reffile = "{0}/refFiles/{1}.out".format(test_path, testDataFileName) @@ -72,7 +72,7 @@ def GNA_test_template(self, testcase): # Check if any output to stderr if os_test_file(errfile, "-s"): - log_testing_note("GNA test {0} has a Non-Empty Error File {1}".format(testDataFileName, errfile)) + log_testing_note("gensa test {0} has a Non-Empty Error File {1}".format(testDataFileName, errfile)) # Check if spiking pattern exactly matches expected values cmp_result = True