STADLS
playback_program_builder.h File Reference
#include <iosfwd>
#include <memory>
#include <unordered_set>
#include "halco/hicann-dls/vx/barrier.h"
#include "haldls/vx/barrier.h"
#include "haldls/vx/common.h"
#include "hate/visibility.h"
#include "hxcomm/vx/target.h"
#include "stadls/vx/dumper.h"
#include "stadls/vx/genpybind.h"
#include "stadls/vx/playback_program.h"
+ Include dependency graph for playback_program_builder.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  stadls::vx::detail::PlaybackProgramBuilderAdapter< BuilderStorage, DoneType, CoordinateToContainer >
 Sequential PlaybackProgram builder. More...
 

Namespaces

 fisch
 
 fisch::vx
 
 stadls
 
 stadls::vx
 
 stadls::vx::detail
 

Typedefs

typedef BuilderStorage Builder
 
typedef hate::type_list<::stadls::vx::v2::Dumperdumper_types { std::stringstream ss
 

Functions

 ~PlaybackProgramBuilderAdapter ()
 
void block_until (halco::hicann_dls::vx::BarrierOnFPGA const &coord, haldls::vx::Barrier sync)
 Add instruction to block execution until specified barrier is completed. More...
 
void block_until (halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA const &coord, haldls::vx::PollingOmnibusBlock sync)
 
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. More...
 
void copy_back (BuilderStorage const &other)
 Copy BuilderStorage to the end of this builder instance. More...
 
void copy_back (PlaybackProgramBuilderAdapter const &other)
 Copy other PlaybackProgramBuilderAdapter to the end of this builder instance. More...
 
parent def ("__str__", [](GENPYBIND_PARENT_TYPE const &p) { std::stringstream ss;ss<< p;return ss.str();})
 
DoneType done ()
 Close PlaybackProgram build process and return executable program. More...
 
template<typename BuilderStorage , typename DoneType , template< typename > class CoordinateToContainer>
class SYMBOL_VISIBLE stadls::vx::detail::PlaybackProgramBuilderAdapter stadls::vx::detail::empty () const
 Get whether builder is empty, i.e. More...
 
constexpr if (hate::is_in_type_list< typename std::decay< decltype(p)>::type::Builder, dumper_types >::value)
 
bool stadls::vx::detail::is_write_only () const
 Get whether builder only stores write instructions. More...
 
void merge_back (BuilderStorage &&other)
 Merge BuilderStorage to the end of this builder instance. More...
 
void merge_back (BuilderStorage &other)
 Merge BuilderStorage to the end of this builder instance. More...
 
void merge_back (PlaybackProgramBuilderAdapter &&other)
 Merge other PlaybackProgramBuilderAdapter to the end of this builder instance. More...
 
void merge_back (PlaybackProgramBuilderAdapter &other)
 Merge other PlaybackProgramBuilderAdapter to the end of this builder instance. More...
 
template<typename T , typename U , template< typename > class C>
std::ostream & operator<< (std::ostream &os, PlaybackProgramBuilderAdapter< T, U, C > const &builder)
 
template<typename T , typename U , template< typename > class C>
std::ostream & stadls::vx::detail::operator<< (std::ostream &os, PlaybackProgramBuilderAdapter< T, U, C > const &builder) SYMBOL_VISIBLE
 
PlaybackProgramBuilderAdapteroperator= (PlaybackProgramBuilderAdapter &&other)
 
 PlaybackProgramBuilderAdapter ()
 Construct builder. More...
 
 PlaybackProgramBuilderAdapter (PlaybackProgramBuilderAdapter &&other)
 
 PlaybackProgramBuilderAdapter (PlaybackProgramBuilderAdapter const &)=delete
 
template<typename CoordinateType >
PlaybackProgram::ContainerTicket< typename CoordinateToContainer< CoordinateType >::type > read (CoordinateType const &coord)
 Add instructions to read container data from given location. More...
 
template<typename CoordinateType >
PlaybackProgram::ContainerTicket< typename CoordinateToContainer< CoordinateType >::type > read (CoordinateType const &coord, haldls::vx::Backend backend)
 Add instructions to read container data from given location. More...
 
size_t stadls::vx::detail::size_to_fpga () const
 Get number of UT messages to FPGA. More...
 
return ss str ()
 
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. More...
 
template<typename Type >
void write (typename Type::coordinate_type const &coord, Type const &config)
 Add instructions to write given container to given location. More...
 
template<typename Type >
void write (typename Type::coordinate_type const &coord, Type const &config, haldls::vx::Backend backend)
 Add instructions to write given container to given location. More...
 
template<typename Type >
void write (typename Type::coordinate_type const &coord, Type const &config, Type const &config_reference)
 Add instructions to write given container to given location. More...
 
template<typename Type >
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. More...
 

Variables

 else { ss << "PlaybackProgramBuilder(to FPGA size: " << p.size_to_fpga() << ", is write only: " << std::boolalpha << p.is_write_only() << ")"
 

Typedef Documentation

◆ Builder

typedef BuilderStorage Builder

Definition at line 9 of file playback_program_builder.h.

◆ dumper_types

typedef hate::type_list<::stadls::vx::v2::Dumper> dumper_types { std::stringstream ss

Definition at line 189 of file playback_program_builder.h.

Function Documentation

◆ ~PlaybackProgramBuilderAdapter()

empty::~PlaybackProgramBuilderAdapter ( )

◆ block_until() [1/3]

void empty::block_until ( halco::hicann_dls::vx::BarrierOnFPGA const &  coord,
haldls::vx::Barrier  sync 
)

Add instruction to block execution until specified barrier is completed.

Parameters
coordBarrier coordinate for which to block
syncBarrier value for which to block execution

◆ block_until() [2/3]

void empty::block_until ( halco::hicann_dls::vx::PollingOmnibusBlockOnFPGA const &  coord,
haldls::vx::PollingOmnibusBlock  sync 
)

◆ block_until() [3/3]

void empty::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.

Parameters
coordTimer coordinate for which to block
timeTimer value until which to block execution

◆ copy_back() [1/2]

void empty::copy_back ( BuilderStorage const &  other)

Copy BuilderStorage to the end of this builder instance.

The copied-from storage is untouched during the process.

Exceptions
std::runtime_errorOn other builder not being write only
Parameters
otherBuilderStorage to copy to this instance at the back

◆ copy_back() [2/2]

void empty::copy_back ( PlaybackProgramBuilderAdapter const &  other)

Copy other PlaybackProgramBuilderAdapter to the end of this builder instance.

The copied-from builder is untouched during the process.

Exceptions
std::runtime_errorOn other builder not being write only
Parameters
otherBuilder to copy to this instance at the back

◆ def()

parent empty::def ( "__str__"  ,
[] (GENPYBIND_PARENT_TYPE const &p) { std::stringstream ss;ss<< p;return ss.str();}   
)

◆ done()

DoneType empty::done ( )

Close PlaybackProgram build process and return executable program.

Returns
Executable PlaybackProgram

◆ if()

constexpr empty::if ( hate::is_in_type_list< typename std::decay< decltype(p)>::type::Builder, dumper_types >::value  )
constexpr

Definition at line 189 of file playback_program_builder.h.

◆ merge_back() [1/4]

void empty::merge_back ( BuilderStorage &&  other)

Merge BuilderStorage to the end of this builder instance.

The moved-from storage is emptied during the process.

Parameters
otherBuilderStorage to move to this instance at the back

◆ merge_back() [2/4]

void empty::merge_back ( BuilderStorage &  other)

Merge BuilderStorage to the end of this builder instance.

The moved-from storage is emptied during the process.

Parameters
otherBuilderStorage to move to this instance at the back

◆ merge_back() [3/4]

void empty::merge_back ( PlaybackProgramBuilderAdapter &&  other)

Merge other PlaybackProgramBuilderAdapter to the end of this builder instance.

The moved-from builder is emptied during the process.

Parameters
otherBuilder to move to this instance at the back

◆ merge_back() [4/4]

void empty::merge_back ( PlaybackProgramBuilderAdapter other)

Merge other PlaybackProgramBuilderAdapter to the end of this builder instance.

The moved-from builder is emptied during the process.

Parameters
otherBuilder to move to this instance at the back

◆ operator<<()

template<typename T , typename U , template< typename > class C>
friend std::ostream& empty::operator<< ( std::ostream &  os,
PlaybackProgramBuilderAdapter< T, U, C > const &  builder 
)

◆ operator=()

◆ PlaybackProgramBuilderAdapter() [1/3]

empty::PlaybackProgramBuilderAdapter ( )

Construct builder.

◆ PlaybackProgramBuilderAdapter() [2/3]

empty::PlaybackProgramBuilderAdapter ( PlaybackProgramBuilderAdapter &&  other)

◆ PlaybackProgramBuilderAdapter() [3/3]

empty::PlaybackProgramBuilderAdapter ( PlaybackProgramBuilderAdapter const &  )
delete

◆ read() [1/2]

template<typename CoordinateType >
PlaybackProgram::ContainerTicket<typename CoordinateToContainer<CoordinateType>::type> empty::read ( CoordinateType const &  coord)

Add instructions to read container data from given location.

The container's default backend is used.

Parameters
coordCoordinate value selecting location
Note
This function without backend parameter is needed due to python wrapping not being able to handle templated default arguments.

◆ read() [2/2]

template<typename CoordinateType >
PlaybackProgram::ContainerTicket<typename CoordinateToContainer<CoordinateType>::type> empty::read ( CoordinateType const &  coord,
haldls::vx::Backend  backend 
)

Add instructions to read container data from given location.

Parameters
coordCoordinate value selecting location
backendBackend selection

◆ str()

return ss empty::str ( )

◆ wait_until()

void empty::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.

Deprecated:
In favor of block_until
Parameters
coordTimer coordinate for which to wait
timeTimer value until which to block execution

◆ write() [1/4]

template<typename Type >
void empty::write ( typename Type::coordinate_type const &  coord,
Type const &  config 
)

Add instructions to write given container to given location.

The container's default backend is used.

Parameters
coordCoordinate value selecting location
configContainer configuration data
Note
This function without backend parameter is needed due to python wrapping not being able to handle templated default arguments.

◆ write() [2/4]

template<typename Type >
void empty::write ( typename Type::coordinate_type const &  coord,
Type const &  config,
haldls::vx::Backend  backend 
)

Add instructions to write given container to given location.

Parameters
coordCoordinate value selecting location
configContainer configuration data
backendBackend selection

◆ write() [3/4]

template<typename Type >
void empty::write ( typename Type::coordinate_type const &  coord,
Type const &  config,
Type const &  config_reference 
)

Add instructions to write given container to given location.

The container's default backend is used.

Parameters
coordCoordinate value selecting location
configContainer configuration data
config_referenceReference configuration for differential write
Note
This function without backend parameter is needed due to python wrapping not being able to handle templated default arguments.

◆ write() [4/4]

template<typename Type >
void empty::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.

Parameters
coordCoordinate value selecting location
configContainer configuration data
config_referenceReference configuration for differential write
backendBackend selection

Variable Documentation

◆ else

else { ss << "PlaybackProgramBuilder(to FPGA size: " << p.size_to_fpga() << ", is write only: " << std::boolalpha << p.is_write_only() << ")"

Definition at line 189 of file playback_program_builder.h.