4 #error "Requires CHIP_REVISION"
11 #define CONCAT(w, x, y, z) STR(ID(w)ID(/)ID(x)ID(/)ID(v)ID(y)ID(/)ID(z))
12 #include CONCAT(haldls,vx,CHIP_REVISION,capmem.h)
13 #include CONCAT(haldls,vx,CHIP_REVISION,padi.h)
14 #include CONCAT(haldls,vx,CHIP_REVISION,synapse_driver.h)
21 #include "halco/common/iter_all.h"
22 #include "halco/common/typed_array.h"
23 #include "haldls/cerealization.h"
24 #include "haldls/vx/common.h"
25 #include "haldls/vx/traits.h"
26 #include "hate/visibility.h"
29 #include <boost/hana/adapt_struct.hpp>
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::SynapseDriverBlockOnDLS
coordinate_type;
55 typedef halco::common::typed_array<
56 haldls::vx::CHIP_REVISION_STR::SynapseDriverConfig,
57 halco::hicann_dls::vx::CHIP_REVISION_STR::SynapseDriverOnSynapseDriverBlock>
68 haldls::vx::CHIP_REVISION_STR::CommonPADIBusConfig
padi_bus;
73 haldls::vx::CHIP_REVISION_STR::CommonSTPConfig
stp;
75 typedef haldls::vx::CHIP_REVISION_STR::CapMemCell::Value
AnalogValue GENPYBIND(visible);
79 typedef halco::common::typed_array<
80 haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type,
81 halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockOnHemisphere>
98 GENPYBIND(stringstream)
108 namespace
haldls::vx::detail {
111 struct BackendContainerTrait<
lola::vx::CHIP_REVISION_STR::SynapseDriverBlock>
112 :
public BackendContainerBase<
113 lola::vx::CHIP_REVISION_STR::SynapseDriverBlock,
114 fisch::vx::word_access_type::Omnibus,
115 fisch::vx::word_access_type::OmnibusChipOverJTAG>
119 struct VisitPreorderImpl<
lola::vx::CHIP_REVISION_STR::SynapseDriverBlock>
123 template <
typename ContainerT,
typename VisitorT>
129 using halco::common::iter_all;
130 using namespace halco::hicann_dls::vx::CHIP_REVISION_STR;
132 visitor(coord, config);
134 for (
auto const on_block : iter_all<SynapseDriverOnSynapseDriverBlock>()) {
136 config.synapse_drivers[on_block], SynapseDriverOnDLS(on_block, coord), visitor);
139 visit_preorder(config.padi_bus, coord.toCommonPADIBusConfigOnDLS(), visitor);
140 visit_preorder(config.stp, coord.toCommonSTPConfigOnDLS(), visitor);
142 for (
auto block : iter_all<CapMemBlockOnHemisphere>()) {
143 CapMemBlockOnDLS block_on_dls(
144 CapMemBlockOnDLS(block.toEnum() + CapMemBlockOnHemisphere::size * coord.toEnum()));
146 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_v_charge_0(config.stp_v_charge_0[block]);
149 CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_v_charge_0, block_on_dls), visitor);
150 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
151 config.stp_v_charge_0[block] = stp_v_charge_0.get_value();
154 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_v_charge_1(config.stp_v_charge_1[block]);
157 CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_v_charge_1, block_on_dls), visitor);
158 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
159 config.stp_v_charge_1[block] = stp_v_charge_1.get_value();
162 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_v_recover_0(
163 config.stp_v_recover_0[block]);
166 CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_v_recover_0, block_on_dls), visitor);
167 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
168 config.stp_v_recover_0[block] = stp_v_recover_0.get_value();
171 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_v_recover_1(
172 config.stp_v_recover_1[block]);
175 CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_v_recover_1, block_on_dls), visitor);
176 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
177 config.stp_v_recover_1[block] = stp_v_recover_1.get_value();
180 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_i_bias_comparator(
181 config.stp_i_bias_comparator[block]);
183 stp_i_bias_comparator,
184 CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_i_bias_comparator, block_on_dls),
186 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
187 config.stp_i_bias_comparator[block] = stp_i_bias_comparator.get_value();
190 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_i_ramp(config.stp_i_ramp[block]);
192 stp_i_ramp, CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_i_ramp, block_on_dls),
194 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
195 config.stp_i_ramp[block] = stp_i_ramp.get_value();
198 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_i_calib(config.stp_i_calib[block]);
200 stp_i_calib, CapMemCellOnDLS(CapMemCellOnCapMemBlock::stp_i_calib, block_on_dls),
202 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
203 config.stp_i_calib[block] = stp_i_calib.get_value();
207 haldls::vx::CHIP_REVISION_STR::CapMemCell stp_i_bias_readout(config.stp_i_bias_readout);
210 ((coord == SynapseDriverBlockOnDLS::top) ? CapMemCellOnDLS::stp_ibias_readout_top
211 : CapMemCellOnDLS::stp_ibias_readout_bottom),
213 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
214 config.stp_i_bias_readout = stp_i_bias_readout.get_value();
217 haldls::vx::CHIP_REVISION_STR::CapMemCell hagen_i_bias_dac(config.hagen_i_bias_dac);
220 ((coord == SynapseDriverBlockOnDLS::top) ? CapMemCellOnDLS::hagen_ibias_dac_top
221 : CapMemCellOnDLS::hagen_ibias_dac_bottom),
223 if constexpr (!std::is_same<ContainerT, container_type const>::value) {
224 config.hagen_i_bias_dac = hagen_i_bias_dac.get_value();
232 lola::vx::CHIP_REVISION_STR::SynapseDriverBlock,
240 stp_i_bias_comparator,
245 EXTERN_INSTANTIATE_CEREAL_SERIALIZE_FREE(lola::vx::CHIP_REVISION_STR::SynapseDriverBlock)
Block on synapse drivers and global configuration of one hemisphere.
AnalogValues stp_v_recover_1
bool operator==(SynapseDriverBlock const &other) const SYMBOL_VISIBLE
AnalogValues stp_v_charge_0
AnalogValues stp_v_recover_0
std::false_type has_local_data
AnalogValues stp_v_charge_1
halco::hicann_dls::vx::CHIP_REVISION_STR::SynapseDriverBlockOnDLS coordinate_type
halco::common::typed_array< haldls::vx::CHIP_REVISION_STR::SynapseDriverConfig, halco::hicann_dls::vx::CHIP_REVISION_STR::SynapseDriverOnSynapseDriverBlock > SynapseDrivers
haldls::vx::CHIP_REVISION_STR::CapMemCell::Value AnalogValue
SynapseDriverBlock()=default
Default constructor.
haldls::vx::CHIP_REVISION_STR::CapMemCell::DisableRefresh AnalogDisableRefresh
haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type AnalogValueVariant
AnalogValueVariant stp_i_bias_readout
AnalogValueVariant hagen_i_bias_dac
haldls::vx::CHIP_REVISION_STR::CommonSTPConfig stp
Digital STP configuration.
SynapseDrivers synapse_drivers
Block of synapse drivers.
AnalogValues stp_i_bias_comparator
haldls::vx::CHIP_REVISION_STR::CommonPADIBusConfig padi_bus
Configuration of PADI-busses.
bool operator!=(SynapseDriverBlock const &other) const SYMBOL_VISIBLE
halco::common::typed_array< haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type, halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockOnHemisphere > AnalogValues
lola::vx::CHIP_REVISION_STR::SynapseDriverBlock container_type
static void call(ContainerT &config, lola::vx::CHIP_REVISION_STR::SynapseDriverBlock::coordinate_type const &coord, VisitorT &&visitor)
BOOST_HANA_ADAPT_STRUCT(lola::vx::CHIP_REVISION_STR::SynapseDriverBlock, synapse_drivers, padi_bus, stp, stp_v_charge_0, stp_v_charge_1, stp_v_recover_0, stp_v_recover_1, stp_i_bias_comparator, stp_i_ramp, stp_i_calib, stp_i_bias_readout, hagen_i_bias_dac)
halco::hicann_dls::vx::v2::AtomicNeuronOnDLS coordinate_type