2 #include "halco/hicann-dls/vx/v3/coordinates.h"
3 #include "halco/hicann-dls/vx/v3/neuron.h"
12 class OmnibusChipOverJTAG;
41 constexpr
static auto unsupported_read_targets GENPYBIND(hidden) = {
42 hxcomm::vx::Target::simulation};
55 struct GENPYBIND(inline_base("*
")) MembraneCapacitorSize
56 : public halco::common::detail::RantWrapper<MembraneCapacitorSize, uint_fast8_t, 63, 0>
58 constexpr explicit MembraneCapacitorSize(uintmax_t const val = 0)
59 GENPYBIND(implicit_conversion) :
65 NeuronConfig() SYMBOL_VISIBLE;
69 // divide inter-compartment conductance bias by 4
70 GENPYBIND(getter_for(enable_divide_multicomp_conductance_bias))
71 bool get_enable_divide_multicomp_conductance_bias() const SYMBOL_VISIBLE;
72 GENPYBIND(setter_for(enable_divide_multicomp_conductance_bias))
73 void set_enable_divide_multicomp_conductance_bias(bool value) SYMBOL_VISIBLE;
75 // multiply inter-compartment conductance bias by 4
76 GENPYBIND(getter_for(enable_multiply_multicomp_conductance_bias))
77 bool get_enable_multiply_multicomp_conductance_bias() const SYMBOL_VISIBLE;
78 GENPYBIND(setter_for(enable_multiply_multicomp_conductance_bias))
79 void set_enable_multiply_multicomp_conductance_bias(bool value) SYMBOL_VISIBLE;
81 // connect local membrane to soma
82 GENPYBIND(getter_for(connect_soma))
83 bool get_connect_soma() const SYMBOL_VISIBLE;
84 GENPYBIND(setter_for(connect_soma))
85 void set_connect_soma(bool value) SYMBOL_VISIBLE;
87 // connect local membrane to membrane on right
88 GENPYBIND(getter_for(connect_membrane_right))
89 bool get_connect_membrane_right() const SYMBOL_VISIBLE;
90 GENPYBIND(setter_for(connect_membrane_right))
91 void set_connect_membrane_right(bool value) SYMBOL_VISIBLE;
93 // enable inter-compartment conductance
94 GENPYBIND(getter_for(enable_multicomp_conductance))
95 bool get_enable_multicomp_conductance() const SYMBOL_VISIBLE;
96 GENPYBIND(setter_for(enable_multicomp_conductance))
97 void set_enable_multicomp_conductance(bool value) SYMBOL_VISIBLE;
99 // connect local membrane to bottom membrane
100 GENPYBIND(getter_for(connect_bottom))
101 bool get_connect_bottom() const SYMBOL_VISIBLE;
102 GENPYBIND(setter_for(connect_bottom))
103 void set_connect_bottom(bool value) SYMBOL_VISIBLE;
105 // connect soma to soma on the right
106 GENPYBIND(getter_for(connect_soma_right))
107 bool get_connect_soma_right() const SYMBOL_VISIBLE;
108 GENPYBIND(setter_for(connect_soma_right))
109 void set_connect_soma_right(bool value) SYMBOL_VISIBLE;
111 // enable fire output of neuron (also gates bypass circuits)
112 GENPYBIND(getter_for(enable_fire))
113 bool get_enable_fire() const SYMBOL_VISIBLE;
114 GENPYBIND(setter_for(enable_fire))
115 void set_enable_fire(bool value) SYMBOL_VISIBLE;
117 // increase the strength of the neuron's fire pulse
118 GENPYBIND(getter_for(enable_strong_fire))
119 bool get_enable_strong_fire() const SYMBOL_VISIBLE;
120 GENPYBIND(setter_for(enable_strong_fire))
121 void set_enable_strong_fire(bool value) SYMBOL_VISIBLE;
123 // enable threshold comparator
124 GENPYBIND(getter_for(enable_threshold_comparator))
125 bool get_enable_threshold_comparator() const SYMBOL_VISIBLE;
126 GENPYBIND(setter_for(enable_threshold_comparator))
127 void set_enable_threshold_comparator(bool value) SYMBOL_VISIBLE;
129 // enable exc. synaptic input
130 GENPYBIND(getter_for(enable_synaptic_input_excitatory))
131 bool get_enable_synaptic_input_excitatory() const SYMBOL_VISIBLE;
132 GENPYBIND(setter_for(enable_synaptic_input_excitatory))
133 void set_enable_synaptic_input_excitatory(bool value) SYMBOL_VISIBLE;
135 // enable inh. synaptic input
136 GENPYBIND(getter_for(enable_synaptic_input_inhibitory))
137 bool get_enable_synaptic_input_inhibitory() const SYMBOL_VISIBLE;
138 GENPYBIND(setter_for(enable_synaptic_input_inhibitory))
139 void set_enable_synaptic_input_inhibitory(bool value) SYMBOL_VISIBLE;
141 // set exc. synaptic input from CUBA to COBA mode.
142 GENPYBIND(getter_for(enable_synaptic_input_excitatory_coba_mode))
143 bool get_enable_synaptic_input_excitatory_coba_mode() const SYMBOL_VISIBLE;
144 GENPYBIND(setter_for(enable_synaptic_input_excitatory_coba_mode))
145 void set_enable_synaptic_input_excitatory_coba_mode(bool value) SYMBOL_VISIBLE;
147 // set inh. synaptic input from CUBA to COBA mode.
148 GENPYBIND(getter_for(enable_synaptic_input_inhibitory_coba_mode))
149 bool get_enable_synaptic_input_inhibitory_coba_mode() const SYMBOL_VISIBLE;
150 GENPYBIND(setter_for(enable_synaptic_input_inhibitory_coba_mode))
151 void set_enable_synaptic_input_inhibitory_coba_mode(bool value) SYMBOL_VISIBLE;
153 // enable small capacitance mode at excitatory synaptic input:
154 // This disconnects the capacitor from the synaptic input line and leaves
155 // only the parasitic capacitance of the line.
156 GENPYBIND(getter_for(enable_synaptic_input_excitatory_small_capacitance))
157 bool get_enable_synaptic_input_excitatory_small_capacitance() const SYMBOL_VISIBLE;
158 GENPYBIND(setter_for(enable_synaptic_input_excitatory_small_capacitance))
159 void set_enable_synaptic_input_excitatory_small_capacitance(bool value) SYMBOL_VISIBLE;
161 // enable small capacitance mode at inhibitory synaptic input:
162 // This disconnects the capacitor from the synaptic input line and leaves
163 // only the parasitic capacitance of the line.
164 GENPYBIND(getter_for(enable_synaptic_input_inhibitory_small_capacitance))
165 bool get_enable_synaptic_input_inhibitory_small_capacitance() const SYMBOL_VISIBLE;
166 GENPYBIND(setter_for(enable_synaptic_input_inhibitory_small_capacitance))
167 void set_enable_synaptic_input_inhibitory_small_capacitance(bool value) SYMBOL_VISIBLE;
169 // enable high resistance mode for excitatory synaptic input
170 GENPYBIND(getter_for(enable_synaptic_input_excitatory_high_resistance))
171 bool get_enable_synaptic_input_excitatory_high_resistance() const SYMBOL_VISIBLE;
172 GENPYBIND(setter_for(enable_synaptic_input_excitatory_high_resistance))
173 void set_enable_synaptic_input_excitatory_high_resistance(bool value) SYMBOL_VISIBLE;
175 // enable high resistance mode for inhibitory synaptic input
176 GENPYBIND(getter_for(enable_synaptic_input_inhibitory_high_resistance))
177 bool get_enable_synaptic_input_inhibitory_high_resistance() const SYMBOL_VISIBLE;
178 GENPYBIND(setter_for(enable_synaptic_input_inhibitory_high_resistance))
179 void set_enable_synaptic_input_inhibitory_high_resistance(bool value) SYMBOL_VISIBLE;
181 // enable exc. bypass circuit
182 GENPYBIND(getter_for(enable_bypass_excitatory))
183 bool get_enable_bypass_excitatory() const SYMBOL_VISIBLE;
184 GENPYBIND(setter_for(enable_bypass_excitatory))
185 void set_enable_bypass_excitatory(bool value) SYMBOL_VISIBLE;
187 // enable inh. bypass circuit
188 GENPYBIND(getter_for(enable_bypass_inhibitory))
189 bool get_enable_bypass_inhibitory() const SYMBOL_VISIBLE;
190 GENPYBIND(setter_for(enable_bypass_inhibitory))
191 void set_enable_bypass_inhibitory(bool value) SYMBOL_VISIBLE;
193 // enable membrane offset current (can also be used for stimulus/step current)
194 GENPYBIND(getter_for(enable_membrane_offset))
195 bool get_enable_membrane_offset() const SYMBOL_VISIBLE;
196 GENPYBIND(setter_for(enable_membrane_offset))
197 void set_enable_membrane_offset(bool value) SYMBOL_VISIBLE;
199 // invert membrane offset current
200 GENPYBIND(getter_for(invert_membrane_offset))
201 bool get_invert_membrane_offset() const SYMBOL_VISIBLE;
202 GENPYBIND(setter_for(invert_membrane_offset))
203 void set_invert_membrane_offset(bool value) SYMBOL_VISIBLE;
205 // configure membrane size
206 GENPYBIND(getter_for(membrane_capacitor_size))
207 MembraneCapacitorSize get_membrane_capacitor_size() const SYMBOL_VISIBLE;
208 GENPYBIND(setter_for(membrane_capacitor_size))
209 void set_membrane_capacitor_size(MembraneCapacitorSize value) SYMBOL_VISIBLE;
211 // flip the sign of a (sub-threshold adaptation)
212 GENPYBIND(getter_for(invert_adaptation_a))
213 bool get_invert_adaptation_a() const SYMBOL_VISIBLE;
214 GENPYBIND(setter_for(invert_adaptation_a))
215 void set_invert_adaptation_a(bool value) SYMBOL_VISIBLE;
217 // flip the sign of b (spike-triggered adaptation)
218 GENPYBIND(getter_for(invert_adaptation_b))
219 bool get_invert_adaptation_b() const SYMBOL_VISIBLE;
220 GENPYBIND(setter_for(invert_adaptation_b))
221 void set_invert_adaptation_b(bool value) SYMBOL_VISIBLE;
224 GENPYBIND(getter_for(enable_adaptation))
225 bool get_enable_adaptation() const SYMBOL_VISIBLE;
226 GENPYBIND(setter_for(enable_adaptation))
227 void set_enable_adaptation(bool value) SYMBOL_VISIBLE;
229 // enable exponential term
230 GENPYBIND(getter_for(enable_exponential))
231 bool get_enable_exponential() const SYMBOL_VISIBLE;
232 GENPYBIND(setter_for(enable_exponential))
233 void set_enable_exponential(bool value) SYMBOL_VISIBLE;
235 // enable direct, unbuffered access to membrane
236 GENPYBIND(getter_for(enable_unbuffered_access))
237 bool get_enable_unbuffered_access() const SYMBOL_VISIBLE;
238 GENPYBIND(setter_for(enable_unbuffered_access))
239 void set_enable_unbuffered_access(bool value) SYMBOL_VISIBLE;
241 // enable readout amplifier
242 GENPYBIND(getter_for(enable_readout_amplifier))
243 bool get_enable_readout_amplifier() const SYMBOL_VISIBLE;
244 GENPYBIND(setter_for(enable_readout_amplifier))
245 void set_enable_readout_amplifier(bool value) SYMBOL_VISIBLE;
247 // select readout source
248 GENPYBIND(getter_for(readout_source))
249 ReadoutSource get_readout_source() const SYMBOL_VISIBLE;
250 GENPYBIND(setter_for(readout_source))
251 void set_readout_source(ReadoutSource value) SYMBOL_VISIBLE;
254 GENPYBIND(getter_for(enable_readout))
255 bool get_enable_readout() const SYMBOL_VISIBLE;
256 GENPYBIND(setter_for(enable_readout))
257 void set_enable_readout(bool value) SYMBOL_VISIBLE;
259 // enable source degeneration of leak/reset OTA in reset mode
260 GENPYBIND(getter_for(enable_reset_degeneration))
261 bool get_enable_reset_degeneration() const SYMBOL_VISIBLE;
262 GENPYBIND(setter_for(enable_reset_degeneration))
263 void set_enable_reset_degeneration(bool value) SYMBOL_VISIBLE;
265 // enable division (8x) of conductance in reset mode
266 GENPYBIND(getter_for(enable_reset_division))
267 bool get_enable_reset_division() const SYMBOL_VISIBLE;
268 GENPYBIND(setter_for(enable_reset_division))
269 void set_enable_reset_division(bool value) SYMBOL_VISIBLE;
271 // enable multiplication (8x) of conductance in reset mode
272 GENPYBIND(getter_for(enable_reset_multiplication))
273 bool get_enable_reset_multiplication() const SYMBOL_VISIBLE;
274 GENPYBIND(setter_for(enable_reset_multiplication))
275 void set_enable_reset_multiplication(bool value) SYMBOL_VISIBLE;
277 // enable source degeneration of leak/reset OTA in leak mode
278 GENPYBIND(getter_for(enable_leak_degeneration))
279 bool get_enable_leak_degeneration() const SYMBOL_VISIBLE;
280 GENPYBIND(setter_for(enable_leak_degeneration))
281 void set_enable_leak_degeneration(bool value) SYMBOL_VISIBLE;
283 // enable division (8x) of conductance in leak mode
284 GENPYBIND(getter_for(enable_leak_division))
285 bool get_enable_leak_division() const SYMBOL_VISIBLE;
286 GENPYBIND(setter_for(enable_leak_division))
287 void set_enable_leak_division(bool value) SYMBOL_VISIBLE;
289 // enable multiplication (8x) of conductance in leak mode
290 GENPYBIND(getter_for(enable_leak_multiplication))
291 bool get_enable_leak_multiplication() const SYMBOL_VISIBLE;
292 GENPYBIND(setter_for(enable_leak_multiplication))
293 void set_enable_leak_multiplication(bool value) SYMBOL_VISIBLE;
295 // enable gating of synaptic inputs and exponential term during reset periods
296 GENPYBIND(getter_for(enable_pause))
297 bool get_enable_pause() const SYMBOL_VISIBLE;
298 GENPYBIND(setter_for(enable_pause))
299 void set_enable_pause(bool value) SYMBOL_VISIBLE;
301 bool operator==(NeuronConfig const& other) const SYMBOL_VISIBLE;
302 bool operator!=(NeuronConfig const& other) const SYMBOL_VISIBLE;
304 static size_t constexpr config_size_in_words GENPYBIND(hidden) = 6;
305 template <typename AddressT>
306 static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& neuron)
307 SYMBOL_VISIBLE GENPYBIND(hidden);
308 template <typename WordT>
309 std::array<WordT, config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
310 template <typename WordT>
311 void decode(std::array<WordT, config_size_in_words> const& data) SYMBOL_VISIBLE
314 GENPYBIND(stringstream)
315 friend std::ostream& operator<<(std::ostream& os, NeuronConfig const& config) SYMBOL_VISIBLE;
318 friend class cereal::access;
319 template <class Archive>
320 void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
322 bool m_en_comp_cond_div;
323 bool m_en_comp_cond_mul;
325 bool m_connect_membrane_right;
327 bool m_connect_bottom;
328 bool m_connect_somata;
330 bool m_en_strong_fire;
331 bool m_en_thresh_comp;
334 bool m_en_synin_inh_coba;
335 bool m_en_synin_exc_coba;
336 bool m_en_synin_exc_small_cap;
337 bool m_en_synin_inh_small_cap;
338 bool m_en_synin_exc_high_res;
339 bool m_en_synin_inh_high_res;
343 bool m_invert_current;
344 MembraneCapacitorSize m_mem_cap_size;
345 bool m_invert_adapt_a;
346 bool m_invert_adapt_b;
349 bool m_en_unbuf_access;
350 bool m_en_readout_amp;
351 ReadoutSource m_readout_select;
362 std::ostream& operator<<(std::ostream&, NeuronConfig::ReadoutSource const&) SYMBOL_VISIBLE;
369 class GENPYBIND(visible) NeuronResetQuad
372 typedef halco::hicann_dls::vx::v3::NeuronResetQuadOnDLS coordinate_type;
373 typedef std::true_type is_leaf_node;
376 NeuronResetQuad() SYMBOL_VISIBLE;
378 bool operator==(NeuronResetQuad const& other) const SYMBOL_VISIBLE;
379 bool operator!=(NeuronResetQuad const& other) const SYMBOL_VISIBLE;
381 static size_t constexpr write_config_size_in_words GENPYBIND(hidden) = 1;
382 static size_t constexpr read_config_size_in_words GENPYBIND(hidden) = 0;
383 template <typename AddressT>
384 static std::array<AddressT, read_config_size_in_words> read_addresses(
385 coordinate_type const& neuron) SYMBOL_VISIBLE GENPYBIND(hidden);
386 template <typename AddressT>
387 static std::array<AddressT, write_config_size_in_words> write_addresses(
388 coordinate_type const& neuron) SYMBOL_VISIBLE GENPYBIND(hidden);
389 template <typename WordT>
390 std::array<WordT, write_config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
391 template <typename WordT>
392 void decode(std::array<WordT, read_config_size_in_words> const& data) SYMBOL_VISIBLE
395 GENPYBIND(stringstream)
396 friend std::ostream& operator<<(std::ostream& os, NeuronResetQuad const& config) SYMBOL_VISIBLE;
399 friend class cereal::access;
400 template <class Archive>
401 void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
404 } // namespace haldls::vx::v3
406 namespace haldls::vx::detail {
409 struct BackendContainerTrait<v3::NeuronConfig>
410 : public BackendContainerBase<
412 fisch::vx::word_access_type::Omnibus,
413 fisch::vx::word_access_type::OmnibusChipOverJTAG>
417 struct BackendContainerTrait<v3::NeuronResetQuad>
418 : public BackendContainerBase<
420 fisch::vx::word_access_type::Omnibus,
421 fisch::vx::word_access_type::OmnibusChipOverJTAG>
424 } // namespace haldls::vx::detail
427 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(haldls::vx::v3::NeuronConfig)
428 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(haldls::vx::v3::NeuronResetQuad)
Container to send post pulses to one half of the neurons (left/right).
Read/write access to common neuron parameters.
Trait signalling derived-from container type support differential write operation.
Read/write access to the NeuronBackend container.
Container to trigger reset of a single neuron.
Container to read the spike counter of a single neuron.
Container to reset the spike counter of a single neuron.
halco::hicann_dls::vx::v3::NeuronConfigOnDLS coordinate_type
ReadoutSource
Source of readout output.
std::true_type is_leaf_node
#define GENPYBIND_TAG_HALDLS_VX_V3
haldls::vx::SpikeCounterReset SpikeCounterReset
haldls::vx::NeuronBackendSRAMTimingConfig NeuronBackendSRAMTimingConfig
haldls::vx::SpikeCounterRead SpikeCounterRead
haldls::vx::NeuronReset NeuronReset
haldls::vx::BlockPostPulse BlockPostPulse
haldls::vx::NeuronSRAMTimingConfig NeuronSRAMTimingConfig
haldls::vx::CommonNeuronBackendConfig CommonNeuronBackendConfig
#define NEURON_EXTERN_TEMPLATE(Coordinates)