2 #include "halco/common/iter_all.h"
3 #include "halco/common/typed_array.h"
4 #include "halco/hicann-dls/vx/dac.h"
5 #include "haldls/cerealization.h"
6 #include "haldls/vx/common.h"
7 #include "haldls/vx/spi.h"
8 #include "haldls/vx/traits.h"
9 #include "hate/visibility.h"
12 #include <boost/hana/adapt_struct.hpp>
25 typedef haldls::vx::DACChannel::Value
Value GENPYBIND(visible);
30 typedef halco::common::typed_array<
Value, halco::hicann_dls::vx::DACChannelOnBoard>
_value_type
52 void set_voltage(halco::hicann_dls::vx::DACChannelOnBoard coord,
double voltage) SYMBOL_VISIBLE;
60 double get_voltage(halco::hicann_dls::vx::DACChannelOnBoard coord) const SYMBOL_VISIBLE;
65 GENPYBIND(stringstream)
66 friend std::ostream& operator<<(std::ostream& os,
DACChannelBlock const& block) SYMBOL_VISIBLE;
85 typedef halco::common::typed_array<
bool, halco::hicann_dls::vx::DACChannelOnBoard>
_enable_type
94 GENPYBIND(stringstream)
95 friend std::ostream& operator<<(std::ostream& os,
DACControlBlock const& block) SYMBOL_VISIBLE;
103 namespace
haldls::vx::detail {
107 :
public BackendContainerBase<
108 lola::vx::DACChannelBlock,
109 fisch::vx::word_access_type::SPIDACDataRegister>
114 :
public BackendContainerBase<
115 lola::vx::DACControlBlock,
116 fisch::vx::word_access_type::SPIDACControlRegister>
122 template <
typename ContainerT,
typename VisitorT>
128 using halco::common::iter_all;
129 using namespace halco::hicann_dls::vx;
131 visitor(coord, config);
133 for (
auto ch : iter_all<DACChannelOnBoard>()) {
134 DACChannel channel(config.value[ch]);
135 visit_preorder(channel, ch, visitor);
143 template <
typename ContainerT,
typename VisitorT>
149 using halco::common::iter_all;
150 using namespace halco::hicann_dls::vx;
152 visitor(coord, config);
154 for (
auto dac : iter_all<DACOnBoard>()) {
156 for (
auto ch : iter_all<DACChannelOnDAC>()) {
157 control.set_enable_channel(ch, config.enable[DACChannelOnBoard(ch, dac)]);
159 visit_preorder(control, dac, visitor);
Container for configuration of all DAC channels on the xBoard.
halco::common::typed_array< Value, halco::hicann_dls::vx::DACChannelOnBoard > _value_type
haldls::vx::DACChannel::Value Value
halco::hicann_dls::vx::DACChannelBlockOnBoard coordinate_type
std::false_type has_local_data
DACChannelBlock() SYMBOL_VISIBLE
Default constructor.
Container for configuration of all DAC channel enable values on the xBoard.
DACControlBlock() SYMBOL_VISIBLE
Default constructor.
halco::common::typed_array< bool, halco::hicann_dls::vx::DACChannelOnBoard > _enable_type
std::false_type has_local_data
halco::hicann_dls::vx::DACControlBlockOnBoard coordinate_type
BOOST_HANA_ADAPT_STRUCT(lola::vx::DACChannelBlock, value)
#define GENPYBIND_TAG_LOLA_VX
lola::vx::DACControlBlock DACControlBlock
lola::vx::DACChannelBlock DACChannelBlock
static void call(ContainerT &config, lola::vx::DACChannelBlock::coordinate_type const &coord, VisitorT &&visitor)
static void call(ContainerT &config, lola::vx::DACControlBlock::coordinate_type const &coord, VisitorT &&visitor)