5 #include <unordered_set>
7 #include "halco/hicann-dls/vx/barrier.h"
8 #include "haldls/vx/barrier.h"
9 #include "haldls/vx/common.h"
10 #include "hate/visibility.h"
11 #include "hxcomm/vx/target.h"
17 #if defined(__GENPYBIND__) or defined(__GENPYBIND_GENERATED__)
18 #include "haldls/vx/pickle.h"
21 #ifdef __GENPYBIND_GENERATED__
22 #include "fisch/vx/playback_program_builder.h"
32 #if defined(__GENPYBIND__) or defined(__GENPYBIND_GENERATED__)
41 template <
typename,
typename,
template <
typename>
class>
42 class PlaybackProgramBuilderAdapterImpl;
44 template <
typename,
typename,
template <
typename>
class>
47 template <
typename T,
typename U,
template <
typename>
class C>
55 typename BuilderStorage,
58 class CoordinateToContainer>
79 typename haldls::vx::Timer::coordinate_type
const& coord, haldls::vx::Timer::Value time);
87 typename haldls::vx::Timer::coordinate_type
const& coord, haldls::vx::Timer::Value time);
94 void block_until(halco::hicann_dls::vx::BarrierOnFPGA
const& coord, haldls::vx::Barrier sync);
102 halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA
const& coord,
103 haldls::vx::PollingOmnibusBlock sync);
111 template <
typename Type>
113 typename Type::coordinate_type
const& coord,
115 haldls::vx::Backend backend);
125 template <
typename Type>
126 void write(
typename Type::coordinate_type
const& coord, Type
const& config);
135 template <
typename Type>
137 typename Type::coordinate_type
const& coord,
139 Type
const& config_reference,
140 haldls::vx::Backend backend);
151 template <
typename Type>
153 typename Type::coordinate_type
const& coord,
155 Type
const& config_reference);
162 template <
typename CoordinateType>
164 CoordinateType
const& coord, haldls::vx::Backend backend);
173 template <
typename CoordinateType>
175 CoordinateType
const& coord);
227 template <
typename T,
typename U,
template <
typename>
class C>
232 parent.def(
"__repr__", [](GENPYBIND_PARENT_TYPE
const& p) {
233 std::stringstream ss;
234 typedef hate::type_list<::stadls::vx::v2::Dumper>
dumper_types;
235 if constexpr (hate::is_in_type_list<
238 ss <<
"PlaybackProgramBuilderDumper()";
240 ss <<
"PlaybackProgramBuilder(to FPGA size: " << p.size_to_fpga()
241 <<
", is write only: " << std::boolalpha << p.is_write_only() <<
")";
245 parent.def(
"__str__", [](GENPYBIND_PARENT_TYPE
const& p) {
246 std::stringstream ss;
276 template <
class Archive>
277 void serialize(Archive& ar, std::uint32_t
const version);
279 std::unique_ptr<BuilderStorage> m_builder_impl;
281 std::unordered_set<hxcomm::vx::Target> m_unsupported_targets;
Ticket for to-be-available container data corresponding to a read instruction.
Dumper implements an interface derived from fisch::vx::PlaybackProgramBuilder.
Sequential PlaybackProgram builder.
DoneType done()
Close PlaybackProgram build process and return executable program.
PlaybackProgramBuilderAdapter()
Construct builder.
void write(typename Type::coordinate_type const &coord, Type const &config, haldls::vx::Backend backend)
Add instructions to write given container to given location.
void write(typename Type::coordinate_type const &coord, Type const &config, Type const &config_reference)
Add instructions to write given container to given location.
void merge_back(PlaybackProgramBuilderAdapter &&other)
Merge other PlaybackProgramBuilderAdapter to the end of this builder instance.
void copy_back(BuilderStorage const &other)
Copy BuilderStorage to the end of this builder instance.
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.
hate::type_list<::stadls::vx::v2::Dumper > dumper_types
void copy_back(PlaybackProgramBuilderAdapter const &other)
Copy other PlaybackProgramBuilderAdapter to the end of this builder instance.
PlaybackProgramBuilderAdapter(PlaybackProgramBuilderAdapter &&other)
~PlaybackProgramBuilderAdapter()
void merge_back(PlaybackProgramBuilderAdapter &other)
Merge other PlaybackProgramBuilderAdapter to the end of this builder instance.
PlaybackProgramBuilderAdapter & operator=(PlaybackProgramBuilderAdapter &&other)
void merge_back(BuilderStorage &&other)
Merge BuilderStorage to the end of this builder instance.
PlaybackProgram::ContainerTicket< typename CoordinateToContainer< CoordinateType >::type > read(CoordinateType const &coord)
Add instructions to read container data from given location.
void merge_back(BuilderStorage &other)
Merge BuilderStorage to the end of this builder instance.
void write(typename Type::coordinate_type const &coord, Type const &config, Type const &config_reference, haldls::vx::Backend backend)
Add instructions to write given container to given location.
void block_until(halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA const &coord, haldls::vx::PollingOmnibusBlock sync)
void wait_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 write(typename Type::coordinate_type const &coord, Type const &config)
Add instructions to write given container to given location.
PlaybackProgram::ContainerTicket< typename CoordinateToContainer< CoordinateType >::type > read(CoordinateType const &coord, haldls::vx::Backend backend)
Add instructions to read container data from given location.
void block_until(halco::hicann_dls::vx::BarrierOnFPGA const &coord, haldls::vx::Barrier sync)
Add instruction to block execution until specified barrier is completed.
friend std::ostream & operator<<(std::ostream &os, PlaybackProgramBuilderAdapter< T, U, C > const &builder)
PlaybackProgramBuilderAdapter(PlaybackProgramBuilderAdapter const &)=delete
#define GENPYBIND_TAG_STADLS_VX
bool is_write_only() const
Get whether builder only stores write instructions.
class SYMBOL_VISIBLE stadls::vx::detail::PlaybackProgramBuilderAdapter empty() const
Get whether builder is empty, i.e.
size_t size_to_fpga() const
Get number of UT messages to FPGA.
struct stadls::vx::v2::DumperDone access
void serialize(Archive &ar, std::uint32_t)
stadls::vx::detail::Dumper< DumperDone > Dumper
detail::PlaybackProgramBuilderAdapter< fisch::vx::PlaybackProgramBuilder, PlaybackProgram, CoordinateToContainer > PlaybackProgramBuilder
hate::type_list<::stadls::vx::v2::Dumper > dumper_types
friend std::ostream & operator<<(std::ostream &os, PlaybackProgramBuilderAdapter< T, U, C > const &builder)
PlaybackProgramBuilderAdapter()
Construct builder.