4 #error "Requires CHIP_REVISION"
7 #include "halco/common/iter_all.h"
8 #include "halco/common/typed_array.h"
9 #include "halco/common/typed_heap_array.h"
10 #include "haldls/cerealization.h"
11 #include "haldls/vx/common.h"
12 #include "haldls/vx/traits.h"
13 #include "hate/visibility.h"
16 #include <boost/hana/adapt_struct.hpp>
20 #define STR(x) XSTR(x)
22 #define CONCAT(w, x, y, z) STR(ID(w)ID(/)ID(x)ID(/)ID(v)ID(y)ID(/)ID(z))
23 #include CONCAT(haldls,vx,CHIP_REVISION,capmem.h)
24 #include CONCAT(lola,vx,CHIP_REVISION,synapse.h)
31 #if CHIP_REVISION == 2
32 #define GENPYBIND_TAG_LOLA_VX_VY GENPYBIND_TAG_LOLA_VX_V2
33 #define CHIP_REVISION_STR v2
34 #elif CHIP_REVISION == 3
35 #define GENPYBIND_TAG_LOLA_VX_VY GENPYBIND_TAG_LOLA_VX_V3
36 #define CHIP_REVISION_STR v3
38 #error "Unknown CHIP_REVISION"
50 typedef halco::hicann_dls::vx::CHIP_REVISION_STR::SynapseBlockOnDLS
coordinate_type;
52 typedef haldls::vx::CHIP_REVISION_STR::CapMemCell::Value
AnalogValue GENPYBIND(visible);
64 typedef halco::common::typed_array<
65 haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type,
66 halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockOnHemisphere>
75 GENPYBIND(stringstream)
76 friend std::ostream& operator<<(std::ostream& os,
SynapseBlock const& config) SYMBOL_VISIBLE;
84 namespace
haldls::vx::detail {
87 struct BackendContainerTrait<
lola::vx::CHIP_REVISION_STR::SynapseBlock>
88 :
public BackendContainerBase<
89 lola::vx::CHIP_REVISION_STR::SynapseBlock,
90 fisch::vx::word_access_type::Omnibus,
91 fisch::vx::word_access_type::OmnibusChipOverJTAG>
95 struct VisitPreorderImpl<
lola::vx::CHIP_REVISION_STR::SynapseBlock>
99 template <
typename ContainerT,
typename VisitorT>
105 using halco::common::iter_all;
106 using namespace halco::hicann_dls::vx::CHIP_REVISION_STR;
108 visitor(coord, config);
110 visit_preorder(config.matrix, coord.toSynramOnDLS(), visitor);
112 for (
auto block : iter_all<CapMemBlockOnHemisphere>()) {
113 CapMemBlockOnDLS block_on_dls(
114 CapMemBlockOnDLS(block.toEnum() + CapMemBlockOnHemisphere::size * coord.toEnum()));
115 haldls::vx::CHIP_REVISION_STR::CapMemCell i_bias_dac(config.i_bias_dac[block]);
117 i_bias_dac, CapMemCellOnDLS(CapMemCellOnCapMemBlock::syn_i_bias_dac, block_on_dls),
119 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
120 config.i_bias_dac[block] = i_bias_dac.get_value();
130 EXTERN_INSTANTIATE_CEREAL_SERIALIZE_FREE(lola::vx::CHIP_REVISION_STR::SynapseBlock)
lola::vx::SynapseMatrix SynapseMatrix
Synapses of one hemisphere in conjunction with hemisphere-global configuration.
haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type AnalogValueVariant
bool operator==(SynapseBlock const &other) const SYMBOL_VISIBLE
SynapseBlock()=default
Default constructor.
bool operator!=(SynapseBlock const &other) const SYMBOL_VISIBLE
haldls::vx::CHIP_REVISION_STR::CapMemCell::DisableRefresh AnalogDisableRefresh
std::false_type has_local_data
halco::common::typed_array< haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type, halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockOnHemisphere > AnalogValues
halco::hicann_dls::vx::CHIP_REVISION_STR::SynapseBlockOnDLS coordinate_type
haldls::vx::CHIP_REVISION_STR::CapMemCell::Value AnalogValue
static void call(ContainerT &config, typename container_type::coordinate_type const &coord, VisitorT &&visitor)
lola::vx::CHIP_REVISION_STR::SynapseBlock container_type
BOOST_HANA_ADAPT_STRUCT(lola::vx::CHIP_REVISION_STR::SynapseBlock, matrix, i_bias_dac)
halco::hicann_dls::vx::v2::AtomicNeuronOnDLS coordinate_type