STADLS
dumper.h
Go to the documentation of this file.
1 #pragma once
2 #include "halco/hicann-dls/vx/barrier.h"
3 #include "halco/hicann-dls/vx/omnibus.h"
4 #include "haldls/vx/barrier.h"
5 #include "haldls/vx/block.h"
6 #include "haldls/vx/timer.h"
7 #include "hate/visibility.h"
9 
10 namespace stadls::vx::detail {
11 
12 template <typename>
13 class Dumper;
14 
15 template <typename T>
16 std::ostream& operator<<(std::ostream& os, Dumper<T> const& builder) SYMBOL_VISIBLE;
17 
24 template <typename DoneType>
25 class Dumper
26 {
27 public:
28  typedef DoneType done_type;
29 
31  Dumper() = default;
32 
34  ~Dumper() = default;
35 
37  Dumper(Dumper&&) = default;
38 
40  Dumper& operator=(Dumper&&) = default;
41 
43  Dumper(Dumper const&) = delete;
44 
46  Dumper& operator=(Dumper const&) = delete;
47 
54  typename haldls::vx::Timer::coordinate_type const& coord, haldls::vx::Timer::Value time);
55 
62  halco::hicann_dls::vx::BarrierOnFPGA const& coord, haldls::vx::Barrier barrier);
63 
70  halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA const& coord,
71  haldls::vx::PollingOmnibusBlock barrier);
72 
79  template <typename ContainerT>
80  void write(typename ContainerT::coordinate_type const& coord, ContainerT const& config);
81 
83  template <typename ContainerT>
85  typename ContainerT::coordinate_type const& coord);
86 
92 
97  template <typename T>
98  friend std::ostream& operator<<(std::ostream& os, Dumper<T> const& builder);
99 
105  void merge_back(Dumper& other);
106 
112  void merge_front(Dumper& other);
113 
120  void copy_back(Dumper const& other);
121 
126  bool empty() const;
127 
128 private:
129  friend class cereal::access;
130  template <class Archive>
131  void serialize(Archive& ar, std::uint32_t const version);
132 
133  done_type m_dumpit;
134 };
135 
136 } // namespace stadls::vx::detail
Ticket for to-be-available container data corresponding to a read instruction.
Dumper implements an interface derived from fisch::vx::PlaybackProgramBuilder.
Definition: dumper.h:26
void merge_front(Dumper &other)
Merge other PlaybackProgramBuilder to the beginning of this builder instance.
void block_until(halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA const &coord, haldls::vx::PollingOmnibusBlock barrier)
Add instruction to block execution until specified barrier is completed.
Dumper()=default
Default constructor.
PlaybackProgram::ContainerTicket< ContainerT > read(typename ContainerT::coordinate_type const &coord)
We do not support read and throw at runtime.
Dumper & operator=(Dumper const &)=delete
Copy assignment forbidden.
void block_until(typename haldls::vx::Timer::coordinate_type const &coord, haldls::vx::Timer::Value time)
Add instruction to block execution until specified timer has reached specified value.
void merge_back(Dumper &other)
Merge other Dumper to the end of this instance.
void block_until(halco::hicann_dls::vx::BarrierOnFPGA const &coord, haldls::vx::Barrier barrier)
Add instruction to block execution until specified barrier is completed.
Dumper & operator=(Dumper &&)=default
Move assignment operator.
void write(typename ContainerT::coordinate_type const &coord, ContainerT const &config)
Add write instruction for container.
void copy_back(Dumper const &other)
Copy other Dumper to the end of this instance.
Dumper(Dumper &&)=default
Move constructor.
Dumper(Dumper const &)=delete
Copy constructor forbidden.
done_type done()
Return ordered list of write coordinate-container pairs.
bool empty() const
Get whether builder is empty, i.e.
friend std::ostream & operator<<(std::ostream &os, Dumper< T > const &builder)
Print coordinate/container pairs added until now.
~Dumper()=default
Destructor.
std::ostream & operator<<(std::ostream &os, Dumper< T > const &builder) SYMBOL_VISIBLE
struct stadls::vx::v2::DumperDone access
stadls::vx::detail::Dumper< DumperDone > Dumper
Definition: dumper.h:18