HALDLS
reset.h
Go to the documentation of this file.
1 #pragma once
2 #include <array>
3 #include <iosfwd>
4 
5 #include "halco/hicann-dls/vx/reset.h"
6 #include "haldls/cerealization.h"
7 #include "haldls/vx/genpybind.h"
8 #include "haldls/vx/traits.h"
9 #include "hate/visibility.h"
10 
11 namespace fisch::vx {
12 class ResetChip;
13 } // namespace fisch::vx
14 
15 namespace haldls {
16 namespace vx GENPYBIND_TAG_HALDLS_VX {
17 
21 class GENPYBIND(visible) ResetChip
22 {
23 public:
24  typedef halco::hicann_dls::vx::ResetChipOnDLS coordinate_type;
25  typedef std::true_type is_leaf_node;
26 
32  explicit ResetChip(bool value = false) GENPYBIND(implicit_conversion) SYMBOL_VISIBLE;
33 
39  void set(bool value) SYMBOL_VISIBLE;
40 
41  bool operator==(ResetChip const& other) const SYMBOL_VISIBLE;
42  bool operator!=(ResetChip const& other) const SYMBOL_VISIBLE;
43 
44  GENPYBIND(stringstream)
45  friend std::ostream& operator<<(std::ostream& os, ResetChip const& config) SYMBOL_VISIBLE;
46 
47  static size_t constexpr write_config_size_in_words GENPYBIND(hidden) = 1;
48  static size_t constexpr read_config_size_in_words GENPYBIND(hidden) = 0;
49  static std::array<halco::hicann_dls::vx::ResetChipOnDLS, write_config_size_in_words>
50  write_addresses(coordinate_type const& word) SYMBOL_VISIBLE GENPYBIND(hidden);
51  static std::array<halco::hicann_dls::vx::ResetChipOnDLS, read_config_size_in_words>
52  read_addresses(coordinate_type const& word) SYMBOL_VISIBLE GENPYBIND(hidden);
53  std::array<fisch::vx::word_access_type::ResetChip, write_config_size_in_words> encode() const
54  SYMBOL_VISIBLE GENPYBIND(hidden);
55  void decode(std::array<fisch::vx::word_access_type::ResetChip, read_config_size_in_words> const&
56  data) SYMBOL_VISIBLE GENPYBIND(hidden);
57 
58 private:
59  friend class cereal::access;
60  template <typename Archive>
61  void serialize(Archive& ar, std::uint32_t const version);
62 
63  bool m_value;
64 };
65 
67 
68 namespace detail {
69 
70 template <>
72  : public BackendContainerBase<ResetChip, fisch::vx::word_access_type::ResetChip>
73 {};
74 
75 } // namespace detail
76 
77 } // namespace vx
78 } // namespace haldls
#define EXTERN_INSTANTIATE_CEREAL_SERIALIZE(CLASS_NAME)
Definition: cerealization.h:75
Container for setting the reset pin of the chip.
Definition: reset.h:22
ResetChip(bool value=false) SYMBOL_VISIBLE
Construct chip reset with boolean value.
halco::hicann_dls::vx::ResetChipOnDLS coordinate_type
Definition: reset.h:24
std::true_type is_leaf_node
Definition: reset.h:25
#define GENPYBIND_TAG_HALDLS_VX
Definition: genpybind.h:4
Definition: arq.h:13
haldls::vx::ResetChip ResetChip
Definition: reset.h:7
Backend container trait base.
Definition: traits.h:77