HALDLS
synapse.h
Go to the documentation of this file.
1 #pragma once
2 #include <array>
3 #include <iosfwd>
4 
5 #include "halco/common/geometry.h"
6 #include "halco/common/typed_array.h"
7 #include "halco/hicann-dls/vx/capmem.h"
8 #include "halco/hicann-dls/vx/switch_rows.h"
9 #include "halco/hicann-dls/vx/synapse.h"
10 #include "haldls/cerealization.h"
11 #include "haldls/vx/common.h"
12 #include "haldls/vx/genpybind.h"
13 #include "haldls/vx/traits.h"
14 #include "hate/visibility.h"
15 
16 #ifndef __ppu__
17 #include "hxcomm/vx/target.h"
18 #endif
19 
20 namespace fisch::vx {
21 class Omnibus;
22 class OmnibusChipOverJTAG;
23 } // namespace fisch::vx
24 
25 namespace lola::vx {
26 class SynapseMatrix;
27 class SynapseWeightMatrix;
28 class SynapseLabelMatrix;
29 class SynapseCorrelationCalibMatrix;
30 class SynapseRow;
31 class SynapseWeightRow;
32 class SynapseLabelRow;
33 class SynapseCorrelationCalibRow;
34 class ColumnCorrelationRow;
35 class ColumnCurrentRow;
36 } // namespace lola::vx
37 
38 namespace haldls {
39 namespace vx GENPYBIND_TAG_HALDLS_VX {
40 
44 struct GENPYBIND(inline_base("*")) SynapseLabelValue
45  : public halco::common::detail::RantWrapper<SynapseLabelValue, uint8_t, 63, 0>
46 {
47  constexpr explicit SynapseLabelValue(uintmax_t const val = 0) GENPYBIND(implicit_conversion) :
48  rant_t(val)
49  {}
50 };
51 
52 class GENPYBIND(visible) CommonSynramConfig : public DifferentialWriteTrait
53 {
54 public:
55  typedef halco::hicann_dls::vx::CommonSynramConfigOnDLS coordinate_type;
56  typedef std::true_type is_leaf_node;
57 
64  struct GENPYBIND(inline_base("*")) PCConf
65  : public halco::common::detail::RantWrapper<PCConf, uint_fast16_t, 15, 0>
66  {
67  constexpr explicit PCConf(uintmax_t const val = 8) GENPYBIND(implicit_conversion) :
68  rant_t(val)
69  {}
70  };
71 
78  struct GENPYBIND(inline_base("*")) WConf
79  : public halco::common::detail::RantWrapper<WConf, uint_fast32_t, 255, 0>
80  {
81  constexpr explicit WConf(uintmax_t const val = 3) GENPYBIND(implicit_conversion) :
82  rant_t(val)
83  {}
84  };
85 
86  struct GENPYBIND(inline_base("*")) WaitCtrClear
87  : public halco::common::detail::RantWrapper<WaitCtrClear, uint_fast16_t, 7, 0>
88  {
89  constexpr explicit WaitCtrClear(uintmax_t const val = 4) GENPYBIND(implicit_conversion) :
90  rant_t(val)
91  {}
92  };
93 
94  CommonSynramConfig() SYMBOL_VISIBLE;
95 
96  GENPYBIND(getter_for(pc_conf_west))
97  PCConf get_pc_conf_west() const SYMBOL_VISIBLE;
98  GENPYBIND(setter_for(pc_conf_west))
99  void set_pc_conf_west(PCConf const& value) SYMBOL_VISIBLE;
100 
101  GENPYBIND(getter_for(pc_conf_east))
102  PCConf get_pc_conf_east() const SYMBOL_VISIBLE;
103  GENPYBIND(setter_for(pc_conf_east))
104  void set_pc_conf_east(PCConf const& value) SYMBOL_VISIBLE;
105 
106  GENPYBIND(getter_for(w_conf_west))
107  WConf get_w_conf_west() const SYMBOL_VISIBLE;
108  GENPYBIND(setter_for(w_conf_west))
109  void set_w_conf_west(WConf const& value) SYMBOL_VISIBLE;
110 
111  GENPYBIND(getter_for(w_conf_east))
112  WConf get_w_conf_east() const SYMBOL_VISIBLE;
113  GENPYBIND(setter_for(w_conf_east))
114  void set_w_conf_east(WConf const& value) SYMBOL_VISIBLE;
115 
116  GENPYBIND(getter_for(wait_ctr_clear))
117  WaitCtrClear get_wait_ctr_clear() const SYMBOL_VISIBLE;
118  GENPYBIND(setter_for(wait_ctr_clear))
119  void set_wait_ctr_clear(WaitCtrClear const& value) SYMBOL_VISIBLE;
120 
121  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 3;
122  template <typename AddressT>
123  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& coord)
124  SYMBOL_VISIBLE GENPYBIND(hidden);
125  template <typename WordT>
126  std::array<WordT, config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
127  template <typename WordT>
128  void decode(std::array<WordT, config_size_in_words> const& data) SYMBOL_VISIBLE
129  GENPYBIND(hidden);
130 
131  bool operator==(CommonSynramConfig const& other) const SYMBOL_VISIBLE;
132  bool operator!=(CommonSynramConfig const& other) const SYMBOL_VISIBLE;
133 
134  GENPYBIND(stringstream)
135  friend std::ostream& operator<<(std::ostream& os, CommonSynramConfig const& config) SYMBOL_VISIBLE;
136 
137 private:
138  friend class cereal::access;
139  template <class Archive>
140  void serialize(Archive& ar, std::uint32_t const version);
141 
142  PCConf m_pc_conf_west;
143  PCConf m_pc_conf_east;
144  WConf m_w_conf_west;
145  WConf m_w_conf_east;
146  WaitCtrClear m_wait_ctr_clear;
147 };
148 
149 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(CommonSynramConfig)
150 
151 class GENPYBIND(visible) SynapseBiasSelection
152 {
153 public:
154  typedef halco::hicann_dls::vx::SynapseBiasSelectionOnDLS coordinate_type;
155  typedef std::true_type is_leaf_node;
156 #ifndef __ppu__
157  constexpr static auto unsupported_read_targets GENPYBIND(hidden) = {
158  hxcomm::vx::Target::hardware, hxcomm::vx::Target::simulation};
159 #endif
160 
161  typedef halco::common::typed_array<bool, halco::hicann_dls::vx::CapMemBlockOnDLS>
162  bias_selection_type GENPYBIND(opaque, expose_as(_bias_selection_type));
163 
165  explicit SynapseBiasSelection() SYMBOL_VISIBLE;
166 
168  GENPYBIND(getter_for(enable_internal_dac_bias), return_value_policy(reference_internal))
169  bias_selection_type const& get_enable_internal_dac_bias() const SYMBOL_VISIBLE;
170  GENPYBIND(setter_for(enable_internal_dac_bias))
171  void set_enable_internal_dac_bias(bias_selection_type const& value) SYMBOL_VISIBLE;
172 
174  GENPYBIND(getter_for(enable_internal_ramp_bias), return_value_policy(reference_internal))
175  bias_selection_type const& get_enable_internal_ramp_bias() const SYMBOL_VISIBLE;
176  GENPYBIND(setter_for(enable_internal_ramp_bias))
177  void set_enable_internal_ramp_bias(bias_selection_type const& value) SYMBOL_VISIBLE;
178 
180  GENPYBIND(getter_for(enable_internal_store_bias), return_value_policy(reference_internal))
181  bias_selection_type const& get_enable_internal_store_bias() const SYMBOL_VISIBLE;
182  GENPYBIND(setter_for(enable_internal_store_bias))
183  void set_enable_internal_store_bias(bias_selection_type const& value) SYMBOL_VISIBLE;
184 
186  GENPYBIND(getter_for(enable_internal_output_bias), return_value_policy(reference_internal))
187  bias_selection_type const& get_enable_internal_output_bias() const SYMBOL_VISIBLE;
188  GENPYBIND(setter_for(enable_internal_output_bias))
189  void set_enable_internal_output_bias(bias_selection_type const& value) SYMBOL_VISIBLE;
190 
191  bool operator==(SynapseBiasSelection const& other) const SYMBOL_VISIBLE;
192  bool operator!=(SynapseBiasSelection const& other) const SYMBOL_VISIBLE;
193 
194  GENPYBIND(stringstream)
195  friend std::ostream& operator<<(std::ostream& os, SynapseBiasSelection const& config)
196  SYMBOL_VISIBLE;
197 
198  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 1;
199 
200  template <typename AddressT>
201  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& coord)
202  SYMBOL_VISIBLE GENPYBIND(hidden);
203 
204  template <typename WordT>
205  std::array<WordT, config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
206 
207  template <typename WordT>
208  void decode(std::array<WordT, config_size_in_words> const& words) SYMBOL_VISIBLE
209  GENPYBIND(hidden);
210 
211 private:
212  friend class cereal::access;
213  template <class Archive>
214  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
215 
216  bias_selection_type m_int_dac_bias;
217  bias_selection_type m_int_ramp_bias;
218  bias_selection_type m_int_store_bias;
219  bias_selection_type m_int_output_bias;
220 };
221 
222 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(SynapseBiasSelection)
223 
224 namespace detail {
225 
226 template <>
227 struct BackendContainerTrait<CommonSynramConfig>
228  : public BackendContainerBase<
229  CommonSynramConfig,
230  fisch::vx::word_access_type::Omnibus,
231  fisch::vx::word_access_type::OmnibusChipOverJTAG>
232 {};
233 
234 template <>
235 struct BackendContainerTrait<SynapseBiasSelection>
236  : public BackendContainerBase<
237  SynapseBiasSelection,
238  fisch::vx::word_access_type::Omnibus,
239  fisch::vx::word_access_type::OmnibusChipOverJTAG>
240 {};
241 
242 } // namespace detail
243 
244 class GENPYBIND(visible) SynapseWeightQuad : public DifferentialWriteTrait
245 {
246 public:
247  typedef halco::hicann_dls::vx::SynapseWeightQuadOnDLS coordinate_type;
248  typedef std::true_type is_leaf_node;
249 
250  struct GENPYBIND(inline_base("*")) Value
251  : public halco::common::detail::RantWrapper<Value, uint8_t, 63, 0>
252  {
253  constexpr explicit Value(uintmax_t const val = 0) GENPYBIND(implicit_conversion) :
254  rant_t(val)
255  {}
256  };
257 
258  SynapseWeightQuad() SYMBOL_VISIBLE;
259 
260  typedef halco::common::typed_array<Value, halco::hicann_dls::vx::EntryOnQuad> values_type
261  GENPYBIND(opaque);
262 
263  GENPYBIND(getter_for(values), return_value_policy(reference_internal))
264  values_type const& get_values() const SYMBOL_VISIBLE;
265  GENPYBIND(setter_for(values))
266  void set_values(values_type const& value) SYMBOL_VISIBLE;
267 
268  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 1;
269  template <typename AddressT>
270  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
271  GENPYBIND(hidden);
272  template <typename WordT>
273  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
274  template <typename WordT>
275  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
276 
277  bool operator==(SynapseWeightQuad const& other) const SYMBOL_VISIBLE;
278  bool operator!=(SynapseWeightQuad const& other) const SYMBOL_VISIBLE;
279 
280  GENPYBIND(stringstream)
281  friend std::ostream& operator<<(std::ostream& os, SynapseWeightQuad const& config)
282  SYMBOL_VISIBLE;
283 
284 private:
285  // used for direct member access without function calls
286  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseWeightRow>;
287  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseWeightMatrix>;
288  friend class cereal::access;
289  template <class Archive>
290  void serialize(Archive& ar, std::uint32_t version);
291 
292  values_type m_values;
293 };
294 
295 
296 class GENPYBIND(visible) SynapseLabelQuad : public DifferentialWriteTrait
297 {
298 public:
299  typedef halco::hicann_dls::vx::SynapseLabelQuadOnDLS coordinate_type;
300  typedef std::true_type is_leaf_node;
301 
302  typedef SynapseLabelValue Value GENPYBIND(visible);
303 
304  SynapseLabelQuad() SYMBOL_VISIBLE;
305 
306  typedef halco::common::typed_array<Value, halco::hicann_dls::vx::EntryOnQuad> values_type
307  GENPYBIND(opaque);
308 
309  GENPYBIND(getter_for(values), return_value_policy(reference_internal))
310  values_type const& get_values() const SYMBOL_VISIBLE;
311  GENPYBIND(setter_for(values))
312  void set_values(values_type const& value) SYMBOL_VISIBLE;
313 
314  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 1;
315  template <typename AddressT>
316  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
317  GENPYBIND(hidden);
318  template <typename WordT>
319  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
320  template <typename WordT>
321  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
322 
323  bool operator==(SynapseLabelQuad const& other) const SYMBOL_VISIBLE;
324  bool operator!=(SynapseLabelQuad const& other) const SYMBOL_VISIBLE;
325 
326  GENPYBIND(stringstream)
327  friend std::ostream& operator<<(std::ostream& os, SynapseLabelQuad const& config)
328  SYMBOL_VISIBLE;
329 
330 private:
331  // used for direct member access without function calls
332  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseLabelRow>;
333  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseLabelMatrix>;
334  friend class cereal::access;
335  template <class Archive>
336  void serialize(Archive& ar, std::uint32_t version);
337 
338  values_type m_values;
339 };
340 
341 
342 class GENPYBIND(visible) SynapseCorrelationCalibQuad : public DifferentialWriteTrait
343 {
344 public:
345  typedef halco::hicann_dls::vx::SynapseCorrelationCalibQuadOnDLS coordinate_type;
346  typedef std::true_type is_leaf_node;
347 
348  // The more bits set, the shorter the time constant
349  struct GENPYBIND(inline_base("*")) TimeCalib
350  : public halco::common::detail::RantWrapper<TimeCalib, uint8_t, 3, 0>
351  {
352  constexpr explicit TimeCalib(uintmax_t const val = 0) GENPYBIND(implicit_conversion) :
353  rant_t(val)
354  {}
355  };
356 
357  // The more bits set, the lower the amplitude
358  struct GENPYBIND(inline_base("*")) AmpCalib
359  : public halco::common::detail::RantWrapper<AmpCalib, uint8_t, 3, 0>
360  {
361  constexpr explicit AmpCalib(uintmax_t const val = 0) GENPYBIND(implicit_conversion) :
362  rant_t(val)
363  {}
364  };
365 
366  SynapseCorrelationCalibQuad() SYMBOL_VISIBLE;
367 
368  typedef halco::common::typed_array<TimeCalib, halco::hicann_dls::vx::EntryOnQuad>
369  time_calibs_type GENPYBIND(opaque);
370  typedef halco::common::typed_array<AmpCalib, halco::hicann_dls::vx::EntryOnQuad> amp_calibs_type
371  GENPYBIND(opaque);
372 
373  GENPYBIND(getter_for(time_calibs), return_value_policy(reference_internal))
374  time_calibs_type const& get_time_calibs() const SYMBOL_VISIBLE;
375  GENPYBIND(setter_for(time_calibs))
376  void set_time_calibs(time_calibs_type const& value) SYMBOL_VISIBLE;
377 
378  GENPYBIND(getter_for(amp_calibs), return_value_policy(reference_internal))
379  amp_calibs_type const& get_amp_calibs() const SYMBOL_VISIBLE;
380  GENPYBIND(setter_for(amp_calibs))
381  void set_amp_calibs(amp_calibs_type const& value) SYMBOL_VISIBLE;
382 
383  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 2;
384  template <typename AddressT>
385  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
386  GENPYBIND(hidden);
387  template <typename WordT>
388  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
389  template <typename WordT>
390  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
391 
392  bool operator==(SynapseCorrelationCalibQuad const& other) const SYMBOL_VISIBLE;
393  bool operator!=(SynapseCorrelationCalibQuad const& other) const SYMBOL_VISIBLE;
394 
395  GENPYBIND(stringstream)
396  friend std::ostream& operator<<(std::ostream& os, SynapseCorrelationCalibQuad const& config)
397  SYMBOL_VISIBLE;
398 
399 private:
400  // used for direct member access without function calls
401  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseCorrelationCalibRow>;
402  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseCorrelationCalibMatrix>;
403  friend class cereal::access;
404  template <class Archive>
405  void serialize(Archive& ar, std::uint32_t version);
406 
407  time_calibs_type m_time_calibs;
408  amp_calibs_type m_amp_calibs;
409 };
410 
411 
412 class GENPYBIND(visible) SynapseQuad : public DifferentialWriteTrait
413 {
414 public:
415  typedef halco::hicann_dls::vx::SynapseQuadOnDLS coordinate_type;
416  typedef std::true_type is_leaf_node;
417 
418  typedef SynapseWeightQuad::Value Weight GENPYBIND(visible);
419  typedef SynapseLabelQuad::Value Label GENPYBIND(visible);
420  typedef SynapseCorrelationCalibQuad::TimeCalib TimeCalib GENPYBIND(visible);
421  typedef SynapseCorrelationCalibQuad::AmpCalib AmpCalib GENPYBIND(visible);
422 
423  typedef SynapseWeightQuad::values_type weights_type GENPYBIND(visible);
424  typedef SynapseLabelQuad::values_type labels_type GENPYBIND(visible);
425  typedef SynapseCorrelationCalibQuad::time_calibs_type time_calibs_type GENPYBIND(visible);
426  typedef SynapseCorrelationCalibQuad::amp_calibs_type amp_calibs_type GENPYBIND(visible);
427 
428  SynapseQuad() SYMBOL_VISIBLE;
429 
430  GENPYBIND(getter_for(weights), return_value_policy(reference_internal))
431  weights_type const& get_weights() const SYMBOL_VISIBLE;
432  GENPYBIND(setter_for(weights))
433  void set_weights(weights_type const& value) SYMBOL_VISIBLE;
434 
435  GENPYBIND(getter_for(labels), return_value_policy(reference_internal))
436  labels_type const& get_labels() const SYMBOL_VISIBLE;
437  GENPYBIND(setter_for(labels))
438  void set_labels(labels_type const& value) SYMBOL_VISIBLE;
439 
440  GENPYBIND(getter_for(time_calibs), return_value_policy(reference_internal))
441  time_calibs_type const& get_time_calibs() const SYMBOL_VISIBLE;
442  GENPYBIND(setter_for(time_calibs))
443  void set_time_calibs(time_calibs_type const& value) SYMBOL_VISIBLE;
444 
445  GENPYBIND(getter_for(amp_calibs), return_value_policy(reference_internal))
446  amp_calibs_type const& get_amp_calibs() const SYMBOL_VISIBLE;
447  GENPYBIND(setter_for(amp_calibs))
448  void set_amp_calibs(amp_calibs_type const& value) SYMBOL_VISIBLE;
449 
450  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 2;
451  template <typename AddressT>
452  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
453  GENPYBIND(hidden);
454  template <typename WordT>
455  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
456  template <typename WordT>
457  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
458 
459  bool operator==(SynapseQuad const& other) const SYMBOL_VISIBLE;
460  bool operator!=(SynapseQuad const& other) const SYMBOL_VISIBLE;
461 
462  GENPYBIND(stringstream)
463  friend std::ostream& operator<<(std::ostream& os, SynapseQuad const& config) SYMBOL_VISIBLE;
464 
465 private:
466  friend class cereal::access;
467  template <class Archive>
468  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
469  // used for direct member access without function calls
470  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseMatrix>;
471  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::SynapseRow>;
472 
473  weights_type m_weights;
474  labels_type m_labels;
475  time_calibs_type m_time_calibs;
476  amp_calibs_type m_amp_calibs;
477 };
478 
479 
480 class GENPYBIND(visible) ColumnCorrelationQuad : public DifferentialWriteTrait
481 {
482 public:
483  typedef halco::hicann_dls::vx::ColumnCorrelationQuadOnDLS coordinate_type;
484  typedef std::true_type is_leaf_node;
485 
486  struct ColumnCorrelationSwitch
487  {
489  ColumnCorrelationSwitch() SYMBOL_VISIBLE;
490 
496  GENPYBIND(getter_for(enable_internal_causal))
497  bool get_enable_internal_causal() const SYMBOL_VISIBLE;
498 
504  GENPYBIND(setter_for(enable_internal_causal))
505  void set_enable_internal_causal(bool value) SYMBOL_VISIBLE;
506 
512  GENPYBIND(getter_for(enable_internal_acausal))
513  bool get_enable_internal_acausal() const SYMBOL_VISIBLE;
514 
520  GENPYBIND(setter_for(enable_internal_acausal))
521  void set_enable_internal_acausal(bool value) SYMBOL_VISIBLE;
522 
527  GENPYBIND(getter_for(enable_debug_causal))
528  bool get_enable_debug_causal() const SYMBOL_VISIBLE;
529 
534  GENPYBIND(setter_for(enable_debug_causal))
535  void set_enable_debug_causal(bool value) SYMBOL_VISIBLE;
536 
541  GENPYBIND(getter_for(enable_debug_acausal))
542  bool get_enable_debug_acausal() const SYMBOL_VISIBLE;
543 
548  GENPYBIND(setter_for(enable_debug_acausal))
549  void set_enable_debug_acausal(bool value) SYMBOL_VISIBLE;
550 
558  GENPYBIND(getter_for(enable_cadc_neuron_readout_causal))
559  bool get_enable_cadc_neuron_readout_causal() const SYMBOL_VISIBLE;
560 
568  GENPYBIND(setter_for(enable_cadc_neuron_readout_causal))
569  void set_enable_cadc_neuron_readout_causal(bool value) SYMBOL_VISIBLE;
570 
578  GENPYBIND(getter_for(enable_cadc_neuron_readout_acausal))
579  bool get_enable_cadc_neuron_readout_acausal() const SYMBOL_VISIBLE;
580 
588  GENPYBIND(setter_for(enable_cadc_neuron_readout_acausal))
589  void set_enable_cadc_neuron_readout_acausal(bool value) SYMBOL_VISIBLE;
590 
591  bool operator==(ColumnCorrelationSwitch const& other) const SYMBOL_VISIBLE;
592  bool operator!=(ColumnCorrelationSwitch const& other) const SYMBOL_VISIBLE;
593 
594  GENPYBIND(stringstream)
595  friend std::ostream& operator<<(std::ostream& os, ColumnCorrelationSwitch const& config)
596  SYMBOL_VISIBLE;
597 
598  private:
599  friend class cereal::access;
600  template <class Archive>
601  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
602 
603  bool m_enable_internal_causal;
604  bool m_enable_internal_acausal;
605  bool m_enable_debug_causal;
606  bool m_enable_debug_acausal;
607  bool m_enable_cadc_neuron_readout_causal;
608  bool m_enable_cadc_neuron_readout_acausal;
609  };
610 
612  ColumnCorrelationQuad() SYMBOL_VISIBLE;
613 
614  ColumnCorrelationSwitch get_switch(
615  halco::hicann_dls::vx::EntryOnQuad const& correlation_switch) const SYMBOL_VISIBLE;
616  void set_switch(
617  halco::hicann_dls::vx::EntryOnQuad const& correlation_switch,
618  ColumnCorrelationSwitch const& value) SYMBOL_VISIBLE;
619 
620  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 4;
621  template <typename AddressT>
622  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
623  GENPYBIND(hidden);
624  template <typename WordT>
625  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
626  template <typename WordT>
627  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
628 
629  bool operator==(ColumnCorrelationQuad const& other) const SYMBOL_VISIBLE;
630  bool operator!=(ColumnCorrelationQuad const& other) const SYMBOL_VISIBLE;
631 
632  GENPYBIND(stringstream)
633  friend std::ostream& operator<<(std::ostream&, ColumnCorrelationQuad const&) SYMBOL_VISIBLE;
634 
635 private:
636  friend class cereal::access;
637  template <class Archive>
638  void serialize(Archive& ar, std::uint32_t const version);
639 
640  halco::common::typed_array<ColumnCorrelationSwitch, halco::hicann_dls::vx::EntryOnQuad>
641  m_switches;
642 
643  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::ColumnCorrelationRow>;
644 };
645 
646 class GENPYBIND(visible) ColumnCurrentQuad : public DifferentialWriteTrait
647 {
648 public:
649  typedef halco::hicann_dls::vx::ColumnCurrentQuadOnDLS coordinate_type;
650  typedef std::true_type is_leaf_node;
651 
652  struct ColumnCurrentSwitch
653  {
655  ColumnCurrentSwitch() SYMBOL_VISIBLE;
656 
662  GENPYBIND(getter_for(enable_synaptic_current_excitatory))
663  bool get_enable_synaptic_current_excitatory() const SYMBOL_VISIBLE;
664 
670  GENPYBIND(setter_for(enable_synaptic_current_excitatory))
671  void set_enable_synaptic_current_excitatory(bool value) SYMBOL_VISIBLE;
672 
678  GENPYBIND(getter_for(enable_synaptic_current_inhibitory))
679  bool get_enable_synaptic_current_inhibitory() const SYMBOL_VISIBLE;
680 
686  GENPYBIND(setter_for(enable_synaptic_current_inhibitory))
687  void set_enable_synaptic_current_inhibitory(bool value) SYMBOL_VISIBLE;
688 
700  GENPYBIND(getter_for(enable_debug_excitatory))
701  bool get_enable_debug_excitatory() const SYMBOL_VISIBLE;
702 
714  GENPYBIND(setter_for(enable_debug_excitatory))
715  void set_enable_debug_excitatory(bool value) SYMBOL_VISIBLE;
716 
728  GENPYBIND(getter_for(enable_debug_inhibitory))
729  bool get_enable_debug_inhibitory() const SYMBOL_VISIBLE;
730 
742  GENPYBIND(setter_for(enable_debug_inhibitory))
743  void set_enable_debug_inhibitory(bool value) SYMBOL_VISIBLE;
744 
745  bool operator==(ColumnCurrentSwitch const& other) const SYMBOL_VISIBLE;
746  bool operator!=(ColumnCurrentSwitch const& other) const SYMBOL_VISIBLE;
747 
748  GENPYBIND(stringstream)
749  friend std::ostream& operator<<(std::ostream&, ColumnCurrentSwitch const&) SYMBOL_VISIBLE;
750 
751  private:
752  friend class cereal::access;
753  template <class Archive>
754  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
755 
756  bool m_enable_synaptic_current_excitatory;
757  bool m_enable_synaptic_current_inhibitory;
758  bool m_enable_debug_excitatory;
759  bool m_enable_debug_inhibitory;
760  };
761 
763  ColumnCurrentQuad() SYMBOL_VISIBLE;
764 
765  ColumnCurrentSwitch get_switch(halco::hicann_dls::vx::EntryOnQuad const& current_switch) const
766  SYMBOL_VISIBLE;
767  void set_switch(
768  halco::hicann_dls::vx::EntryOnQuad const& current_switch,
769  ColumnCurrentSwitch const& value) SYMBOL_VISIBLE;
770 
771  GENPYBIND(stringstream)
772  friend std::ostream& operator<<(std::ostream& os, ColumnCurrentQuad const& config)
773  SYMBOL_VISIBLE;
774 
775  static size_t constexpr config_size_in_words GENPYBIND(hidden) = 2;
776  template <typename AddressT>
777  static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& block)
778  GENPYBIND(hidden);
779  template <typename WordT>
780  std::array<WordT, config_size_in_words> encode() const GENPYBIND(hidden);
781  template <typename WordT>
782  void decode(std::array<WordT, config_size_in_words> const& data) GENPYBIND(hidden);
783 
784  bool operator==(ColumnCurrentQuad const& other) const SYMBOL_VISIBLE;
785  bool operator!=(ColumnCurrentQuad const& other) const SYMBOL_VISIBLE;
786 
787 private:
788  friend class cereal::access;
789  template <class Archive>
790  void serialize(Archive& ar, std::uint32_t const version);
791 
792  halco::common::typed_array<ColumnCurrentSwitch, halco::hicann_dls::vx::EntryOnQuad> m_switches;
793 
794  friend struct haldls::vx::detail::VisitPreorderImpl<lola::vx::ColumnCurrentRow>;
795 };
796 
797 
801 class GENPYBIND(visible) CorrelationReset
802 {
803 public:
804  typedef halco::hicann_dls::vx::CorrelationResetOnDLS coordinate_type;
805  typedef std::true_type is_leaf_node;
806 
808  CorrelationReset() SYMBOL_VISIBLE;
809 
810  bool operator==(CorrelationReset const& other) const SYMBOL_VISIBLE;
811  bool operator!=(CorrelationReset const& other) const SYMBOL_VISIBLE;
812 
813  static size_t constexpr write_config_size_in_words GENPYBIND(hidden) = 1;
814  static size_t constexpr read_config_size_in_words GENPYBIND(hidden) = 0;
815  template <typename AddressT>
816  static std::array<AddressT, read_config_size_in_words> read_addresses(
817  coordinate_type const& neuron) SYMBOL_VISIBLE GENPYBIND(hidden);
818  template <typename AddressT>
819  static std::array<AddressT, write_config_size_in_words> write_addresses(
820  coordinate_type const& neuron) SYMBOL_VISIBLE GENPYBIND(hidden);
821  template <typename WordT>
822  std::array<WordT, write_config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
823  template <typename WordT>
824  void decode(std::array<WordT, read_config_size_in_words> const& data) SYMBOL_VISIBLE
825  GENPYBIND(hidden);
826 
827  GENPYBIND(stringstream)
828  friend std::ostream& operator<<(std::ostream& os, CorrelationReset const& config)
829  SYMBOL_VISIBLE;
830 
831 private:
832  friend class cereal::access;
833  template <class Archive>
834  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
835 };
836 
837 namespace detail {
838 
839 template <>
840 struct BackendContainerTrait<SynapseWeightQuad>
841  : public BackendContainerBase<
842  SynapseWeightQuad,
843  fisch::vx::word_access_type::Omnibus,
844  fisch::vx::word_access_type::OmnibusChipOverJTAG>
845 {};
846 
847 template <>
848 struct BackendContainerTrait<SynapseLabelQuad>
849  : public BackendContainerBase<
850  SynapseLabelQuad,
851  fisch::vx::word_access_type::Omnibus,
852  fisch::vx::word_access_type::OmnibusChipOverJTAG>
853 {};
854 
855 template <>
856 struct BackendContainerTrait<SynapseCorrelationCalibQuad>
857  : public BackendContainerBase<
858  SynapseCorrelationCalibQuad,
859  fisch::vx::word_access_type::Omnibus,
860  fisch::vx::word_access_type::OmnibusChipOverJTAG>
861 {};
862 
863 template <>
864 struct BackendContainerTrait<SynapseQuad>
865  : public BackendContainerBase<
866  SynapseQuad,
867  fisch::vx::word_access_type::Omnibus,
868  fisch::vx::word_access_type::OmnibusChipOverJTAG>
869 {};
870 
871 template <>
872 struct BackendContainerTrait<ColumnCorrelationQuad>
873  : public BackendContainerBase<
874  ColumnCorrelationQuad,
875  fisch::vx::word_access_type::Omnibus,
876  fisch::vx::word_access_type::OmnibusChipOverJTAG>
877 {};
878 
879 template <>
880 struct BackendContainerTrait<ColumnCurrentQuad>
881  : public BackendContainerBase<
882  ColumnCurrentQuad,
883  fisch::vx::word_access_type::Omnibus,
884  fisch::vx::word_access_type::OmnibusChipOverJTAG>
885 {};
886 
887 template <>
888 struct BackendContainerTrait<CorrelationReset>
889  : public BackendContainerBase<
890  CorrelationReset,
891  fisch::vx::word_access_type::Omnibus,
892  fisch::vx::word_access_type::OmnibusChipOverJTAG>
893 {};
894 
895 } // namespace detail
896 
897 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(SynapseWeightQuad)
898 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(SynapseLabelQuad)
899 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(SynapseCorrelationCalibQuad)
900 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(SynapseQuad)
901 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(ColumnCorrelationQuad)
902 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(ColumnCorrelationQuad::ColumnCorrelationSwitch)
903 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(ColumnCurrentQuad::ColumnCurrentSwitch)
904 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(ColumnCurrentQuad)
905 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(CorrelationReset)
906 
907 } // namespace vx
908 } // namespace haldls
909 
910 namespace std {
911 
912 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::CommonSynramConfig::PCConf)
913 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::SynapseLabelValue)
914 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::CommonSynramConfig::WConf)
915 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::CommonSynramConfig::WaitCtrClear)
916 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::SynapseWeightQuad::Value)
917 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::SynapseCorrelationCalibQuad::TimeCalib)
918 HALCO_GEOMETRY_HASH_CLASS(haldls::vx::SynapseCorrelationCalibQuad::AmpCalib)
919 
920 } // namespace std
#define GENPYBIND_TAG_HALDLS_VX
Definition: genpybind.h:4
Definition: fpga.h:20