5 #include "halco/common/geometry.h"
6 #include "halco/hicann-dls/vx/background.h"
7 #include "halco/hicann-dls/vx/event.h"
12 #include "hate/math.h"
13 #include "hate/visibility.h"
16 #include "hxcomm/vx/target.h"
20 class OmnibusChipOverJTAG;
41 constexpr
static auto unsupported_read_targets GENPYBIND(hidden) = {
42 hxcomm::vx::Target::hardware, hxcomm::vx::Target::simulation};
49 struct GENPYBIND(inline_base("*
")) Period
50 : public halco::common::detail::
51 RantWrapper<Period, uint_fast32_t, hate::math::pow(2, 16) - 1, 0>
53 constexpr explicit Period(uintmax_t const val = 0)
54 GENPYBIND(implicit_conversion) : rant_t(val)
64 struct GENPYBIND(inline_base("*
")) Rate
65 : public halco::common::detail::
66 RantWrapper<Rate, uint_fast16_t, hate::math::pow(2, 8) - 1, 0>
68 constexpr explicit Rate(uintmax_t const val = 0)
69 GENPYBIND(implicit_conversion) : rant_t(val)
77 struct GENPYBIND(inline_base("*
")) Seed
78 : public halco::common::detail::
79 RantWrapper<Seed, uint_fast64_t, hate::math::pow(2, 32) - 1, 0>
81 constexpr explicit Seed(uintmax_t const val = 0)
82 GENPYBIND(implicit_conversion) : rant_t(val)
92 struct GENPYBIND(inline_base("*
")) Mask
93 : public halco::common::detail::
94 RantWrapper<Mask, uint_fast16_t, hate::math::pow(2, 8) - 1, 0>
96 constexpr explicit Mask(uintmax_t const val = 0)
97 GENPYBIND(implicit_conversion) : rant_t(val)
102 BackgroundSpikeSource() SYMBOL_VISIBLE;
111 GENPYBIND(getter_for(enable))
112 bool get_enable() const SYMBOL_VISIBLE;
121 GENPYBIND(setter_for(enable))
122 void set_enable(bool value) SYMBOL_VISIBLE;
131 GENPYBIND(getter_for(enable_random))
132 bool get_enable_random() const SYMBOL_VISIBLE;
141 GENPYBIND(setter_for(enable_random))
142 void set_enable_random(bool value) SYMBOL_VISIBLE;
149 GENPYBIND(getter_for(period))
150 Period get_period() const SYMBOL_VISIBLE;
157 GENPYBIND(setter_for(period))
158 void set_period(Period const& value) SYMBOL_VISIBLE;
165 GENPYBIND(getter_for(rate))
166 Rate get_rate() const SYMBOL_VISIBLE;
173 GENPYBIND(setter_for(rate))
174 void set_rate(Rate const& value) SYMBOL_VISIBLE;
181 GENPYBIND(getter_for(seed))
182 Seed get_seed() const SYMBOL_VISIBLE;
189 GENPYBIND(setter_for(seed))
190 void set_seed(Seed const& value) SYMBOL_VISIBLE;
197 GENPYBIND(getter_for(mask))
198 Mask get_mask() const SYMBOL_VISIBLE;
205 GENPYBIND(setter_for(mask))
206 void set_mask(Mask const& value) SYMBOL_VISIBLE;
214 GENPYBIND(getter_for(neuron_label))
215 halco::hicann_dls::vx::NeuronLabel get_neuron_label() const SYMBOL_VISIBLE;
223 GENPYBIND(setter_for(neuron_label))
224 void set_neuron_label(halco::hicann_dls::vx::NeuronLabel const& value) SYMBOL_VISIBLE;
226 bool operator==(BackgroundSpikeSource const& other) const SYMBOL_VISIBLE;
227 bool operator!=(BackgroundSpikeSource const& other) const SYMBOL_VISIBLE;
229 static size_t constexpr config_size_in_words GENPYBIND(hidden) = 3;
230 template <typename AddressT>
231 static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& neuron)
232 SYMBOL_VISIBLE GENPYBIND(hidden);
233 template <typename WordT>
234 std::array<WordT, config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
235 template <typename WordT>
236 void decode(std::array<WordT, config_size_in_words> const& data) SYMBOL_VISIBLE
239 GENPYBIND(stringstream)
240 friend std::ostream& operator<<(std::ostream& os, BackgroundSpikeSource const& config)
244 friend class cereal::access;
245 template <class Archive>
246 void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
249 bool m_enable_random;
254 halco::hicann_dls::vx::NeuronLabel m_neuron_label;
257 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(BackgroundSpikeSource)
262 struct BackendContainerTrait<BackgroundSpikeSource>
263 : public BackendContainerBase<
264 BackgroundSpikeSource,
265 fisch::vx::word_access_type::Omnibus,
266 fisch::vx::word_access_type::OmnibusChipOverJTAG>
269 } // namespace detail
272 } // namespace haldls
Background spike source on chip.
std::true_type is_leaf_node
halco::hicann_dls::vx::BackgroundSpikeSourceOnDLS coordinate_type
#define GENPYBIND_TAG_HALDLS_VX