Skip to content

Add support for NESTML code generation for NEST Simulator#825

Open
clinssen wants to merge 12 commits intoNeuralEnsemble:masterfrom
apdavison:nestml
Open

Add support for NESTML code generation for NEST Simulator#825
clinssen wants to merge 12 commits intoNeuralEnsemble:masterfrom
apdavison:nestml

Conversation

@clinssen
Copy link
Copy Markdown

Replaces #814.

Special attributes "weight" and "delay" of the synapse have been added as members of BaseSynapseType and should be replaced across PyNN.

Test cases should still be added for CI and the STDP example should be cleaned up and improved.

C.A.P. Linssen and others added 5 commits January 15, 2026 13:55
…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().
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 70.09% (-0.6%) from 70.641% — apdavison:nestml into NeuralEnsemble:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants