Add support for NESTML code generation for NEST Simulator#825
Open
clinssen wants to merge 12 commits intoNeuralEnsemble:masterfrom
Open
Add support for NESTML code generation for NEST Simulator#825clinssen wants to merge 12 commits intoNeuralEnsemble:masterfrom
clinssen wants to merge 12 commits intoNeuralEnsemble:masterfrom
Conversation
…l_type() Previously the co-generation path returned a (synapse_class, neuron_class) tuple, while the non-co-generation path returned a single class. Now both paths return a single class; the co-generated neuron class is accessible via the synapse class's postsynaptic_cell_type attribute. Also fixes delay_variable/weight_variable being set only in the co-generation path. Updates the stdp.py example accordingly.
Previously each nestml_cell_type() / nestml_synapse_type() call compiled and installed a NEST module immediately, causing a collision when called more than once (second nest.Install() fails; single module name overwrites earlier models). Now both functions register a stub class in a module-level list and return it immediately — no compilation occurs. sim.setup() calls _compile_and_resolve(), which gathers all pending descriptions, invokes generate_nest_target() once for all of them, calls nest.Install() once, then resolves each stub class in place so it behaves identically to a native_cell_type() / native_synapse_type() class. Calling nestml_cell_type() or nestml_synapse_type() after setup() raises RuntimeError. Examples updated to register NESTML types before setup().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #814.
Special attributes "weight" and "delay" of the synapse have been added as members of
BaseSynapseTypeand should be replaced across PyNN.Test cases should still be added for CI and the STDP example should be cleaned up and improved.