LOLA
capmem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef CHIP_REVISION
4 #error "Requires CHIP_REVISION"
5 #endif
6 
7 #define ID(x) x
8 #define XSTR(x) #x
9 #define STR(x) XSTR(x)
10 // clang-format off
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,synapse.h)
14 // clang-format on
15 #undef ID
16 #undef XSTR
17 #undef STR
18 #undef CONCAT
19 
20 #include "halco/common/typed_array.h"
21 #include "halco/hicann-dls/vx/capmem.h"
22 #include "haldls/cerealization.h"
23 #include "hate/visibility.h"
24 #include "lola/vx/cerealization.h"
25 #include "lola/vx/genpybind.h"
26 
27 #if CHIP_REVISION == 2
28 #define GENPYBIND_TAG_LOLA_VX_VY GENPYBIND_TAG_LOLA_VX_V2
29 #define CHIP_REVISION_STR v2
30 #elif CHIP_REVISION == 3
31 #define GENPYBIND_TAG_LOLA_VX_VY GENPYBIND_TAG_LOLA_VX_V3
32 #define CHIP_REVISION_STR v3
33 #else
34 #error "Unknown CHIP_REVISION"
35 #endif
36 
37 namespace lola::vx::CHIP_REVISION_STR GENPYBIND_TAG_LOLA_VX_VY {
38 #undef GENPYBIND_TAG_LOLA_VX_VY
39 
43 class GENPYBIND(visible) CapMem
44 {
45 public:
46  typedef halco::hicann_dls::vx::CapMemOnDLS coordinate_type;
47  typedef std::false_type has_local_data;
48 
49  CapMem() = default;
50 
51  typedef halco::common::typed_array<
52  haldls::vx::CHIP_REVISION_STR::CapMemBlockConfig,
53  halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockConfigOnDLS>
54  Blocks GENPYBIND(opaque(false));
55 
60 
64  haldls::vx::CHIP_REVISION_STR::SynapseBiasSelection synapse_bias_selection;
65 
69  haldls::vx::CHIP_REVISION_STR::ReferenceGeneratorConfig reference_generator;
70 
71  typedef haldls::vx::CHIP_REVISION_STR::CapMemCell::Value AnalogValue GENPYBIND(visible);
72  typedef haldls::vx::CHIP_REVISION_STR::CapMemCell::DisableRefresh AnalogDisableRefresh
73  GENPYBIND(visible);
74  // TODO (Issue 3622): Expose in Python
75  typedef halco::common::typed_array<
76  haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type,
77  halco::hicann_dls::vx::CHIP_REVISION_STR::UnusedCapMemCellOnDLS>
78  UnusedCells GENPYBIND(hidden);
79 
84 
85  bool operator==(CapMem const& other) const SYMBOL_VISIBLE;
86  bool operator!=(CapMem const& other) const SYMBOL_VISIBLE;
87 
88  GENPYBIND(stringstream)
89  friend std::ostream& operator<<(std::ostream& os, CapMem const& config) SYMBOL_VISIBLE;
90 
91 private:
92  friend haldls::vx::detail::VisitPreorderImpl<CapMem>;
93 };
94 
95 }
96 
97 #include "lola/vx/capmem.tcc"
Configuration of the CapMem and associated selections as well as the reference generator.
Definition: capmem.h:44
bool operator==(CapMem const &other) const SYMBOL_VISIBLE
Blocks blocks
CapMem configuration per quadrant.
Definition: capmem.h:59
halco::common::typed_array< haldls::vx::CHIP_REVISION_STR::CapMemCell::value_type, halco::hicann_dls::vx::CHIP_REVISION_STR::UnusedCapMemCellOnDLS > UnusedCells
Definition: capmem.h:78
haldls::vx::CHIP_REVISION_STR::CapMemCell::Value AnalogValue
Definition: capmem.h:71
UnusedCells unused_cells
Unused CapMem cells.
Definition: capmem.h:83
halco::common::typed_array< haldls::vx::CHIP_REVISION_STR::CapMemBlockConfig, halco::hicann_dls::vx::CHIP_REVISION_STR::CapMemBlockConfigOnDLS > Blocks
Definition: capmem.h:54
haldls::vx::CHIP_REVISION_STR::CapMemCell::DisableRefresh AnalogDisableRefresh
Definition: capmem.h:73
haldls::vx::CHIP_REVISION_STR::ReferenceGeneratorConfig reference_generator
Reference generator.
Definition: capmem.h:69
std::false_type has_local_data
Definition: capmem.h:47
haldls::vx::CHIP_REVISION_STR::SynapseBiasSelection synapse_bias_selection
Synapse bias selection.
Definition: capmem.h:64
halco::hicann_dls::vx::CapMemOnDLS coordinate_type
Definition: capmem.h:46
bool operator!=(CapMem const &other) const SYMBOL_VISIBLE
Definition: cadc.h:465