Skip to content

Revise input and output ports in NESTML#1299

Draft
clinssen wants to merge 180 commits intonest:mainfrom
clinssen:inhibitory_excitatory_remove
Draft

Revise input and output ports in NESTML#1299
clinssen wants to merge 180 commits intonest:mainfrom
clinssen:inhibitory_excitatory_remove

Conversation

@clinssen
Copy link
Copy Markdown
Contributor

@clinssen clinssen commented Jan 17, 2026

Introduces the NESTML predefined sift() function to process spike events in event handlers. See here for documentation on sift(): https://github.com/nest/nestml/pull/1299/files#diff-22c1d3766680291b0aed3cd548fc0980ecc6511ebb5532a8ed2607105e1775e3R1198

Remove the excitatory and inhibitory spiking input port qualifiers. Instead, spikes should be routed (a) on the basis of having multiple spiking input ports (like one for excitatory and one for inhibitory input); or (b) on the basis of a condition like

if weight < 0: 
    # treat as an inhibitory spike
else:
    # treat as an excitatory spike

A consequence of this is that spike ports can no longer be assumed to be linear and time-invariant in the general case (as in this case, a spike from the buffer will be processed differently depending on the sign of its weight). On the C++ side, this means that each spiking input port now uses the VectorRingBuffer class (https://github.com/nest/nestml/pull/1299/files#diff-ee49404cf3290ce0e9ee40e25068b6d123da357aee83794ab89745a7e2aaf988R1) rather than the RingBuffer. The performance penalty of this is approximately 12.5% in a small balanced network example. An extra code generation option, linear_time_invariant_spiking_input_ports, is provided to instruct the NEST code generator that a set of given ports can be considered LTI. With this option enabled, performance is indistinguishable from the current main branch performance.

Should be merged after #1288. Done.
Should be merged after #1349. Done.
Should be merged after #1358.

Replaces #1137.

Fixes #944.

C.A.P. Linssen added 30 commits October 17, 2024 11:08
elif ctx.expression() is not None:
args.append(self.visit(ctx.expression()))
if name.upper() == "SIFT":
args[0].set_implicit_conversion_factor(1E3) # XXX: TODO: the factor 1E3 should be removed; see https://github.com/nest/nestml/issues/984
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To do: add a link from #984 back to this line of code.

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.

Remove "inhibitory" and "excitatory" spiking input port specifiers

1 participant