5 #include "halco/common/typed_array.h"
6 #include "halco/hicann-dls/vx/chip.h"
7 #include "halco/hicann-dls/vx/current_dac.h"
8 #include "halco/hicann-dls/vx/synapse.h"
12 #include "hate/visibility.h"
16 class OmnibusChipOverJTAG;
34 enum class Sign : uint_fast8_t
40 typedef halco::common::typed_array<bool, halco::hicann_dls::vx::HemisphereOnDLS>
HemisphereType
41 GENPYBIND(opaque(
false));
43 typedef halco::common::typed_array<bool, halco::hicann_dls::vx::SynapticInputOnNeuron>
47 struct GENPYBIND(inline_base("*
")) Current
48 : public halco::common::detail::BaseType<Current, uint8_t>
50 constexpr explicit Current(uintmax_t const val = 0) GENPYBIND(implicit_conversion) :
56 CurrentDAC() SYMBOL_VISIBLE;
59 GENPYBIND(getter_for(enable_current))
60 bool get_enable_current() const SYMBOL_VISIBLE;
61 GENPYBIND(setter_for(enable_current))
62 void set_enable_current(bool value) SYMBOL_VISIBLE;
65 GENPYBIND(getter_for(current))
66 Current get_current() const SYMBOL_VISIBLE;
67 GENPYBIND(setter_for(current))
68 void set_current(Current value) SYMBOL_VISIBLE;
71 GENPYBIND(getter_for(sign))
72 Sign get_sign() const SYMBOL_VISIBLE;
73 GENPYBIND(setter_for(sign))
74 void set_sign(Sign value) SYMBOL_VISIBLE;
77 GENPYBIND(getter_for(connect_neuron))
78 HemisphereType get_connect_neuron() const SYMBOL_VISIBLE;
79 GENPYBIND(setter_for(connect_neuron))
80 void set_connect_neuron(HemisphereType value) SYMBOL_VISIBLE;
83 GENPYBIND(getter_for(connect_synapse))
84 SynapseTargetType get_connect_synapse() const SYMBOL_VISIBLE;
85 GENPYBIND(setter_for(connect_synapse))
86 void set_connect_synapse(SynapseTargetType value) SYMBOL_VISIBLE;
88 bool operator==(CurrentDAC const& other) const SYMBOL_VISIBLE;
89 bool operator!=(CurrentDAC const& other) const SYMBOL_VISIBLE;
91 GENPYBIND(stringstream)
92 friend std::ostream& operator<<(std::ostream& os, CurrentDAC const& config) SYMBOL_VISIBLE;
94 static size_t constexpr config_size_in_words GENPYBIND(hidden) = 1;
96 template <typename AddressT>
97 static std::array<AddressT, config_size_in_words> addresses(coordinate_type const& coord)
98 SYMBOL_VISIBLE GENPYBIND(hidden);
100 template <typename WordT>
101 std::array<WordT, config_size_in_words> encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
103 template <typename WordT>
104 void decode(std::array<WordT, config_size_in_words> const& words) SYMBOL_VISIBLE
108 friend class cereal::access;
109 template <class Archive>
110 void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
113 bool m_enable_current;
115 HemisphereType m_connect_neuron;
116 SynapseTargetType m_connect_synapse;
119 std::ostream& operator<<(std::ostream&, CurrentDAC::Sign const&) SYMBOL_VISIBLE;
121 EXTERN_INSTANTIATE_CEREAL_SERIALIZE(CurrentDAC)
127 struct BackendContainerTrait<CurrentDAC>
128 : public BackendContainerBase<
130 fisch::vx::word_access_type::Omnibus,
131 fisch::vx::word_access_type::OmnibusChipOverJTAG>
134 } // namespace detail
136 } // namespace haldls::vx
Configuration of the current DAC of the readout chain.
halco::hicann_dls::vx::CurrentDACOnDLS coordinate_type
Sign
Decide whether current is sourced or sinked.
halco::common::typed_array< bool, halco::hicann_dls::vx::HemisphereOnDLS > HemisphereType
halco::common::typed_array< bool, halco::hicann_dls::vx::SynapticInputOnNeuron > SynapseTargetType
std::true_type is_leaf_node
#define GENPYBIND_TAG_HALDLS_VX