API Reference: hxcomm
-
template<typename
ConnectionParameter
>
classhxcomm
::
ARQConnection
- #include <arqconnection.h>
HostARQ connection class.
Establish and hold HostARQ connection to FPGA. Provide convenience functions for sending and receiving UT messages.
- Template Parameters
ConnectionParameter – UT message parameter for connection
Public Types
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
receive_message_type
= typename message_types::receive_type
-
typedef std::vector<receive_message_type>
receive_queue_type
-
using
send_halt_message_type
= typename message_types::send_halt_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
ARQConnection
() Create connection to FPGA with IP address found in environment.
- Throws
std::runtime_error – On no or more than one FPGA IP address available in environment
-
ARQConnection
(ARQConnection &&other) Move constructor.
-
ARQConnection
(ARQConnection const&) = delete Copy constructor (deleted because no two instances with the same hardware allocation can coexist).
-
~ARQConnection
() Destruct connection to FPGA joining all receive threads.
-
std::string
get_remote_repo_state
() const Get server-side remote repository state information.
Only non-empty for QuiggeldyConnection.
- Returns
Repository state
-
ConnectionTimeInfo
get_time_info
() const Get time information.
- Returns
Time information
-
std::string
get_unique_identifier
(std::optional<std::string> hwdb_path = std::nullopt) const Get unique identifier from hwdb.
- Parameters
hwdb_path – Optional path to hwdb
- Returns
Unique identifier
-
ARQConnection &
operator=
(ARQConnection &&other) Assignment operator.
-
ARQConnection &
operator=
(ARQConnection const&) = delete Assignment operator (deleted because no two instances with the same hardware allocation can coexist).
Public Static Attributes
-
static constexpr char
name
[] = "ARQConnection"
Private Types
-
typedef sctrltp::ARQStream<sctrltp::ParametersFcpBss2Cube>
arq_stream_type
-
typedef Decoder<typename ConnectionParameter::Receive, receive_queue_type, listener_halt_type>
decoder_type
-
typedef Encoder<typename ConnectionParameter::Send, send_queue_type>
encoder_type
-
typedef ListenerHalt<UTMessage<ConnectionParameter::Receive::HeaderAlignment, typename ConnectionParameter::Receive::SubwordType, typename ConnectionParameter::Receive::PhywordType, typename ConnectionParameter::Receive::Dictionary, typename ConnectionParameter::ReceiveHalt>>
listener_halt_type
-
typedef ConnectionRegistry<ARQConnection>
Registry
Registry of open ARQConnections.
-
typedef SendQueue
send_queue_type
-
typedef sctrltp::packet<sctrltp::ParametersFcpBss2Cube>::entry_t
subpacket_type
Private Functions
-
template<typename
InputIterator
>
voidadd
(InputIterator const &begin, InputIterator const &end) Add multiple UT messages to the send queue.
Messages may be sent to the hardware as part of this call if the send queue is full.
- Template Parameters
InputIterator – Iterator type to sequence of messages to add
- Parameters
begin – Iterator to beginning of sequence
end – Iterator to end of sequence
-
void
add
(send_message_type const &message) Add a single UT message to the send queue.
Messages may be sent to the hardware as part of this call if the send queue is full.
- Parameters
message – Message to add
-
void
check_compatibility
() const Check for bitfile version compatibility.
-
void
commit
() Send messages in send queue.
All messages in the send queue are guaranteed to be transfered.
-
std::mutex &
get_mutex
() Get internal mutex to use for mutual exclusion.
- Returns
Mutable reference to mutex
-
receive_queue_type
receive_all
() Receive all UT messages currently in the receive queue.
- Returns
Received messages
-
bool
receive_empty
() const Get whether the connection has no UT messages available to receive.
- Returns
Boolean value
-
void
run_until_halt
() Start execution and wait until halt instruction is received from FPGA.
-
void
work_receive
()
Private Members
-
std::unique_ptr<arq_stream_type>
m_arq_stream
-
duration_type
m_commit_duration
= {}
-
duration_type
m_decode_duration
= {}
-
decoder_type
m_decoder
-
duration_type
m_encode_duration
= {}
-
encoder_type
m_encoder
-
duration_type
m_execution_duration
= {}
-
listener_halt_type
m_listener_halt
-
receive_queue_type
m_receive_queue
-
send_queue_type
m_send_queue
-
friend Stream< ARQConnection >
Private Static Attributes
-
static constexpr size_t
newest_supported_compatible_until
= bss_hw_params::cube_ethernet::bitfile_compatible_until
-
static constexpr size_t
oldest_supported_version
= 0 Numbers to compare against bitfile protocol version.
There are 5 scenarios (newer covers new changes as well as outdated partners) 1: Software is newer than biftile and still compatible 2: Software is newer than biftile but incompatible 3: FPGA bitfile is newer than software and still compatible 4: FPGA bitfile is newer than software but incompatible 5: Both are head
The FPGA returns two numbers
version: Integer automatically incrementing with each change to the bitfile
compatible_until: Integer manually incrementing when bitfile introduces breaking feature
We can now cover all 5 cases by comparing these two numbers as follows
oldest_supported_version: manually set to last known bitfile version with breaking change
newest_supported_compatible_until: identical to current head bitfile compatible_until
oldest_supported_version needs to be lesser or equal to version and newest_supported_compatible_until needs to be greater or equal to compatible_until Cases 1, 3 and 5 fulfill these conditions whereas 2 and 4 do not
-
static constexpr uint16_t
pid
= 0x0010
-
struct
hxcomm::ARQConnection
::
SendQueue
-
template<typename
Connection
>
structhxcomm
::
ConnectionConcept
- #include <connection.h>
Base concept for all connections (ARQ, CoSim, QuiggeldyConnection, …).
Public Static Attributes
-
template<typename
C
>
static constexpr boolhas_receive_message_type_v
= has_receive_message_type<C>::value
-
template<typename
C
>
static constexpr boolhas_send_halt_message_type_v
= has_send_halt_message_type<C>::value
-
template<typename
-
template<typename
C
, typename = void>
structhas_get_time_info
: public std::false_type - #include <connection.h>
-
template<typename
C
>
structhxcomm::ConnectionConcept
::
has_get_time_info
<C, std::void_t<decltype(&C::get_time_info)>> - #include <connection.h>
Public Static Attributes
-
static constexpr bool
value
= std::is_same_v<decltype(&C::get_time_info), ConnectionTimeInfo (C::*)() const>
-
static constexpr bool
-
template<typename
C
, typename = void>
structhas_receive_message_type
: public std::false_type - #include <connection.h>
-
template<typename
C
>
structhas_receive_message_type
<C, std::void_t<typename C::receive_message_type>> : public std::true_type - #include <connection.h>
-
template<typename
C
, typename = void>
structhas_send_halt_message_type
: public std::false_type - #include <connection.h>
-
template<typename
C
>
structhas_send_halt_message_type
<C, std::void_t<typename C::send_halt_message_type>> : public std::true_type - #include <connection.h>
-
template<typename
C
, typename = void>
structhas_send_message_type
: public std::false_type - #include <connection.h>
-
template<typename
C
>
structhas_send_message_type
<C, std::void_t<typename C::send_message_type>> : public std::true_type - #include <connection.h>
-
template<typename
C
, typename = void>
structhas_supported_targets
: public std::false_type - #include <connection.h>
-
template<typename
C
>
structhxcomm::ConnectionConcept
::
has_supported_targets
<C, std::void_t<decltype(C::supported_targets)>> - #include <connection.h>
-
template<typename
Connection
>
structConnectionIsPlain
: public std::true_type - #include <visit_connection.h>
Helper struct that is used to differentiate between plain connections and connections wrapped up in second order types (e.g.
variant, Handles).
Used in
stadls::run
andConnectionIs{Plain,Wrapped}Guard
below.
- #include <visit_connection.h>
-
template<typename ...
Connections
>
structConnectionIsPlain
<std::variant<Connections...>> : public std::false_type - #include <visit_connection.h>
-
template<size_t
SendHeaderAlignment
, typenameSendSubwordType
, typenameSendPhywordType
, typenameSendDictionary
, typenameSendHaltInstructionType
, size_tReceiveHeaderAlignment
, typenameReceiveSubwordType
, typenameReceivePhywordType
, typenameReceiveDictionary
, typenameReceiveHaltInstructionType
, typenameReceiveTimeoutInstructionType
, typenameQuiggeldyScheduleOutToInTransformType
>
structhxcomm
::
ConnectionParameter
- #include <connection_parameter.h>
Set of template parameters of a connection with different UTMessage sets for sending and receiving direction.
- Template Parameters
SendHeaderAlignment – Alignment of header of send UTMessage set
SendSubwordType – Type of subword of send UTMessage set
SendPhywordType – Type of PHY-word of send UTMessage set
SendDictionary – Dictionary of instructions of sent UTMessages
SendHaltInstructionType – Instruction type of Halt message in sent diciontary
ReceiveHeaderAlignment – Alignment of header of receive UTMessage set
ReceiveSubwordType – Type of subword of receive UTMessage set
ReceivePhywordType – Type of PHY-word of receive UTMessage set
ReceiveDictionary – Dictionary of instructions of received UTMessages
ReceiveHaltInstructionType – Instruction type of Halt message in receive dictionary
QuiggeldyScheduleOutToInTransformType – Functor to transform a schedule-out result to schedule-in instructions in quiggeldy
Public Types
-
typedef QuiggeldyScheduleOutToInTransformType
QuiggeldyScheduleOutToInTransform
-
typedef UTMessageParameter<ReceiveHeaderAlignment, ReceiveSubwordType, ReceivePhywordType, ReceiveDictionary>
Receive
-
typedef ReceiveHaltInstructionType
ReceiveHalt
-
typedef ReceiveTimeoutInstructionType
ReceiveTimeout
-
typedef UTMessageParameter<SendHeaderAlignment, SendSubwordType, SendPhywordType, SendDictionary>
Send
-
typedef SendHaltInstructionType
SendHalt
-
template<typename
Connection
>
structhxcomm
::
ConnectionRegistry
- #include <connection_registry.h>
Registry of open connections.
- Template Parameters
Connection – Connection type of registry
Public Types
-
typedef Connection::init_parameters_type
Parameters
Public Members
-
Parameters
m_parameters
Public Static Functions
-
static std::set<Parameters> &
registry
()
-
struct
hxcomm
::
ConnectionTimeInfo
- #include <connection_time_info.h>
Time information of a connection’s history of usage.
Public Functions
-
bool
operator!=
(ConnectionTimeInfo const &other) const
-
ConnectionTimeInfo
operator+
(ConnectionTimeInfo const &other) const
-
ConnectionTimeInfo &
operator+=
(ConnectionTimeInfo const &other)
-
ConnectionTimeInfo
operator-
(ConnectionTimeInfo const &other) const
-
ConnectionTimeInfo &
operator-=
(ConnectionTimeInfo const &other)
-
bool
operator==
(ConnectionTimeInfo const &other) const
Public Members
-
std::chrono::nanoseconds
commit_duration
= {} Time spent sending streams of words to backend since construction.
-
std::chrono::nanoseconds
decode_duration
= {} Time spent decoding UT messages from a stream of words since construction.
Friends
-
friend std::ostream &
operator<<
(std::ostream &os, ConnectionTimeInfo const &data)
-
bool
-
template<typename
UTMessageParameter
, typenameMessageQueueType
, typename ...Listener
>
classhxcomm
::
Decoder
- #include <decoder.h>
Decoder sequentially decoding a stream of words into a UT message queue.
The queue is expected to provide a push function.
- Template Parameters
UTMessageParameter – UT message parameter
MessageQueueType – Queue type used for storing decoded UT messages in
Listener – An arbitrary number of message listeners to be invoked for each decoded message using their operator()
Public Types
-
typedef MessageQueueType
message_queue_type
-
typedef ToUTMessageVariant<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::type
receive_message_type
-
typedef UTMessageParameter::PhywordType
word_type
Public Functions
-
Decoder
(Decoder &other, message_queue_type &message_queue, Listener&... listener) Initialize decoder with a reference to a message queue to push decoded messages to, references to message listeners to invoke on decoded messages and a reference decoder from which to take existing state.
- Parameters
other – Reference decoder
message_queue – Reference to message queue
listener – List of references to message listeners
-
Decoder
(message_queue_type &message_queue, Listener&... listener) Initialize decoder with a reference to a message queue to push decoded messages to and references to message listeners to invoke on decoded messages.
- Parameters
message_queue – Reference to message queue
listener – List of references to message listeners
-
template<typename
InputIterator
>
voidoperator()
(InputIterator const &begin, InputIterator const &end) Decode a ensemble of words from an iterable.
During the process multiple messages might be decoded and pushed to the message queue. The iterable has to define a cbegin and cend function for iteration.
- Template Parameters
InputIterator – Iterator to word sequence
- Parameters
begin – Iterator to beginning of word sequence
end – Iterator to end of word sequence
Private Types
-
typedef hate::bitset<buffer_size, word_type>
buffer_type
Private Functions
-
size_t
decode_header
() const Decode UT message header.
- Returns
Header
-
template<size_t
Header
>
voiddecode_message
()
-
void
decode_message
(size_t header) Decode UT message corresponding to header from buffer and push into message queue.
- Parameters
header – Header to decode UT message for
-
template<size_t...
Header
>
voiddecode_message_table_generator
(size_t header, std::index_sequence<Header...>)
-
constexpr size_t
get_message_size
(size_t header) Get UT message size for specified header.
- Parameters
header – Header to lookup UT message size for
Private Members
-
buffer_type
m_buffer
-
size_t
m_buffer_filling_level
-
size_t
m_current_header
-
size_t
m_current_message_size
-
message_queue_type &
m_message_queue
Private Static Functions
Private Static Attributes
-
static constexpr size_t
buffer_size
= hate::math::round_up_to_multiple(LargestUTMessageSize<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::value, num_bits_word) + num_bits_word
-
static constexpr size_t
header_size
= UTMessageHeaderWidth<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::Dictionary>::value
-
template<typename...>
structall_char_const_ptr
Check whether are not all supplied types can be converted to
char const*
;.
-
template<typename
Connection
>
structhxcomm::detail
::
ExecuteMessagesArgumentType
- #include <execute_messages_types.h>
Public Types
-
using
type
= std::vector<typename GetMessageTypes<std::remove_cvref_t<Connection>>::type::send_type>
-
using
-
template<typename
Connection
>
structhxcomm::detail
::
ExecuteMessagesReturnType
- #include <execute_messages_types.h>
Public Types
-
using
type
= std::pair<std::vector<typename GetMessageTypes<std::remove_cvref_t<Connection>>::type::receive_type>, ConnectionTimeInfo>
-
using
-
template<typename
Connection
>
structhxcomm::detail
::
ExecutorMessages
- #include <execute_messages.h>
Helper for partial specialization over templated connection-types.
operator()-contains the implementation of execute_messages defined below.
TODO: Validate interface via concepts once gcc 10 is ready.
Public Types
-
using
connection_type
= Connection
-
using
messages_type
= execute_messages_argument_t<Connection>
-
using
receive_message_type
= typename connection_type::receive_message_type
-
using
response_type
= typename return_type::first_type
-
using
return_type
= execute_messages_return_t<Connection>
-
using
send_halt_message_type
= typename connection_type::send_halt_message_type
-
using
send_message_type
= typename connection_type::send_message_type
Public Functions
-
inline return_type
operator()
(connection_type &conn, messages_type const &messages, bool const keep_responses)
-
using
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typenameDictionary
, typenameInstruction
>
structIsUTMessage
<UTMessage<HeaderAlignment, SubwordType, PhywordType, Dictionary, Instruction>> : public std::true_type - #include <encoder.h>
-
template<typename
ConnectionParameter
>
structhxcomm::detail
::
ReinitEntryType
- #include <quiggeldy_interface_types.h>
Public Types
-
using
request_type
= detail::execute_messages_argument_t<ConnectionParameter>
-
typedef ConnectionParameter::QuiggeldyScheduleOutToInTransform
transform_type
Public Members
-
bool
reinit_pending
= true
-
request_type
request
-
std::optional<request_type>
snapshot
-
using
-
template<typename
Connection
, typename = void>
structsupports_full_stream_interface
: public std::true_type - #include <stream.h>
-
template<typename
ConnectionParameter
, typenameRcfClient
>
structsupports_full_stream_interface
<QuiggeldyConnection<ConnectionParameter, RcfClient>> : public std::false_type - #include <quiggeldy_connection.h>
-
template<typename
T
>
structvariant_to_ref
- #include <reinit_stack_entry.h>
-
template<typename ...
T
>
structhxcomm::detail
::
variant_to_ref
<std::variant<T...>> - #include <reinit_stack_entry.h>
-
template<typename
Visitor
, typenameConnection
>
structhxcomm::detail
::
VisitConnection
- #include <visit_connection.h>
Public Types
-
using
return_type
= decltype(std::declval<Visitor>()(std::declval<Connection>()))
Public Functions
-
inline return_type
operator()
(Visitor &&visitor, Connection &&connection)
-
using
- #include <visit_connection.h>
Public Types
Public Functions
-
template<typename
Visitor
, typename ...Connections
>
structhxcomm::detail
::
VisitConnection
<Visitor, std::variant<Connections...>&> - #include <visit_connection.h>
Public Types
-
using
return_type
= typename std::common_type<typename VisitConnection<Visitor, Connections&>::return_type...>::type
-
using
variant_type
= std::variant<Connections...>
Public Functions
-
inline return_type
operator()
(Visitor &&visitor, variant_type &variant)
-
using
-
template<typename
Visitor
, typename ...Connections
>
structhxcomm::detail
::
VisitConnection
<Visitor, std::variant<Connections...> const&> - #include <visit_connection.h>
Public Types
-
using
return_type
= typename std::common_type<typename VisitConnection<Visitor, Connections&>::return_type...>::type
-
using
variant_type
= std::variant<Connections...> const
Public Functions
-
inline return_type
operator()
(Visitor &&visitor, variant_type &variant)
-
using
-
template<typename
ConnectionParameter
>
structZeroMockProcessMessage
Process message implementation used in ZeroMockConnection.
A specialization is necessary for each connection parameter set.
- Template Parameters
ConnectionParameter – Connection parameter for which to process messages
-
template<>
structhxcomm::detail
::
ZeroMockProcessMessage
<hxcomm::vx::ConnectionParameter> - #include <zeromockconnection.h>
Public Types
-
using
message_types
= MessageTypes<hxcomm::vx::ConnectionParameter>
-
using
receive_message_type
= typename message_types::receive_type
-
typedef std::vector<receive_message_type>
receive_queue_type
-
using
send_halt_message_type
= typename message_types::send_halt_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
ZeroMockProcessMessage
(receive_queue_type &receive_queue, bool &halt)
-
void
operator()
(send_message_type const &message)
-
using
-
template<typename
UTMessageParameter
, typenameWordQueueType
>
classhxcomm
::
Encoder
- #include <encoder.h>
Encoder sequentially encoding UT messages to a word queue.
The queue is expected to provide a push function for single words.
- Template Parameters
UTMessageParameter – UT message parameter
WordQueueType – Queue type to push words to
Public Types
-
typedef ToUTMessageVariant<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::type
send_message_type
-
typedef WordQueueType
word_queue_type
-
typedef UTMessageParameter::PhywordType
word_type
Public Functions
-
Encoder
(Encoder &other, word_queue_type &word_queue) Initialize encoder with a reference to a word queue to push encoded words to and a reference encoder from which to take existing buffer state.
- Parameters
word_queue – Reference to word queue
other – Reference encoder
-
Encoder
(word_queue_type &word_queue) Initialize encoder with a reference to a word queue to push encoded words to.
- Parameters
word_queue – Reference to word queue
-
void
flush
() Flush the possibly partially filled head-word of the buffer to the queue.
Appends a comma to the word before pushing.
-
template<typename
InputIterator
>
voidoperator()
(InputIterator const &begin, InputIterator const &end) Encode multiple messages.
During the process multiple words might be produced and pushed to the word queue. The implementation requires messages to have a cbegin and cend function for iteration. The containers’ entries are to be message variants.
- Template Parameters
InputIterator – Iterator to UTMessage variant sequence
- Parameters
begin – Iterator to beginning of message sequence
end – Iterator to end of message sequence
-
template<typename
MessageType
>
std::enable_if<detail::IsUTMessage<MessageType>::value, void>::typeoperator()
(MessageType const &message) Encode a message.
During the process multiple words might be produced and pushed to the word queue.
- Template Parameters
MessageType – Type of message to encode
- Parameters
message – Message to encode
Private Types
-
typedef hate::bitset<buffer_size, word_type>
buffer_type
Private Static Attributes
-
static constexpr size_t
buffer_size
= hate::math::round_up_to_multiple(LargestUTMessageSize<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::value, num_bits_word) + num_bits_word
-
template<typename
C
, typename = void>
structhxcomm
::
GetMessageTypes
- #include <connection.h>
Helper function to get MessageTypes from a Connection or a variant etc over the same Connection in a streamlined fashion.
If C is a ConnectionParameter instance, the corresponding MessageTypes will be returned.
Public Types
-
using
type
= MessageTypes<std::decay_t<C>>
-
using
-
template<typename
C
>
structhxcomm
::
GetMessageTypes
<C, std::void_t<typename C::message_types>> - #include <connection.h>
- #include <connection.h>
Public Types
-
template<typename ...
Cs
>
structhxcomm
::
GetMessageTypes
<std::variant<Cs...>> - #include <connection.h>
-
template<typename
Tag
, size_tN
>
classhxcomm::instruction::detail::payload
::
Bitset
: public hate::bitset<N> - #include <payload.h>
Payload for bitset data.
- Template Parameters
Tag – Type of tag class
N – Number of bits of payload
Public Functions
-
template<typename ...
Args
>
inline explicit constexprBitset
(Args... args) Construct a bitset payload.
- Template Parameters
Args – Argument types to construct from
- Parameters
args – Agruments to construct from
-
template<typename
Tag
, typenameT
>
classhxcomm::instruction::detail::payload
::
Number
- #include <payload.h>
Payload for number-type data.
- Template Parameters
Tag – Type of tag class
N – Number of bits of payload
T – underlying number type
Public Functions
-
inline explicit constexpr
Number
(T const value = 0) Construct a Number payload.
- Parameters
value – Value to construct from
-
template<typename
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data) Decode from a bitset of size N.
- Template Parameters
SubwordType – Word type used in bitset representation
- Parameters
data – Bitset data to decode
-
template<typename
SubwordType
= unsigned long>
inline constexpr hate::bitset<size, SubwordType>encode
() const Encode into a bitset of size N.
- Template Parameters
SubwordType – Word type used in bitset representation
- Returns
Payload encoded as bitset
-
inline
operator T
() const
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typenameDictionary
>
structLargestUTMessageSize
Get the largest UT message size in bits for a given set of UT message parameters.
- Template Parameters
HeaderAlignment – Alignment of header in bits
SubwordType – Type of subword which’s width corresponds to the messages alignment
PhywordType – Type of PHY-word which’s width corresponds to the message’s minimal width
Dictionary – Dictionary of instructions
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typename ...Is
>
structhxcomm
::
LargestUTMessageSize
<HeaderAlignment, SubwordType, PhywordType, hate::type_list<Is...>> - #include <largest_utmessage_size.h>
Public Static Attributes
-
static constexpr size_t
value
= std::max({UTMessage<HeaderAlignment, SubwordType, PhywordType, hate::type_list<Is...>, Is>::word_width...})
-
static constexpr size_t
-
template<typename
HaltMessageType
>
classhxcomm
::
ListenerHalt
- #include <listener_halt.h>
Listener registering occurence of a halt instruction.
Filtering is done at compile-time for the halt message type and at runtime for the payload comparing with the
halt
member of the messages instruction type.- Template Parameters
HaltMessageType – Message type of Halt instruction
Public Functions
-
inline
ListenerHalt
() Construct Halt listener.
-
inline bool
get
() const Get whether the listener registered a Halt message.
-
template<typename
MessageType
>
inline voidoperator()
(MessageType const &message) Operator invoked for every decoded message checking whether the message contains a Halt.
- Template Parameters
MessageType – Type of UT message to check
- Parameters
message – UT message instance to check
-
inline void
reset
() Reset listener state to not having registered a Halt message.
-
template<typename
UTMessageParameter
>
classhxcomm
::
LoopbackConnection
- #include <loopbackconnection.h>
Loopback connection class.
Committed packets are added to a intermediate packet queue in software without alteration. Every committed message can be received in order. The send and receive dictionary are therefore the same.
- Template Parameters
UTMessageParameter – UT message parameter
Public Types
-
typedef UTMessageParameter::Dictionary
dictionary_type
-
typedef UTMessageParameter::PhywordType
phyword_type
-
typedef send_message_type
receive_message_type
-
typedef std::vector<receive_message_type>
receive_queue_type
-
typedef ToUTMessageVariant<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::type
send_message_type
-
typedef phyword_type
subpacket_type
-
typedef UTMessageParameter::SubwordType
subword_type
-
typedef UTMessageParameter
ut_message_parameter_type
Public Functions
-
LoopbackConnection
() Default construct loopback connection.
-
~LoopbackConnection
() Destruct loopback connection joining all receive threads.
-
template<typename
InputIterator
>
voidadd
(InputIterator const &begin, InputIterator const &end) Add multiple UT messages to the send queue.
- Template Parameters
InputIterator – Iterator type to sequence of messages to add
- Parameters
begin – Iterator to beginning of sequence
end – Iterator to end of sequence
-
void
add
(send_message_type const &message) Add a single UT message to the send queue.
- Parameters
message – Message to add
-
void
commit
() Send messages in send queue by moving to the intermediate queue.
-
receive_queue_type
receive_all
() Receive all UT messages currently in the receive queue.
- Returns
Received messages
-
bool
receive_empty
() const Get whether the connection has no UT messages available to receive.
- Returns
Boolean value
Public Static Attributes
-
static constexpr size_t
header_alignment
= UTMessageParameter::HeaderAlignment
Private Types
-
typedef std::queue<subpacket_type>
send_queue_type
Private Functions
-
void
work_receive
()
Private Members
-
Decoder<UTMessageParameter, receive_queue_type>
m_decoder
-
Encoder<UTMessageParameter, send_queue_type>
m_encoder
-
std::deque<subpacket_type>
m_intermediate_queue
-
receive_queue_type
m_receive_queue
-
send_queue_type
m_send_queue
-
template<typename
ConnectionParameter
>
structhxcomm
::
MessageTypes
- #include <connection.h>
Helper struct that defines message types from ConnectionParameters.
- Template Parameters
ConnectionParameter – UT message parameter for connection
Public Types
-
using
connection_parameter_type
= ConnectionParameter
-
typedef hxcomm::ToUTMessageVariant<ConnectionParameter::Receive::HeaderAlignment, typenameConnectionParameter::Receive::SubwordType, typenameConnectionParameter::Receive::PhywordType, typenameConnectionParameter::Receive::Dictionary>::type
receive_type
-
typedef hxcomm::UTMessage<ConnectionParameter::Send::HeaderAlignment, typename ConnectionParameter::Send::SubwordType, typename ConnectionParameter::Send::PhywordType, typename ConnectionParameter::Send::Dictionary, typename ConnectionParameter::SendHalt>
send_halt_type
-
typedef hxcomm::ToUTMessageVariant<ConnectionParameter::Send::HeaderAlignment, typenameConnectionParameter::Send::SubwordType, typenameConnectionParameter::Send::PhywordType, typenameConnectionParameter::Send::Dictionary>::type
send_type
-
template<typename
ConnectionParameter
>
structhxcomm
::
quiggeldy_interface_types
- #include <quiggeldy_interface_types.h>
Subclassed by hxcomm::quiggeldy_interface_types< MessageTypes< ConnectionParameter > >
Public Types
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
reinit_entry_type
= detail::ReinitEntryType<ConnectionParameter>
-
using
reinit_type
= std::vector<reinit_entry_type>
-
using
request_type
= detail::execute_messages_argument_t<ConnectionParameter>
-
using
response_type
= detail::execute_messages_return_t<ConnectionParameter>
-
using
-
template<typename
ConnectionParameter
>
structhxcomm
::
quiggeldy_interface_types
<MessageTypes<ConnectionParameter>> : public hxcomm::quiggeldy_interface_types<ConnectionParameter> - #include <quiggeldy_interface_types.h>
Public Types
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
reinit_entry_type
= detail::ReinitEntryType<ConnectionParameter>
-
using
reinit_type
= std::vector<reinit_entry_type>
-
using
request_type
= detail::execute_messages_argument_t<ConnectionParameter>
-
using
response_type
= detail::execute_messages_return_t<ConnectionParameter>
-
using
-
template<typename
ConnectionParameter
, typenameRcfClient
>
classhxcomm
::
QuiggeldyConnection
- #include <quiggeldy_connection.h>
QuiggeldyConnection class.
Establish and hold connection to a remote quiggeldy instance that itself proxies another connection.
- Template Parameters
ConnectionParameter – UT message parameter for connection
RcfClient – RCF-based client that is needed to connect to quiggeldy instance.
Public Types
-
using
future_type
= QuiggeldyFuture<typename interface_types::response_type, rcf_client_type>
-
using
interface_types
= quiggeldy_interface_types<ConnectionParameter>
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
receive_message_type
= typename message_types::receive_type
-
using
reinit_stack_type
= ReinitStack<ConnectionParameter>
-
using
reinit_uploader_type
= rcf_extensions::OnDemandUpload<rcf_client_type, typename interface_types::reinit_type>
-
using
send_halt_message_type
= typename message_types::send_halt_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
QuiggeldyConnection
() Connects to server while getting IP and port from environment.
-
QuiggeldyConnection
(connect_parameters_type const ¶ms) Connect via tuple of ip/port.
-
QuiggeldyConnection
(QuiggeldyConnection&&) Move constructor.
-
QuiggeldyConnection
(QuiggeldyConnection const&) = delete No copies allowed.
-
QuiggeldyConnection
(std::string ip, uint16_t port) Connects to server with explicit ip/port.
- Parameters
ip – Target ip address.
port – Target port.
-
~QuiggeldyConnection
() Destruct connection to FPGA joining all receive threads.
-
std::chrono::milliseconds
get_connection_attempt_wait_after
() const Get wait duration after every connection attempt number of connection attempts.
- Returns
Wait duration after every connection attempt.
-
size_t
get_connection_attempts_max
() const Get maximum number of connection attempts.
- Returns
Number of connection attempts.
-
std::optional<std::string>
get_custom_username
() Get custom username to use remotely, if defined.
- Returns
Custom username if defined. Otherwise: nullopt.
-
std::string
get_remote_repo_state
() const Get quiggeldy server repository state info.
- Returns
Repository state info
-
ConnectionTimeInfo
get_time_info
() const Get time information.
- Returns
Time information
-
std::string
get_unique_identifier
(std::optional<std::string> hwdb_path = std::nullopt) const Get unique identifier from hwdb.
- Parameters
hwdb_path – Optional path to hwdb
- Returns
Unique identifier
-
bool
get_use_munge
() const Get whether or not to encode user information using munge.
This is needed if the remote side is also using munge (i.e., regular operations), but should be disabled in testing environments running without munge.
This option has no effect if fisch was compiled with
--without-munge
.- Returns
Whether munge should be used (true) or not (false).
-
std::string
get_version_string
() const Get compile time version information in human-readable form from server side.
- Returns
Human-readable form of version information.
-
bool
is_out_of_order
() const Return whether this instance submits packages out-of-order, i.e., if submitted asynchronous requests could be executed out of order.
Note: In case of out-of-order execution, single submitted work packages should correspond to a full program.
-
QuiggeldyConnection &
operator=
(QuiggeldyConnection&&) Assignment operator.
-
QuiggeldyConnection &
operator=
(QuiggeldyConnection const&) = delete No copies allowed.
-
void
set_connection_attempt_wait_after
(std::chrono::milliseconds ms) Set wait duration after every connection attempt number of connection attempts.
- Parameters
ms – Wait duration after every connection attempt.
-
void
set_connection_attempts_max
(size_t num) Set maximum number of connection attempts.
- Parameters
num – Number of connection attempts.
-
void
set_custom_username
(std::string custom_user) Set custom username.
Please note that this setting will only be used if munge authentication is disabled.
- Parameters
custom_user – Custom username to use.
-
void
set_out_of_order
() Set the QuiggeldyConnection to set out-of-order work units.
This can speed up execution times if each playback-program does not depend on other playback programs. Plus, it might make learning more robust.
-
void
set_use_munge
(bool value) Set whether or not to encode user information using munge.
This is needed if the remote side is also using munge (i.e., regular operations), but should be disabled in testing environments running without munge.
This option has no effect if compiling with
--without-munge
.- Parameters
value – If munge should be used (true) or not (false).
Public Static Attributes
-
static constexpr char
name
[] = {"QuiggeldyConnection"}
-
static constexpr std::chrono::hours
program_runtime_max
= std::chrono::hours(24 * 30) When running experiments over quiggeldy - if running blocking - RCF needs to keep the connection open for as long as an experiment could theoretically be running.
For now just set it to one month. If needed, this should be set to a more reasonable constant in the future.
Protected Functions
-
void
accumulate_time_info
(ConnectionTimeInfo const &delta)
-
f_create_client_shared_ptr_t
get_create_client_function
() Return function that creates RCF clients with this connection’s info.
-
std::weak_ptr<reinit_stack_type>
get_reinit_stack
() const Get a reference to the reinit stack.
This is only used by ReinitStackEntry to support nested reinit programs and is not really useful otherwise.
-
std::weak_ptr<reinit_uploader_type>
get_reinit_upload
() const Get a reference to the uploader instance so that a possible reinit program can be registered elsewhere.
-
rcf_extensions::SequenceNumber
next_sequence_number
() Get next sequence number for a new request.
-
void
reinit_enforce
() Enforce reinit program to be used on the remote site prior to executing result-producing FPGA word streams.
-
template<typename
Function
, typename ...Args
>
autoretrying_client_invoke
(bool with_user_data, Function &&function, Args&&... args)
-
template<typename
Function
, typename ...Args
>
autoretrying_client_invoke
(bool with_user_data, Function &&function, Args&&... args) const
-
void
set_user_data
(std::unique_ptr<rcf_client_type>&) const Prepare user data in connection to authenticate request on the server side.
Called by setup_client().
Sets up potential munge authentication.
-
std::unique_ptr<rcf_client_type>
setup_client
(bool with_user_data = true) const Set up the RCF-client, i.e., establish a connection to the server.
Takes its parameters from
m_connect_parameters
.- Parameters
with_user_data – whether or not to set user data in connection (for work submission user data needs to be set).
-
future_type
submit_async
(typename interface_types::request_type const &req) Send the given request to the server and block until response is ready.
- Parameters
req – Request which is sent to the server.
- Returns
Response containing FPGA words from the connection.
-
interface_types::response_type
submit_blocking
(typename interface_types::request_type const &req) Send the given request to the server and block until response is ready.
This function is reentrant.
- Parameters
req – Request which is sent to the server.
- Returns
Response containing FPGA words from the connection.
Protected Attributes
-
connect_parameters_type
m_connect_parameters
-
size_t
m_connection_attempt_num_max
-
RCF::RcfInit
m_rcf
-
std::shared_ptr<reinit_stack_type>
m_reinit_stack
-
std::shared_ptr<reinit_uploader_type>
m_reinit_uploader
-
rcf_extensions::SequenceNumber
m_sequence_num
-
ConnectionTimeInfo
m_time_info
-
bool
m_use_munge
-
friend StreamRC< QuiggeldyConnection >
Protected Static Functions
-
static connect_parameters_type
get_connect_params_from_env
()
-
template<typename
ReturnValue
, typenameRcfClient
>
classhxcomm
::
QuiggeldyFuture
- #include <quiggeldy_future.h>
Wrapper class that holds an async-response as well as the corresponding RCF-client because each RCF-client only supports one concurrent asynchronous call.
If forwards needed portions of the RCF::Future-API.
Public Types
-
using
rcf_future_type
= RCF::Future<ReturnValue>
-
using
return_value_type
= ReturnValue
Public Functions
-
inline
QuiggeldyFuture
(std::unique_ptr<rcf_client_type> client, std::unique_ptr<rcf_future_type> future) Construct QuiggeldyFuture.
- Parameters
client – Client used to create future.
future – RCF::Future value to be wrapped.
-
inline void
cancel
() Cancel the future and clear this instance.
-
inline return_value_type
operator*
() Access the computed value, blocking until the value is ready.
If QuiggeldyFuture was
cancel()
-ed, will throw.Should only be called once!
-
inline bool
ready
() Check if the Future holds a value.
Private Members
-
std::unique_ptr<rcf_client_type>
m_client
-
std::unique_ptr<RCF::Future<return_value_type>>
m_future
-
using
-
template<typename
Connection
>
classhxcomm
::
QuiggeldyServer
: public rcf_extensions::RoundRobinReinitScheduler<QuiggeldyWorker<Connection>> - #include <quiggeldy_server.h>
Public Types
-
using
parent_t
= rcf_extensions::RoundRobinReinitScheduler<QuiggeldyWorker<Connection>>
Public Functions
-
template<typename
RcfInterface
>
inline voidbind_to_interface
() Bind QuiggeldyServer to the RcfInterface.
Cannot be called on baseclass because then the baseclass would get bound to the RCF-interface.
-
inline bool
get_use_munge
() const Get if worker is configured to use munge.
Convenience to automatically disable munge usage on the client.
- Returns
if worker is configured to use munge.
-
using
-
template<typename
Connection
>
classhxcomm
::
QuiggeldyWorker
- #include <quiggeldy_worker.h>
Implementation of server-side experiment execution.
Set up and used by quiggeldy and not intended to be used in user-code.
Public Types
-
using
interface_types
= quiggeldy_interface_types<typename Connection::message_types>
-
using
reinit_type
= typename interface_types::reinit_type
-
using
request_type
= typename interface_types::request_type
-
using
response_type
= typename interface_types::response_type
Public Functions
-
QuiggeldyWorker
(QuiggeldyWorker &&other) = default
-
QuiggeldyWorker
(QuiggeldyWorker const &other) = delete
-
~QuiggeldyWorker
()
-
bool
check_for_timeout
(typename response_type::first_type const &response) Check if response contains a timeout response.
- Parameters
response – to check for timeouts.
- Returns
True if timeout was encountered, false otherwise.
-
std::chrono::milliseconds
get_delay_after_connection_attempt
() const Get the amount of time to wait, if connecting to the “real” backend fails.
- Returns
Number of millisconds between attempts.
-
std::size_t
get_max_num_connection_attemps
() const Get how many connection attempts to the “real” backend are made prior to failing hard.
- Returns
Number of attempts
-
std::string
get_remote_repo_state
() const Get repository state info of quiggeldy server side build.
- Returns
Repository state info
-
std::string const &
get_slurm_license
() const Get slurm license that is allocated by worker.
- Returns
Slurm license to acquire in setup().
-
std::string
get_unique_identifier
(std::optional<std::string> hwdb_path = std::nullopt) const Get unique identifier from hwdb.
- Parameters
hwdb_path – Optional path to hwdb
- Returns
Unique identifier
-
bool
get_use_munge
() const Get whether worker expects to decode user data via munge.
- Returns
Whether worker expects to decode user data via munge.
-
QuiggeldyWorker &
operator=
(QuiggeldyWorker &&other) = default
-
QuiggeldyWorker &
operator=
(QuiggeldyWorker const &other) = delete
-
void
perform_reinit
(reinit_type &reinit_type, bool enforce) This function is called whenever we had to relinquish control of our hardware resource and the user specified a reinit-program to be loaded prior to the next work-unit being executed.
- Parameters
reinit_type – reinit stack to be executed
enforce – execute all reinit stack entries
-
void
perform_reinit_snapshot
(reinit_type&) This function is called whenever we have to relinquish control of our hardware resource and the user specified a reinit-program to be snapshotted after the previous work-unit was executed.
-
void
set_delay_after_connection_attempt
(std::chrono::milliseconds delay) Set the amount of time to wait, if connecting to the “real” backend fails.
-
void
set_enable_allocate_license
(bool enable_license_alloc) Set or unset if the worker should perform its work with a license allocation.
- Parameters
enable_license_allocj – Whether or not to perform work with a license allocation.
-
void
set_enable_mock_mode
(bool mode_enable) Set or unset the worker into mock-mode.
If in mock-mode, no communication with any hardware is attempted and empty results are returned.
- Parameters
mode_enable – Whether or not to enable mock mode.
-
void
set_max_num_connection_attemps
(std::size_t num) Set how many connection attempts to the “real” backend are made prior to failing hard.
- Parameters
num – Number of attempts to set.
-
void
set_slurm_license
(std::string license) Set slurm license to allocate.
- Parameters
license – Slurm license to acquire in setup().
-
void
set_slurm_partition
(std::string partition) Set slurm partition.
(If unset defaults to “cube”.)
- Parameters
partition – Which slurm partition to use in allocations.
-
void
set_use_munge
(bool use_munge) Set whether or not to verify user information using munge.
This option has no effect if fisch was compiled with
--without-munge
.- Parameters
use_munge – If munge should be used (true) or not (false).
-
void
setup
() This function is called by the scheduler whenever there is work to execute (in our case FPGA words that need to be send and then an answer to receive) but the chip is currently not used by us.
The function performs whatever is necessary to run experiments on a locally attach board. This includes getting a license allocation.
NOTE: If the GRES is already allocated in SLURM, this function will block until it becomes available!
-
void
teardown
() This function is run whenever the server releases control (and any associated slurm resources).
-
std::optional<user_session_type>
verify_user
(std::string const &user_data) Verify the authenticity of the given user.
- Parameters
user_data – User data supplied via RCF. If munge support is enabled (via USE_MUNGE_AUTH), it should be encoded using munge.
- Returns
If user is authenticated, return identifying hash with which fair round-robin scheduling is ensured.
-
response_type
work
(request_type const &req) This function is called by the scheduler to actually evaluate the FPGA words (send data to chip, wait, retrieve response from chip).
- Parameters
req – FPGA words to be sent to the chip for this job.
Protected Types
-
using
connection_init_type
= typename Connection::init_parameters_type
Protected Functions
-
template<typename ...
Args
>
voidexec_slurm_binary
(char const *binary_name, Args&&... args) Helper function to execute slurm binaries.
-
bool
has_slurm_allocation
()
-
void
setup_connection
() Create a new connection, closing the old one in the process.
-
void
slurm_allocation_acquire
()
-
void
slurm_allocation_release
()
Protected Attributes
-
bool
m_allocate_license
-
std::unique_ptr<Connection>
m_connection
-
connection_init_type
m_connection_init
-
bool
m_has_slurm_allocation
Explicit slurm license to use for allocation.
-
bool
m_mock_mode
-
bool
m_use_munge
Protected Static Attributes
-
static constexpr char
default_slurm_partition
[] = {"cube"}
-
using
-
template<typename
UTMessageParameter
>
structhxcomm::random
::
default_ut_message
- #include <utmessage_random.h>
Return default-constructed UTMessage of runtime-specifiable header.
Public Types
-
typedef hxcomm::ToUTMessageVariant<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::type
message_type
Public Static Functions
-
static inline message_type
get
(size_t const header)
Private Static Functions
-
template<size_t
H
>
static inline message_typemessage_recurse
(size_t const header, std::index_sequence<H>)
-
template<size_t
H
, size_t...Hs
>
static inline message_typemessage_recurse
(size_t const header, std::index_sequence<H, Hs...>)
-
typedef hxcomm::ToUTMessageVariant<UTMessageParameter::HeaderAlignment, typenameUTMessageParameter::SubwordType, typenameUTMessageParameter::PhywordType, typenameUTMessageParameter::Dictionary>::type
-
template<typename
T
>
structtype
- #include <payload_random.h>
To-type-proxy to partially specialize function on a non-default-constructible argument type.
- Template Parameters
T – Type to proxy for
-
template<typename
ConnectionParameters
>
classhxcomm
::
ReinitStack
- #include <reinit_stack.h>
ReinitStack holds the stack of reinit programs that are currently set as a simple wrapper around a vector.
Since ReinitStack resides within the QuiggeldyConnection-handle, ReinitStack needs to be constructable prior to the full definition of QuiggeldyConnection. This is why informing the remote side about changes in the stack is handled by ReinitStackEntry.
Public Types
-
using
interface_types
= quiggeldy_interface_types<ConnectionParameters>
-
using
reinit_entry_type
= typename interface_types::reinit_entry_type
-
using
reinit_type
= typename interface_types::reinit_type
Public Functions
-
ReinitStack
()
-
ReinitStack
(ReinitStack&&) = default
-
ReinitStack
(ReinitStack const&) = delete
-
void
pop_entry
(std::size_t idx) Pop entry with given index.
Throws if the given index is not the topmost entry in the stack.
- Parameters
idx – Index to delete.
-
std::size_t
push
(reinit_entry_type &&entry) Push a new entry onto the stack and return its position within the stack.
- Parameters
entry – The entry to be pushed on the stack
- Returns
Position at which entry resides in stack after pushing.
-
std::size_t
push
(reinit_entry_type const &entry) Push a new entry onto the stack and return its position within the stack.
- Parameters
entry – The entry to be pushed on the stack
- Returns
Position at which entry resides in stack after pushing.
-
void
set_all_done
() Set all reinit stack entries as done.
-
bool
update_at
(std::size_t idx, reinit_entry_type &&entry) Update entry at given position.
- Parameters
idx – Position at which to update the entry.
entry – New updated entry in the stack.
- Returns
if entry was succesfully updated
-
bool
update_at
(std::size_t idx, reinit_entry_type const &entry) Update entry at given position.
- Parameters
idx – Position at which to update the entry.
entry – New updated entry in the stack.
- Returns
if entry was succesfully updated
-
using
-
template<typename
QuiggeldyConnection
, typenameConnectionVariant
>
classhxcomm
::
ReinitStackEntry
- #include <reinit_stack_entry.h>
Proxy object that can be used independently from a connection to register a reinit program to be run whenever control of the hardware resources is relinquished for some time.
Note: On direct-access connections this is a no-op since those connections do not support the notion of relinquishing control. Right now, only
QuiggeldyConnection
makes use of this.Public Types
-
using
connection_ref_variant_type
= detail::variant_to_ref_t<ConnectionVariant>
-
using
interface_types
= typename quiggeldy_connection_type::interface_types
-
using
quiggeldy_connection_type
= QuiggeldyConnection
-
using
reinit_entry_type
= typename interface_types::reinit_entry_type
-
using
reinit_stack_type
= typename quiggeldy_connection_type::reinit_stack_type
-
using
reinit_type
= typename interface_types::reinit_type
-
using
reinit_uploader_type
= typename quiggeldy_connection_type::reinit_uploader_type
Public Functions
-
ReinitStackEntry
() = delete
-
template<typename
Connection
>ReinitStackEntry
(Connection&)
-
ReinitStackEntry
(ConnectionVariant&)
-
ReinitStackEntry
(ReinitStackEntry&&) = default
-
ReinitStackEntry
(ReinitStackEntry const&) = default
-
~ReinitStackEntry
()
-
void
enforce
() Enforce reinit program to be used on the remote site.
-
void
pop
() Pop this entry from the stack.
-
void
set
(reinit_entry_type &&entry) Register a reinit program to be used on the remote site.
Takes ownership of the program.
- Parameters
entry – What to upload.
-
void
set
(reinit_entry_type const &entry) Register a reinit program to be used on the remote site.
Copies the program.
- Parameters
entry – What to upload.
Private Functions
-
void
handle_unsupported_connection
(reinit_entry_type const&)
-
template<typename
Connection
>
voidsetup
(Connection &connection)
Private Members
-
connection_ref_variant_type
m_connection_ref
-
bool
m_connection_supports_reinit
-
std::weak_ptr<reinit_stack_type>
m_reinit_stack
-
std::weak_ptr<reinit_uploader_type>
m_reinit_uploader
Private Static Attributes
-
template<typename
Connection
>
static constexpr boolsupports_reinit_v
= std::is_same_v<std::remove_cvref_t<Connection>, quiggeldy_connection_type>
-
using
-
class
hxcomm
::
SignalOverrideIntTerm
- #include <signal.h>
Class overriding the SIGINT and the SIGTERM signal handler to a exit handler during life-time.
Public Functions
-
SignalOverrideIntTerm
() Construct signal override for SIGINT and SIGTERM by alteration to a exit handler.
-
~SignalOverrideIntTerm
() Destruct signal override with cleanup of signal handlers.
Private Types
-
typedef decltype(signal(SIGINT, SIG_IGN))
signal_handler_type
Private Members
-
signal_handler_type
m_previous_handler_sigint
-
signal_handler_type
m_previous_handler_sigterm
-
-
template<typename
ConnectionParameter
>
classhxcomm
::
SimConnection
- #include <simconnection.h>
Simulation connection class.
Establish and hold Simulation connection to FPGA. Provide convenience functions for sending and receiving UT messages.
- Template Parameters
ConnectionParameter – UT message parameter for connection
Public Types
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
receive_message_type
= typename message_types::receive_type
-
typedef std::vector<receive_message_type>
receive_queue_type
-
using
send_halt_message_type
= typename message_types::send_halt_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
SimConnection
(bool enable_terminate_on_destruction = false) Create and start connection to simulation server.
The RCF port is automatically extracted from the enviroment, the simulation server is expected to run on the same host.
- Parameters
enable_terminate_on_destruction – Whether or not to terminate the remote simulation upon destruction of the SimConnection.
- Throws
std::runtime_error – On no port to simulator found in environment
-
SimConnection
(ip_t ip, port_t port, bool enable_terminate_on_destruction = false) Create and start connection to simulation server.
- Parameters
ip – IP-address of simulation server
port – Port of simulation server
enable_terminate_on_destruction – Whether or not to terminate the remote simulation upon destruction of the SimConnection.
-
SimConnection
(SimConnection&&) Move constructor.
-
SimConnection
(SimConnection const&) = delete Copy constructor (deleted because no two instances with the same simulator allocation can coexist).
-
~SimConnection
() Destruct simulation connection joining all receive threads.
-
std::string
get_bitfile_info
() const Get bitfile information.
Returns “simulation” for SimConnection.
- Returns
Bitfile info
-
bool
get_enable_terminate_on_destruction
() const Get enable value to terminate simulator on destruction of connection.
- Returns
Boolean value
-
std::string
get_remote_repo_state
() const Get server-side remote repository state information.
Only non-empty for QuiggeldyConnection.
- Returns
Repository state
-
ConnectionTimeInfo
get_time_info
() const Get time information.
- Returns
Time information
-
std::string
get_unique_identifier
(std::optional<std::string> hwdb_path = std::nullopt) const Get unique identifier from hwdb.
- Parameters
hwdb_path – Optional path to hwdb
- Returns
Unique identifier
-
SimConnection &
operator=
(SimConnection&&) Assignment operator.
-
SimConnection &
operator=
(SimConnection const&) = delete Assignment operator (deleted because no two instances with the same simulator allocation can coexist).
-
void
set_enable_terminate_on_destruction
(bool const value) Set enable value to terminate simulator on destruction of connection.
- Parameters
value – Boolean value
Public Static Attributes
-
static constexpr char
name
[] = "SimConnection"
-
static constexpr auto
supported_targets
= {Target::simulation}
Private Types
-
typedef Decoder<typename ConnectionParameter::Receive, receive_queue_type, listener_halt_type>
decoder_type
-
typedef Encoder<typename ConnectionParameter::Send, send_queue_type>
encoder_type
-
typedef ListenerHalt<UTMessage<ConnectionParameter::Receive::HeaderAlignment, typename ConnectionParameter::Receive::SubwordType, typename ConnectionParameter::Receive::PhywordType, typename ConnectionParameter::Receive::Dictionary, typename ConnectionParameter::ReceiveHalt>>
listener_halt_type
-
typedef ConnectionRegistry<SimConnection>
Registry
Registry of open SimConnections.
-
typedef std::queue<subpacket_type>
send_queue_type
-
typedef flange::SimulatorEvent::al_data_t::value_type
subpacket_type
Private Functions
-
template<typename
InputIterator
>
voidadd
(InputIterator const &begin, InputIterator const &end) Add multiple UT messages to the send queue.
- Template Parameters
InputIterator – Iterator type to sequence of messages to add
- Parameters
begin – Iterator to beginning of sequence
end – Iterator to end of sequence
-
void
add
(send_message_type const &message) Add a single UT message to the send queue.
- Parameters
message – Message to add
-
void
commit
() Send messages in send queue.
-
std::mutex &
get_mutex
() Get internal mutex to use for mutual exclusion.
- Returns
Mutable reference to mutex
-
receive_queue_type
receive_all
() Receive all UT messages currently in the receive queue.
- Returns
Received messages
-
bool
receive_empty
() const Get whether the connection has no UT messages available to receive.
- Returns
Boolean value
-
void
run_until_halt
() Start simulation and wait until halt instruction is received from simulation.
- Throws
std::runtime_error – Simulation already running
-
void
work_receive
(flange::SimulatorClient &sim)
Private Members
-
duration_type
m_commit_duration
= {}
-
duration_type
m_decode_duration
= {}
-
decoder_type
m_decoder
-
duration_type
m_encode_duration
= {}
-
encoder_type
m_encoder
-
duration_type
m_execution_duration
= {}
-
listener_halt_type
m_listener_halt
-
receive_queue_type
m_receive_queue
-
send_queue_type
m_send_queue
-
bool
m_terminate_on_destruction
Friends
- friend class Stream< SimConnection >
-
struct
hxcomm::SimConnection
::
ResetHaltListener
Public Functions
-
inline
ResetHaltListener
(listener_halt_type &listener)
-
inline
~ResetHaltListener
()
Public Members
-
listener_halt_type &
listener
-
inline
-
struct
hxcomm::SimConnection
::
ScopedSimulationRun
Public Functions
-
inline
~ScopedSimulationRun
()
-
inline
-
template<typename
Connection
>
classhxcomm
::
Stream
- #include <stream.h>
Interface definition as to how each connection can be interacted with.
The user is supposed to only be able to construct and destroy
Connection
handles on its own. Interaction is mitigated by the correspondingStream<Connection>
-object which is constructed byexecute_messages
Note: The Stream<Connection>-interface is intended for hxcomm and its internal testing routines and not meant to be relied upon in upper layers!
Instead, interaction with upper layers happens via
execute_messages(connection, messages)
. Here the specialized versions ofStream<Connection>
that have to be derived from this class are instantiated.By convention,
Stream<Connection>
is befriended byConnection
and calls private functions of the same signature as its interface.- Template Parameters
Connection – Which connection object to use for operation.
Public Types
-
using
connection_type
= Connection
-
using
message_types
= typename GetMessageTypes<Connection>::type
-
using
receive_message_type
= typename message_types::receive_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
inline
Stream
(connection_type &conn) Construct a Stream for the given connection handle which it manages.
Lock connection-internal mutex to ensure mutual exclusion.
-
template<typename
InputIterator
>
inline voidadd
(InputIterator const begin, InputIterator const end) Add multiple UT messages to the send queue.
- Template Parameters
InputIterator – Iterator type to sequence of messages to add
- Parameters
begin – Iterator to beginning of sequence
end – Iterator to end of sequence
-
template<typename
MessageType
>
inline voidadd
(MessageType const &message) Add a single UT message to the send queue.
- Parameters
message – Message to add
-
inline void
commit
() Send messages in send queue.
-
inline receive_message_type
receive
() Receive a single UT message.
- Throws
std::runtime_error – On empty message queue
- Returns
Received message
-
inline auto
receive_all
() Receive all UT messages.
- Returns
Received message queue
-
inline bool
receive_empty
() const Get whether the connection has no UT messages available to receive.
- Returns
Boolean value
-
inline void
run_until_halt
() Start emulation and wait until halt instruction is received from simulation.
-
inline bool
try_receive
(receive_message_type &message) Try to receive a single UT message.
- Parameters
message – Message to receive to
- Returns
Boolean value whether receive was successful
-
template<typename
ConnType
>
structhxcomm::Stream
::
Streamable
- #include <stream.h>
Public Types
-
template<typename
InputIteratorT
>
usinghas_add_iterator_method
= typename std::is_same<decltype(std::declval<ConnType>().add(std::declval<InputIteratorT const&>(), std::declval<InputIteratorT const&>())), void>::type
-
template<typename
-
template<typename
Connection
>
structhxcomm
::
StreamRC
- #include <stream_rc.h>
StreamRC (pronounced “streamers”), is a class similiar to the Stream-class but with a
R
educed andC
ustom interface forR
emote exeC
ution.Public Types
-
using
connection_type
= Connection
-
using
submit_arg_type
= detail::execute_messages_argument_t<connection_type>
Public Functions
-
inline
StreamRC
(connection_type &conn) Construct a Stream for the given connection handle which it manages.
-
inline auto
get_reinit_stack
() const
-
inline auto
get_reinit_upload
() const
-
inline void
reinit_enforce
()
-
inline auto
submit_async
(submit_arg_type const &message)
-
inline auto
submit_blocking
(submit_arg_type const &message)
Protected Attributes
-
connection_type &
m_connection
-
using
-
struct
Check
- #include <stream_rc.h>
-
template<typename
C
, typename = std::void_t<>>
structhas_method_get_reinit_stack
: public std::false_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_method_get_reinit_stack
<C, std::void_t<decltype(std::declval<C&>().get_reinit_stack())>> : public std::true_type - #include <stream_rc.h>
-
template<typename
C
, typename = std::void_t<>>
structhas_method_get_reinit_uploader
: public std::false_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_method_get_reinit_uploader
<C, std::void_t<decltype(std::declval<C&>().get_reinit_upload())>> : public std::true_type - #include <stream_rc.h>
-
template<typename
C
, typename = std::void_t<>>
structhas_method_reinit_enforce
: public std::false_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_method_reinit_enforce
<C, std::void_t<decltype(std::declval<C&>().reinit_enforce())>> : public std::true_type - #include <stream_rc.h>
-
template<typename
C
, typename = std::void_t<>>
structhas_method_submit_async
: public std::false_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_method_submit_async
<C, std::void_t<typename submit_async_return<C>::type>> : public std::true_type - #include <stream_rc.h>
-
template<typename, typename = std::void_t<>>
structhas_method_submit_blocking
: public std::false_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_method_submit_blocking
<C, std::void_t<typename submit_blocking_return<C>::type>> : public std::true_type - #include <stream_rc.h>
-
template<typename
C
>
structhas_required_interface
: public std::conjunction<has_method_submit_async<C>, has_method_submit_blocking<C>> - #include <stream_rc.h>
-
template<typename
C
>
structhxcomm::StreamRC::Check
::
submit_async_return
- #include <stream_rc.h>
Helper for template engine.
-
template<typename
C
>
structhxcomm::StreamRC::Check
::
submit_blocking_return
- #include <stream_rc.h>
Helper for template engine.
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typenameDictionary
>
structToUTMessageVariant
Get UT message variant type corresponding to UT message parameters.
- Template Parameters
HeaderAlignment – Alignment of header in bits
SubwordType – Type of subword which’s width corresponds to the messages alignment
PhywordType – Type of PHY-word which’s width corresponds to the message’s minimal width
Dictionary – Dictionary of instructions
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typename ...Is
>
structhxcomm
::
ToUTMessageVariant
<HeaderAlignment, SubwordType, PhywordType, hate::type_list<Is...>> - #include <to_utmessage_variant.h>
Public Types
-
typedef std::variant<UTMessage<HeaderAlignment, SubwordType, PhywordType, hate::type_list<Is...>, Is>...>
type
-
typedef std::variant<UTMessage<HeaderAlignment, SubwordType, PhywordType, hate::type_list<Is...>, Is>...>
-
template<size_t
HeaderAlignment
, typenameSubwordType
, typenamePhywordType
, typenameDictionary
, typenameInstruction
>
classhxcomm
::
UTMessage
- #include <utmessage.h>
Container for a UT message used for host-FPGA communication.
It is aligned to subword width. The header is left-aligned, the payload is right-aligned. The leftmost header bit is reserved for a comma, which for valid UT messages is always set to false. The header is calculated as the instruction’s position in the dictionary.
- Template Parameters
HeaderAlignment – Alignment of header in bits
SubwordType – Type of subword which’s width corresponds to the message’s alignment
PhywordType – Type of PHY-word which’s width corresponds to the message’s minimal width
Dictionary – Dictionary of instructions
Instruction – Instruction to encode in UT message
Public Types
-
typedef bool
comma_type
Type of the valid field.
-
typedef Dictionary
dictionary_type
-
typedef hate::bitset<header_width, SubwordType>
header_type
Type of the header field.
-
typedef Instruction
instruction_type
-
typedef hate::bitset<payload_width, SubwordType>
payload_type
Type of the payload field.
-
typedef hate::bitset<word_width, SubwordType>
word_type
Word-type of a UTMessage.
Public Functions
-
explicit constexpr
UTMessage
(payload_type const &payload) Construct UTMessage with header and payload.
- Parameters
payload – Payload bitset to fill UTMessage payload field with
-
explicit constexpr
UTMessage
(typename Instruction::Payload const &payload) Construct UTMessage with header and payload.
- Parameters
payload – Payload to fill UTMessage payload field with
-
constexpr Instruction::Payload
decode
() const Decode message to its instruction’s payload type.
- Returns
Payload of message
-
constexpr void
encode
(typename Instruction::Payload const &value) Encode message from an instruction’s payload type.
- Parameters
value – Payload to encode
-
constexpr payload_type
get_payload
() const Get payload.
- Returns
Bitset containing payload
-
bool
operator!=
(UTMessage const &other) const Inequality operator.
- Parameters
other – UTMessage to compare to
- Returns
Boolean result of comparison
-
bool
operator==
(UTMessage const &other) const Equality operator.
- Parameters
other – UTMessage to compare to
- Returns
Boolean result of comparison
-
constexpr void
set_payload
(payload_type const &value) Set payload.
- Parameters
value – Bitset containing payload
Public Static Functions
-
static constexpr header_type
get_header
() Get header.
- Returns
Bitset containing header
Public Static Attributes
-
static constexpr size_t
comma_width
= 1 Number of bits of the comma.
-
static constexpr size_t
header_width
= UTMessageHeaderWidth<HeaderAlignment, Dictionary>::value Number of bits of the header.
The comma sits left-aligned in the header.
-
static constexpr size_t
num_subwords
= hate::math::round_up_integer_division(header_width + Instruction::size, sizeof(SubwordType) * CHAR_BIT) Number of subwords.
-
static constexpr size_t
payload_width
= Instruction::size Number of bits of the payload field.
-
static constexpr size_t
phyword_width
= sizeof(PhywordType) * CHAR_BIT Number of bits of a phyword.
-
static constexpr size_t
subword_width
= sizeof(SubwordType) * CHAR_BIT Number of bits of a subword.
-
static constexpr size_t word_width = ((subword_width * num_subwords) < phyword_width)?phyword_width : (subword_width * num_subwords)
Total number of bits of a UTMessage.
If the calculated minimal size aligned to subword_width is smaller than phyword_width, round up to one full phyword_width, because the UT can process at most one UT message per PHY word.
Private Members
-
payload_type
m_data
-
template<size_t
HeaderAlignment
, typenameDictionary
>
structhxcomm
::
UTMessageHeaderWidth
- #include <utmessage_header_width.h>
Get the header width corresponding to a given set of UT message parameters.
- Template Parameters
HeaderAlignment – Alignment of header in bits
Dictionary – Dictionary of instructions
Public Static Attributes
-
static constexpr size_t
value
= hate::math::round_up_to_multiple(1 + hate::math::num_bits(hate::type_list_size<Dictionary>::value - 1), HeaderAlignment)
-
template<size_t
HeaderAlignmentT
, typenameSubwordTypeT
, typenamePhywordTypeT
, typenameDictionaryT
>
structhxcomm
::
UTMessageParameter
- #include <connection_parameter.h>
Set of template parameters common to a UTMessage set.
- Template Parameters
HeaderAlignmentT – Alignment of header in bits
SubwordTypeT – Type of subword which’s width corresponds to the message’s alignment
PhywordTypeT – Type of PHY-word which’s width corresponds to the message’s minimal width
DictionaryT – Dictionary of instructions
Public Types
-
typedef DictionaryT
Dictionary
-
typedef PhywordTypeT
PhywordType
-
typedef SubwordTypeT
SubwordType
Public Static Attributes
-
static constexpr size_t
HeaderAlignment
= HeaderAlignmentT
-
struct
hxcomm::vx::detail
::
QuiggeldyScheduleOutToInTransform
- #include <quiggeldy_schedule_out_to_in_transform.h>
Public Types
-
using
request_type
= std::vector<UTMessageToFPGAVariant>
-
using
response_type
= std::vector<UTMessageFromFPGAVariant>
Public Functions
-
request_type
operator()
(response_type const &response, request_type const &snapshot)
-
using
-
class
hxcomm::vx
::
EnsureLocalQuiggeldy
- #include <ensure_local_quiggeldy.h>
RAII-style helper to ensure a local quiggeldy instance is running.
-
template<template<size_t> class
PackSpike
, template<size_t> classPackMADC
, typenameIS
>
structGenerateDictionary
-
template<template<size_t> class
PackSpike
, template<size_t> classPackMADC
, size_t...Is
>
structhxcomm::vx::instruction::event_from_fpga::detail
::
GenerateDictionary
<PackSpike, PackMADC, std::index_sequence<Is...>> - #include <event_from_fpga.h>
-
class
hxcomm::vx::instruction::event_from_fpga
::
MADCSample
- #include <event_from_fpga.h>
Type of one sample event.
Public Types
-
typedef hate::bitset<timestamp_size>
Timestamp
Public Functions
-
inline
MADCSample
()
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline bool
operator!=
(MADCSample const &other) const
-
inline bool
operator==
(MADCSample const &other) const
Public Static Attributes
-
static constexpr size_t
size
= value_size + timestamp_size
-
static constexpr size_t
timestamp_size
= 8
-
static constexpr size_t
value_size
= 16
Friends
-
inline friend std::ostream &
operator<<
(std::ostream &os, MADCSample const &value)
-
typedef hate::bitset<timestamp_size>
-
template<size_t
num_samples
>
structhxcomm::vx::instruction::event_from_fpga
::
MADCSamplePack
- #include <event_from_fpga.h>
Public Types
-
typedef MADCSamplePackPayload<num_samples>
Payload
Public Static Attributes
-
static constexpr size_t
size
= MADCSamplePackPayload<num_samples>::size
-
typedef MADCSamplePackPayload<num_samples>
-
template<size_t
num_samples
>
classhxcomm::vx::instruction::event_from_fpga
::
MADCSamplePackPayload
- #include <event_from_fpga.h>
Payload of a madc_sample_pack instruction.
Public Types
-
typedef std::array<MADCSample, num_samples>
samples_type
Public Functions
-
inline
MADCSamplePackPayload
()
-
inline
MADCSamplePackPayload
(samples_type const &samples)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline samples_type const &
get_samples
() const
-
inline bool
operator!=
(MADCSamplePackPayload const &other) const
-
inline bool
operator==
(MADCSamplePackPayload const &other) const
-
inline void
set_samples
(samples_type const &samples)
Public Static Attributes
-
static constexpr size_t
size
= MADCSample::size * num_samples
Private Members
-
samples_type
m_samples
Friends
-
inline friend std::ostream &
operator<<
(std::ostream &os, MADCSamplePackPayload const &value)
-
typedef std::array<MADCSample, num_samples>
-
class
hxcomm::vx::instruction::event_from_fpga
::
Spike
- #include <event_from_fpga.h>
Type of one spike event.
Public Types
-
typedef hate::bitset<event_constants::spike_size>
spike_type
-
typedef hate::bitset<timestamp_size>
Timestamp
Public Functions
-
inline
Spike
()
-
inline
Spike
(spike_type const &spike, Timestamp const ×tamp)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline spike_type const &
get_spike
() const
-
inline void
set_spike
(spike_type const &spike)
Public Static Attributes
-
static constexpr size_t
size
= event_constants::spike_size + timestamp_size
-
static constexpr size_t
timestamp_size
= 8
-
typedef hate::bitset<event_constants::spike_size>
-
template<size_t
num_spikes
>
structhxcomm::vx::instruction::event_from_fpga
::
SpikePack
- #include <event_from_fpga.h>
Public Types
-
typedef SpikePackPayload<num_spikes>
Payload
Public Static Attributes
-
static constexpr size_t
size
= SpikePackPayload<num_spikes>::size
-
typedef SpikePackPayload<num_spikes>
-
template<size_t
num_spikes
>
classhxcomm::vx::instruction::event_from_fpga
::
SpikePackPayload
- #include <event_from_fpga.h>
Payload of a spike_pack instruction.
Public Types
-
typedef std::array<Spike, num_spikes>
spikes_type
Public Functions
-
inline
SpikePackPayload
()
-
inline
SpikePackPayload
(spikes_type const &spikes)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline spikes_type const &
get_spikes
() const
-
inline bool
operator!=
(SpikePackPayload const &other) const
-
inline bool
operator==
(SpikePackPayload const &other) const
-
inline void
set_spikes
(spikes_type const &spikes)
Public Static Attributes
-
static constexpr size_t
size
= Spike::size * num_spikes
Private Members
-
spikes_type
m_spikes
Friends
-
inline friend std::ostream &
operator<<
(std::ostream &os, SpikePackPayload const &value)
-
typedef std::array<Spike, num_spikes>
-
template<template<size_t> class
Pack
, typenameIS
>
structGenerateDictionary
-
template<template<size_t> class
Pack
, size_t...Is
>
structhxcomm::vx::instruction::event_to_fpga::detail
::
GenerateDictionary
<Pack, std::index_sequence<Is...>> - #include <event_to_fpga.h>
-
template<size_t
num_spikes
>
structhxcomm::vx::instruction::event_to_fpga
::
SpikePack
- #include <event_to_fpga.h>
Packed spike to FPGA instruction.
Public Types
-
typedef SpikePackPayload<num_spikes>
Payload
Public Static Attributes
-
static constexpr size_t
size
= SpikePackPayload<num_spikes>::size
-
typedef SpikePackPayload<num_spikes>
-
template<size_t
num_spikes
>
classhxcomm::vx::instruction::event_to_fpga
::
SpikePackPayload
- #include <event_to_fpga.h>
Payload of a SpikePack instruction.
Public Types
-
typedef std::array<hate::bitset<event_constants::spike_size>, num_spikes>
spikes_type
Public Functions
-
inline
SpikePackPayload
()
-
inline
SpikePackPayload
(spikes_type const &spikes)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline spikes_type const &
get_spikes
() const
-
inline bool
operator!=
(SpikePackPayload const &other) const
-
inline bool
operator==
(SpikePackPayload const &other) const
-
inline void
set_spikes
(spikes_type const &spikes)
Public Static Attributes
-
static constexpr size_t
size
= event_constants::spike_size * num_spikes
Private Members
-
spikes_type
m_spikes
Friends
-
inline friend std::ostream &
operator<<
(std::ostream &os, SpikePackPayload const &value)
-
typedef std::array<hate::bitset<event_constants::spike_size>, num_spikes>
-
struct
hxcomm::vx::instruction::from_fpga_system
::
HighspeedLinkNotification
- #include <from_fpga_system.h>
Highspeed-Link notifications.
Public Types
-
typedef hxcomm::instruction::detail::payload::Bitset<HighspeedLinkNotification, size>
Payload
Public Static Attributes
-
static constexpr size_t
size
= 8
-
typedef hxcomm::instruction::detail::payload::Bitset<HighspeedLinkNotification, size>
-
struct
hxcomm::vx::instruction::from_fpga_system
::
Loopback
- #include <from_fpga_system.h>
Trace-marker response to a system::Loopback packet.
-
struct
hxcomm::vx::instruction::from_fpga_system
::
TimeoutNotification
- #include <from_fpga_system.h>
Instruction timeout notification.
Public Types
-
typedef hxcomm::instruction::detail::payload::Number<TimeoutNotification, value_type>
Payload
-
typedef uint32_t
value_type
Public Static Attributes
-
static constexpr size_t
size
= sizeof(value_type) * CHAR_BIT
-
typedef hxcomm::instruction::detail::payload::Number<TimeoutNotification, value_type>
-
struct
hxcomm::vx::instruction::jtag_from_hicann
::
Data
- #include <jtag_from_hicann.h>
Response to a to_fpga_jtag::Data packet, if keep_response is true.
Public Static Attributes
-
static constexpr size_t
size
= 33
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::omnibus_from_fpga
::
Data
- #include <omnibus_from_fpga.h>
Response to a omnibus_to_fpga::Address packet, if is_read is true.
Public Types
-
typedef hxcomm::instruction::detail::payload::Number<Data, value_type>
Payload
-
typedef uint32_t
value_type
Public Static Attributes
-
static constexpr size_t
size
= sizeof(value_type) * CHAR_BIT
-
typedef hxcomm::instruction::detail::payload::Number<Data, value_type>
-
struct
hxcomm::vx::instruction::omnibus_to_fpga
::
Address
- #include <omnibus_to_fpga.h>
Instruction to set Omnibus address for a read or write operation.
On read this instruction leads to a read response. On write, data is to be provided with a following ‘Data’ instruction. To the FPGA, byte enables can be used to select byte transmission.
Public Static Attributes
-
static constexpr size_t
size
= 37
-
static constexpr size_t
-
class
hxcomm::vx::instruction::omnibus_to_fpga::Address
::
Payload
- #include <omnibus_to_fpga.h>
Public Functions
-
inline explicit
Payload
(uint32_t const address = 0, bool const is_read = false, hate::bitset<sizeof(uint32_t)> const byte_enables = 0xf)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline bool
get_is_read
() const
-
inline void
set_is_read
(bool value)
-
inline explicit
-
struct
hxcomm::vx::instruction::omnibus_to_fpga
::
Data
- #include <omnibus_to_fpga.h>
Write data to a beforehand specified Omnibus address.
Write response filtering can be disabled by setting the lowest bit of omnibus on FPGA address 0 to false.
Public Static Attributes
-
static constexpr size_t
size
= sizeof(uint32_t) * CHAR_BIT
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::system
::
Loopback
- #include <system.h>
Instruction generating a Loopback response.
-
struct
hxcomm::vx::instruction::system
::
Reset
- #include <system.h>
Instruction to set reset register.
True enables the reset.
Public Static Attributes
-
static constexpr size_t
size
= 1
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::timing
::
Barrier
- #include <timing.h>
Block further execution until specified set of communication channels is idle.
-
struct
hxcomm::vx::instruction::timing
::
PollingOmnibusBlock
- #include <timing.h>
Block further execution until specified Omnibus address has value & mask == target.
Configuration is found in the FPGA Omnibus register file of the executor.
Public Types
-
typedef hxcomm::instruction::detail::payload::Bitset<PollingOmnibusBlock, size>
Payload
Public Static Attributes
-
static constexpr size_t
size
= 1
-
typedef hxcomm::instruction::detail::payload::Bitset<PollingOmnibusBlock, size>
-
struct
hxcomm::vx::instruction::timing
::
Setup
- #include <timing.h>
Initialize timer to 0.
Public Static Attributes
-
static constexpr size_t
size
= 0
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::timing
::
SystimeInit
- #include <timing.h>
Syncronize ASIC time with FPGA time.
Public Types
-
typedef hxcomm::instruction::detail::payload::Bitset<SystimeInit, size>
Payload
Public Static Attributes
-
static constexpr size_t
size
= 1
-
typedef hxcomm::instruction::detail::payload::Bitset<SystimeInit, size>
-
struct
hxcomm::vx::instruction::timing
::
WaitUntil
- #include <timing.h>
Block further execution until incrementing timer reaches specified count.
Public Types
-
typedef hxcomm::instruction::detail::payload::Number<WaitUntil, value_type>
Payload
-
typedef uint32_t
value_type
Public Static Attributes
-
static constexpr size_t
size
= sizeof(value_type) * CHAR_BIT
-
typedef hxcomm::instruction::detail::payload::Number<WaitUntil, value_type>
-
struct
hxcomm::vx::instruction::timing_from_fpga
::
Sysdelta
- #include <timing_from_fpga.h>
Delta time update.
Public Static Attributes
-
static constexpr size_t
size
= 8
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::timing_from_fpga
::
Systime
- #include <timing_from_fpga.h>
Full systime update.
Public Static Attributes
-
static constexpr size_t
size
= 43
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::to_fpga_jtag
::
Data
- #include <to_fpga_jtag.h>
Data instruction.
Public Static Attributes
-
static constexpr size_t
max_num_bits_payload
= 33
-
static constexpr size_t
min_num_bits_payload
= 3
-
static constexpr size_t
padded_num_bits_keep_response
= hate::math::round_up_to_multiple(1, CHAR_BIT)
-
static constexpr size_t
padded_num_bits_num_bits_payload
= hate::math::round_up_to_multiple(hate::math::num_bits(max_num_bits_payload), CHAR_BIT)
-
static constexpr size_t
padded_num_bits_payload
= hate::math::round_up_to_multiple(max_num_bits_payload, CHAR_BIT)
-
static constexpr size_t
size
= padded_num_bits_payload + padded_num_bits_num_bits_payload + padded_num_bits_keep_response
-
static constexpr size_t
-
class
hxcomm::vx::instruction::to_fpga_jtag::Data
::
Payload
- #include <to_fpga_jtag.h>
Payload of a data instruction.
Public Types
-
typedef rant::integral_range<uint_fast8_t, max_num_bits_payload, min_num_bits_payload>
NumBits
Select the amount of bits of payload field to be shifted in instruction register previously selected by an ins instruction.
Public Functions
-
inline
Payload
(bool const keep_response = false, NumBits const num_bits = NumBits(max_num_bits_payload), hate::bitset<max_num_bits_payload> const payload = 0u)
-
template<class
SubwordType
= unsigned long>
inline voiddecode
(hate::bitset<size, SubwordType> const &data)
-
template<class
SubwordType
= unsigned long>
inline hate::bitset<size, SubwordType>encode
() const
-
inline bool
get_keep_response
() const
-
inline hate::bitset<max_num_bits_payload>
get_payload
() const
-
inline void
set_keep_response
(bool const value)
-
inline void
set_payload
(hate::bitset<max_num_bits_payload> const &value)
-
typedef rant::integral_range<uint_fast8_t, max_num_bits_payload, min_num_bits_payload>
-
struct
hxcomm::vx::instruction::to_fpga_jtag
::
Init
- #include <to_fpga_jtag.h>
Reset state machine.
Public Static Attributes
-
static constexpr size_t
size
= 0
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::to_fpga_jtag
::
Ins
- #include <to_fpga_jtag.h>
Select instruction register on the Hicann.
Public Static Attributes
-
static constexpr size_t
size
= 7
-
static constexpr size_t
-
struct
hxcomm::vx::instruction::to_fpga_jtag
::
Scaler
- #include <to_fpga_jtag.h>
Set slow-down scaling factor of clock of the JTAG communication.
Public Types
-
typedef hxcomm::instruction::detail::payload::Number<Scaler, value_type>
Payload
-
typedef uint8_t
value_type
Public Static Attributes
-
static constexpr size_t
size
= sizeof(value_type) * CHAR_BIT
-
typedef hxcomm::instruction::detail::payload::Number<Scaler, value_type>
-
template<typename
ConnectionParameter
>
classhxcomm
::
ZeroMockConnection
- #include <zeromockconnection.h>
Connection returning zero’ed data on read requests, discarding all other messages.
We do not model experiment prebuffering, i.e. only message processing contributes to the
execution_duration
measurement.- Template Parameters
ConnectionParameter – UT message parameter for connection
Public Types
-
using
message_types
= MessageTypes<ConnectionParameter>
-
using
receive_message_type
= typename message_types::receive_type
-
typedef std::vector<receive_message_type>
receive_queue_type
-
using
send_halt_message_type
= typename message_types::send_halt_type
-
using
send_message_type
= typename message_types::send_type
Public Functions
-
ZeroMockConnection
(long ns_per_message = 8) Construct zero mock connection.
The time spent with processing each incoming message can be adjusted to simulate different data communication speeds.
- Parameters
ns_per_message – Time goal to spent with processing each incoming message. The specified goal may not be reached as it is only an upper bound to the rate of processed messages and the actually reachable performance depends on the used host computer and its load.
-
ZeroMockConnection
(ZeroMockConnection &&other)
-
ZeroMockConnection
(ZeroMockConnection const&) = delete
-
~ZeroMockConnection
() = default
-
std::string
get_bitfile_info
() const Get bitfile information.
Returns “zeromock” for ZeroMockConnection
- Returns
Bitfile info
-
std::string
get_remote_repo_state
() const Get server-side remote repository state information.
Only non-empty for QuiggeldyConnection.
- Returns
Repository state
-
ConnectionTimeInfo
get_time_info
() const Get time information.
- Returns
Time information
-
std::string
get_unique_identifier
(std::optional<std::string> hwdb_path = std::nullopt) const Get unique identifier from hwdb.
- Parameters
hwdb_path – Optional path to hwdb
- Returns
Unique identifier
-
ZeroMockConnection &
operator=
(ZeroMockConnection &&other)
-
ZeroMockConnection &
operator=
(ZeroMockConnection const&) = delete
Public Static Attributes
-
static constexpr char
name
[] = "ZeroMockConnection"
-
static constexpr auto
supported_targets
= {Target::hardware, Target::simulation}
Private Types
-
typedef std::vector<send_message_type>
send_queue_type
Private Functions
-
template<typename
InputIterator
>
voidadd
(InputIterator const &begin, InputIterator const &end) Add multiple UT messages to the send queue.
- Template Parameters
InputIterator – Iterator type to sequence of messages to add
- Parameters
begin – Iterator to beginning of sequence
end – Iterator to end of sequence
-
void
add
(send_message_type const &message) Add a single UT message to the send queue.
- Parameters
message – Message to add
-
void
commit
() Send messages in send queue.
-
std::mutex &
get_mutex
() Get internal mutex to use for mutual exclusion.
- Returns
Mutable reference to mutex
-
receive_queue_type
receive_all
() Receive all UT messages.
- Returns
Received messages
-
bool
receive_empty
() const Get whether the connection has no UT messages available to receive.
- Returns
Boolean value
-
void
run_until_halt
() Start execution and wait until halt instruction.
Private Members
-
bool
m_halt
-
size_t
m_last_message_count
Message count since last
run_until_halt()
invokation used to calculate the amount of time to spend in the current invokation in order to match specified rate of processed UT messages.
-
ConnectionTimeInfo
m_last_time_info
-
long
m_ns_per_message
-
detail::ZeroMockProcessMessage<ConnectionParameter>
m_process_message
-
receive_queue_type
m_receive_queue
-
send_queue_type
m_send_queue
-
ConnectionTimeInfo
m_time_info
-
friend Stream< ZeroMockConnection >
-
namespace
cereal
-
namespace
hate
-
namespace
hxcomm
Typedefs
-
template<typename
ConnectionVariant
>
usingConnectionFullStreamInterfaceVariant
= hate::type_list_to_t<std::variant, hate::filter_type_list_t<hxcomm::supports_full_stream_interface, hate::type_list_from_t<ConnectionVariant>>>
-
template<typename
Connection
>
usingConnectionIsPlainGuard
= std::enable_if_t<ConnectionIsPlain<std::remove_cvref_t<Connection>>::value, int> Indicate whether supplied connection type is a plain Connection object that can be acted upon.
It is intended to be used as a defaulted template argument and needs a default in parameter (e.g. 0).
-
template<typename
Connection
>
usingConnectionIsWrappedGuard
= std::enable_if_t<!ConnectionIsPlain<std::remove_cvref_t<Connection>>::value, int> Indicate whether supplied connection type is wrapped up and needs to be unwrapped in some kind (e.g.
in a variant that needs to be visited).
It is intended to be used as a defaulted template argument and needs a default in parameter (e.g. 0).
-
typedef uint64_t
largest_ut_message_subword_type
Largest SubwordType supported by the UTMessage implementation.
-
typedef uint16_t
port_t
-
template<typename
Connection
>
usingsupports_full_stream_interface
= detail::supports_full_stream_interface<std::decay_t<Connection>> Helper function to distinguish between connections expected to implement the whole Stream interface as above and those with a custom execute_messages-implementation.
Enums
Functions
-
template<typename
Connection
, ConnectionIsWrappedGuard<Connection> = 0>
detail::execute_messages_return_t<Connection>execute_messages
(Connection &&connection, detail::execute_messages_argument_t<Connection> const &messages, bool const keep_responses = false)
-
template<typename
Connection
, ConnectionIsPlainGuard<Connection> = 0>
detail::execute_messages_return_t<Connection>execute_messages
(Connection &connection, detail::execute_messages_argument_t<Connection> const &messages, bool const keep_responses = false) Execute the given messages on the given connection.
This function is specialized for each architecture in the corresponding
hxcomm/<architecture>/execute_messages.h
header or - if needed - in the connection-header itself. This function makes use of Stream, which locks the connection by acquiring the mutex via connection.get_mutex() to ensure mutual exclusion of access.- Template Parameters
Connection – The connection on which the messages are executed.
Sequence – In which sequential container should the messages be stored.
-
std::vector<std::string>
get_fpga_ip_list
() Get list of FPGA IPs available via the environment.
- Returns
Vector of FPGA IPs as strings
-
std::optional<std::size_t>
get_loglevel_from_env
(char const *env_var = "QUIGGELDY_LOGLEVEL") Get an integer representation of the loglevel variable from environment.
If the environmental variable is defined but contains an invalid value, a notification is printed to stderr.
- Parameters
env_var – Name of the environment variable from which to get the loglevel.
- Returns
Integer representation of the loglevel in case it is defined and a valid level.
-
char const *
get_munge_socket
() Get the munge socket to connect to.
- Returns
Path to munge socket to use. Either the default or the one specified via environment.
-
std::tuple<std::string, uint16_t>
get_sim_parameters
() Get simulator IP and port via the environment.
- Returns
Parameters
-
hxcomm::port_t
get_unused_port
() Get a free port number to use for tests, on success, return open port.
On error, throw runtime_error.
-
bool
is_munge_available
() Check for availability of munge by checking if the default munge socket (or the one specified by the environment does exist).
bool is_munge_available).
This is useful to disable munge authentication in testing environments where munge is not running.
- Returns
whether munge is available or not.
-
template<class ...
Args
>
pid_tsetup_quiggeldy
(char const *binary_name, uint16_t port, Args... args) Convenience function to setup quiggeldy under the given port with additional arguments.
- Parameters
binary_name – name of the binary to launch
port – The port on which quiggeldy should listen.
args – Additional arguments to give to quiggeldy (should be C-strings).
- Returns
PID of started subprocess running quiggeldy.
-
void
terminate
(pid_t pid) Terminate given pid.
- Parameters
pid – The quiggeldy PID to terminate.
-
template<typename
Visitor
, typenameConnection
>
detail::VisitConnection<Visitor, Connection>::return_typevisit_connection
(Visitor &&visitor, Connection &&connection) Vist a connection that might be wrapped inside a variant or proxified.
- Parameters
visitor – must be a Callable with templated operator() so that it can be applied to the extracted connection underneath.
connection – The connection to visit.
Variables
-
static constexpr size_t
quiggeldy_max_message_length
= 1280 * 1024 * 1024 Max message length should be at least as long as the FPGA memory filled with results (and then some).
-
template<typename
-
namespace
hxcomm
::
detail
Typedefs
-
template<typename
Connection
>
usingexecute_messages_argument_t
= typename ExecuteMessagesArgumentType<Connection>::type
-
template<typename
Connection
>
usingexecute_messages_return_t
= typename ExecuteMessagesReturnType<Connection>::type
-
template<typename
T
>
usingvariant_to_ref_t
= typename variant_to_ref<T>::type
Variables
-
template<typename ...
Ts
>
static constexpr boolall_char_const_ptr_v
= all_char_const_ptr<Ts...>::value
-
template<typename
-
namespace
instruction
-
namespace
detail
-
namespace
payload
Payload formatting.
Each payload type defines a value_type used for encoding the payload to a bitstream. The encode member function encodes payload data to a bitstream. The decode member fucntion decodes a bitstream to payload data.
-
namespace
hxcomm
::
random
Functions
-
template<typename
PayloadType
>
PayloadTyperandom_payload
(std::mt19937 gen = std::mt19937(std::random_device{}())) Generate a payload type with random value(s).
- Template Parameters
PayloadType – Type of payload
- Parameters
gen – Random number generator
- Returns
Random payload
-
template<typename
Tag
, size_tN
>
hxcomm::instruction::detail::payload::Bitset<Tag, N>random_payload
(type<hxcomm::instruction::detail::payload::Bitset<Tag, N>>, std::mt19937 gen) Generate a Bitset payload type with random value.
- Template Parameters
Tag – Tag of instruction for type-safety
N – Number of bits of Bitset paylaod
- Parameters
gen – Random number generator
- Returns
Random payload
-
template<typename
Tag
, typenameT
>
hxcomm::instruction::detail::payload::Number<Tag, T>random_payload
(type<hxcomm::instruction::detail::payload::Number<Tag, T>>, std::mt19937 gen) Generate a Number payload type with random value.
- Template Parameters
Tag – Tag of instruction for type-safety
T – Number base type
- Parameters
gen – Random number generator
- Returns
Random payload
-
template<typename
PayloadType
>
PayloadTyperandom_payload
(type<PayloadType> proxy, std::mt19937 gen) = delete Generate a payload type with random value(s).
- Template Parameters
PayloadType – Type of payload
- Parameters
proxy – Type proxy to payload type
gen – Random number generator
- Returns
Random payload
-
template<size_t
NumPack
>
hxcomm::vx::instruction::event_from_fpga::MADCSamplePackPayload<NumPack>random_payload
(type<typename hxcomm::vx::instruction::event_from_fpga::MADCSamplePackPayload<NumPack>>, std::mt19937 gen)
-
template<size_t
NumPack
>
hxcomm::vx::instruction::event_from_fpga::SpikePackPayload<NumPack>random_payload
(type<typename hxcomm::vx::instruction::event_from_fpga::SpikePackPayload<NumPack>>, std::mt19937 gen)
-
template<size_t
NumPack
>
hxcomm::vx::instruction::event_to_fpga::SpikePackPayload<NumPack>random_payload
(type<typename hxcomm::vx::instruction::event_to_fpga::SpikePackPayload<NumPack>>, std::mt19937 gen)
-
hxcomm::vx::instruction::omnibus_to_fpga::Address::Payload
random_payload
(type<typename hxcomm::vx::instruction::omnibus_to_fpga::Address::Payload>, std::mt19937 gen)
-
hxcomm::vx::instruction::to_fpga_jtag::Data::Payload
random_payload
(type<typename hxcomm::vx::instruction::to_fpga_jtag::Data::Payload>, std::mt19937 gen)
-
template<typename
PayloadType
>
PayloadTyperandom_payload_non_default
(PayloadType const default_payload = PayloadType(), std::mt19937 gen = std::mt19937(std::random_device{}())) Generate a payload type with random value(s) unequal to provided default value(s).
- Template Parameters
PayloadType – Type of payload
- Parameters
default_payload – Default payload value to exclude from random draw
gen – Random number generator
- Returns
Random payload
-
template<typename
UTMessageParameter
>
autorandom_ut_message
(std::mt19937 &gen) -> typename default_ut_message<UTMessageParameter>::message_type Generate a random UTMessage of the provided dictionary with random payload.
- Template Parameters
UTMessageParameter – Parameter of UTMessage collection
- Parameters
gen – Random number generator
- Returns
Random UT message with random payload
-
template<typename
-
namespace
hxcomm
::
vx
Typedefs
-
using
ARQConnection
= hxcomm::ARQConnection<ConnectionParameter>
-
using
ConnectionFullStreamInterfaceVariant
= hxcomm::ConnectionFullStreamInterfaceVariant<ConnectionVariant>
-
typedef hxcomm::ConnectionParameter<ut_message_to_fpga_header_alignment, ut_message_to_fpga_subword_type, ut_message_to_fpga_phyword_type, instruction::ToFPGADictionary, instruction::system::Loopback, ut_message_from_fpga_header_alignment, ut_message_from_fpga_subword_type, ut_message_from_fpga_phyword_type, instruction::FromFPGADictionary, instruction::from_fpga_system::Loopback, instruction::from_fpga_system::TimeoutNotification, detail::QuiggeldyScheduleOutToInTransform>
ConnectionParameter
-
using
ConnectionVariant
= std::variant<hxcomm::vx::SimConnection, hxcomm::vx::QuiggeldyConnection, hxcomm::vx::ZeroMockConnection>
-
using
quiggeldy_interface_types
= hxcomm::quiggeldy_interface_types<hxcomm::vx::ConnectionParameter>
-
using
QuiggeldyConnection
= hxcomm::QuiggeldyConnection<hxcomm::vx::ConnectionParameter, hxcomm::vx::detail::rcf_client_type>
-
template<typename
Connection
>
usingQuiggeldyServer
= hxcomm::QuiggeldyServer<Connection>
-
template<typename
Connection
>
usingQuiggeldyWorker
= hxcomm::QuiggeldyWorker<Connection>
-
using
ReinitStackEntry
= hxcomm::ReinitStackEntry<hxcomm::vx::QuiggeldyConnection, hxcomm::vx::ConnectionVariant>
-
using
SimConnection
= hxcomm::SimConnection<ConnectionParameter>
-
typedef uint64_t
ut_message_from_fpga_phyword_type
-
typedef uint8_t
ut_message_from_fpga_subword_type
-
typedef uint64_t
ut_message_to_fpga_phyword_type
-
typedef uint64_t
ut_message_to_fpga_subword_type
-
template<typename
I
>
usingUTMessageFromFPGA
= UTMessage<ut_message_from_fpga_header_alignment, ut_message_from_fpga_subword_type, ut_message_from_fpga_phyword_type, instruction::FromFPGADictionary, I>
-
using
UTMessageFromFPGAVariant
= ToUTMessageVariant<ut_message_from_fpga_header_alignment, ut_message_from_fpga_subword_type, ut_message_from_fpga_phyword_type, instruction::FromFPGADictionary>::type
-
template<typename
I
>
usingUTMessageToFPGA
= UTMessage<ut_message_to_fpga_header_alignment, ut_message_to_fpga_subword_type, ut_message_to_fpga_phyword_type, instruction::ToFPGADictionary, I>
-
using
UTMessageToFPGAVariant
= ToUTMessageVariant<ut_message_to_fpga_header_alignment, ut_message_to_fpga_subword_type, ut_message_to_fpga_phyword_type, instruction::ToFPGADictionary>::type
-
using
ZeroMockConnection
= hxcomm::ZeroMockConnection<ConnectionParameter>
Functions
-
hxcomm::vx::ConnectionVariant
get_connection_from_env
() Automatically determine from environment what connection type to use and return the corresponding variant.
Order of precedence is ZeroMockConnection > QuiggeldyConnection > HostARQ-connected hardware > CoSim right now if several are available.
On the Python-side it is wrapped via ManagedConnection.
- Returns
An already allocated connection object.
-
std::optional<hxcomm::vx::ConnectionFullStreamInterfaceVariant>
get_connection_full_stream_interface_from_env
() Get the connection from env and check if it supports the full stream interface.
If so, return it wrapped in an optional, otherwise the optional is empty.
- Returns
Optional wrapping the connection object with support for the full stream interface, empty otherwise.
-
std::vector<hxcomm::vx::ConnectionVariant>
get_connection_list_from_env
(std::optional<size_t> limit = std::nullopt) Automatically determine from environment what connection type to use and return the corresponding variant list.
Order of precedence is HardwareBackend > CoSim right now if both are available.
- Returns
A list of already allocated connection objects.
-
std::tuple<pid_t, hxcomm::port_t>
launch_quiggeldy_locally_from_env
() Launch a local quiggeldy without slurm allocation and debug output based on current env settings.
The environment will be modified so that default constructed QuiggeldyConnection-instances automatically connect to it.
The release idle timeout is set to a day so that for all testing purposes a single connection will be used.
- Returns
Tuple of process ID and port of launched quiggeldy process and the port it is listening on.
-
RRWR_GENERATE_INTERFACE_EXPLICIT_TYPES (I_HXCommQuiggeldyVX, typename quiggeldy_interface_types::response_type, typename quiggeldy_interface_types::request_type, typename quiggeldy_interface_types::reinit_type) namespace detail
-
void
unset_quiggeldy_env
() Unset environment variables of quiggeldy.
-
using
-
namespace
detail
-
namespace
hxcomm::vx
::
instruction
Typedefs
-
typedef hate::multi_concat_t<jtag_from_hicann::Dictionary, omnibus_from_fpga::Dictionary, from_fpga_system::Dictionary, timing_from_fpga::Dictionary, event_from_fpga::Dictionary>
FromFPGADictionary
Dictionary containing all from_fpga instruction subsets.
-
typedef hate::multi_concat_t<to_fpga_jtag::Dictionary, timing::Dictionary, system::Dictionary, omnibus_to_fpga::Dictionary, event_to_fpga::Dictionary>
ToFPGADictionary
Dictionary containing all to_fpga instruction subsets.
-
typedef hate::multi_concat_t<jtag_from_hicann::Dictionary, omnibus_from_fpga::Dictionary, from_fpga_system::Dictionary, timing_from_fpga::Dictionary, event_from_fpga::Dictionary>
-
namespace
hxcomm::vx::instruction
::
event_constants
Constants for event instructions to and from the FPGA.
-
namespace
hxcomm::vx::instruction
::
event_from_fpga
Instructions for events from the FPGA.
Typedefs
-
typedef detail::GenerateDictionary<SpikePack, MADCSamplePack, std::make_index_sequence<event_constants::max_num_packed>>::type
Dictionary
Dictionary of all events from FPGA instructions.
-
typedef detail::GenerateDictionary<SpikePack, MADCSamplePack, std::make_index_sequence<event_constants::max_num_packed>>::type
-
namespace
detail
-
namespace
hxcomm::vx::instruction
::
event_to_fpga
Instructions for events to the FPGA.
Typedefs
-
typedef detail::GenerateDictionary<SpikePack, std::make_index_sequence<event_constants::max_num_packed>>::type
Dictionary
Dictionary of all events to FPGA instructions.
-
typedef detail::GenerateDictionary<SpikePack, std::make_index_sequence<event_constants::max_num_packed>>::type
-
namespace
detail
-
namespace
hxcomm::vx::instruction
::
from_fpga_system
FPGA system responses to the host.
Typedefs
-
typedef hate::type_list<Loopback, HighspeedLinkNotification, TimeoutNotification>
Dictionary
Dictionary of all FPGA system response instructions.
-
typedef hate::type_list<Loopback, HighspeedLinkNotification, TimeoutNotification>
-
namespace
hxcomm::vx::instruction
::
jtag_from_hicann
JTAG responses transported back to the host.
Typedefs
-
typedef hate::type_list<Data>
Dictionary
Dictionary of all jtag_from_hicann instructions.
-
typedef hate::type_list<Data>
-
namespace
hxcomm::vx::instruction
::
omnibus_from_fpga
Omnibus from FPGA responses transported back to the host.
-
namespace
hxcomm::vx::instruction
::
omnibus_to_fpga
Instructions for omnibus communication to the FPGA.
-
namespace
hxcomm::vx::instruction
::
system
Instructions for setting up an experiment.
-
namespace
hxcomm::vx::instruction
::
timing
Instructions controlling the timing of execution of commands.
Typedefs
-
typedef hate::type_list<Setup, WaitUntil, SystimeInit, Barrier, PollingOmnibusBlock>
Dictionary
Dictionary of all timing instructions.
-
typedef hate::type_list<Setup, WaitUntil, SystimeInit, Barrier, PollingOmnibusBlock>
-
namespace
hxcomm::vx::instruction
::
timing_from_fpga
Timing response instructions from the FPGA.
-
namespace
hxcomm::vx::instruction
::
to_fpga_jtag
JTAG instructions to the fpga.
-
namespace
log4cxx
Typedefs
-
typedef std::shared_ptr<Logger>
LoggerPtr
-
typedef std::shared_ptr<Logger>
-
namespace
rcf_extensions
-
namespace
SF
Functions
-
void
serialize
(Archive &ar, hxcomm::vx::quiggeldy_interface_types::reinit_entry_type &qcr)
-
void
serialize
(Archive &ar, hxcomm::vx::quiggeldy_interface_types::request_type &qcr)
-
void
serialize
(Archive &ar, hxcomm::vx::quiggeldy_interface_types::response_type &qcr)
-
void
-
namespace
std
STL namespace.
-
namespace
chrono_literals
-
file
cerealization.h
- #include <>#include <>#include <>#include <>#include <>#include “”
Defines
-
EXPLICIT_INSTANTIATE_CEREAL_SERIALIZE
(CLASS_NAME)
-
-
file
connect_to_remote_parameter_defs.h
- #include <>
-
file
connection.h
- #include “hxcomm/common/target.h”#include “hxcomm/common/to_utmessage_variant.h”#include <>#include <>#include <>
-
file
connection_full_stream_interface_variant.h
- #include “hxcomm/common/stream.h”#include “”#include <>
-
file
connection_registry.h
- #include <>#include <>#include <>
-
file
connection_time_info.h
- #include “”#include <>#include <>
-
file
decoder.h
- #include “hxcomm/common/utmessage.h”#include <>#include <>#include <>#include “”
-
file
encoder.h
- #include “hxcomm/common/utmessage.h”#include <>#include <>#include <>#include “”
-
file
execute_messages.h
- #include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/execute_messages_types.h”#include “hxcomm/common/logger.h”#include “hxcomm/common/stream.h”#include “hxcomm/common/visit_connection.h”#include <>#include <>#include <>#include “”
-
file
execute_messages_types.h
- #include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “”#include <>#include <>
-
file
fpga_ip_list.h
- #include “”#include <>#include <>#include <>
-
file
get_repo_state.h
- #include “”#include <>
-
file
largest_utmessage_size.h
- #include “”#include <>
-
file
listener_halt.h
- #include <>
-
file
logger.h
- #include <>
-
file
loopbackconnection.h
- #include “hxcomm/common/decoder.h”#include “hxcomm/common/encoder.h”#include “hxcomm/common/utmessage.h”#include <>#include <>#include <>#include <>#include <>#include <>#include “”
-
file
payload.h
- #include “”#include “”#include <>#include <>
-
file
quiggeldy_common.h
- #include “”#include <>
-
file
quiggeldy_future.h
- #include <>#include “”
-
file
reinit_stack.h
- #include “hxcomm/common/quiggeldy_interface_types.h”#include <>#include <>#include “”
-
file
sf_serialization.h
- #include <>#include <>#include “”#include “”#include “”#include “”#include “”#include “hxcomm/common/logger.h”
-
file
signal.h
- #include “”#include <>
-
file
sim_parameters.h
- #include “”#include <>#include <>#include <>
-
file
stream.h
- #include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/execute_messages_types.h”#include <>#include <>
-
file
stream_rc.h
- #include “hxcomm/common/connection.h”#include “hxcomm/common/execute_messages_types.h”#include <>#include <>
-
file
to_utmessage_variant.h
- #include “”#include <>
-
file
utmessage_header_width.h
- #include “”#include “”
-
file
visit_connection.h
- #include <>#include <>#include <>#include <>#include <>
-
file
arqconnection.h
- #include “”#include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/connection_registry.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/decoder.h”#include “hxcomm/common/encoder.h”#include “hxcomm/common/listener_halt.h”#include “hxcomm/common/stream.h”#include “hxcomm/common/target.h”#include “hxcomm/common/utmessage.h”#include “”#include “”#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include “”
-
file
arqconnection.h
- #include “”#include “hxcomm/common/arqconnection.h”#include “hxcomm/vx/connection_parameter.h”
-
file
connection_from_env.h
- #include “”#include “hxcomm/vx/connection_variant.h”#include <>#include <>
-
file
connection_parameter.h
- #include <>
-
file
connection_parameter.h
- #include “hxcomm/common/connection_parameter.h”#include “hxcomm/vx/utmessage.h”
-
file
connection_variant.h
-
#include “hxcomm/vx/quiggeldy_connection.h”#include “hxcomm/vx/simconnection.h”#include “hxcomm/vx/zeromockconnection.h”#include <>
-
file
ensure_local_quiggeldy.h
- #include “”#include <>
-
file
event_constants.h
- #include <>
-
file
event_from_fpga.h
- #include “”#include “”#include “”#include “hxcomm/common/payload.h”#include “hxcomm/vx/instruction/event_constants.h”#include <>
-
file
event_to_fpga.h
- #include “”#include “”#include “”#include “hxcomm/common/payload.h”#include “hxcomm/vx/instruction/event_constants.h”#include <>
-
file
from_fpga_system.h
- #include “”#include “hxcomm/common/payload.h”#include <>
-
file
instruction.h
- #include “hxcomm/vx/instruction/event_from_fpga.h”#include “hxcomm/vx/instruction/event_to_fpga.h”#include “hxcomm/vx/instruction/from_fpga_system.h”#include “hxcomm/vx/instruction/jtag_from_hicann.h”#include “hxcomm/vx/instruction/omnibus_from_fpga.h”#include “hxcomm/vx/instruction/omnibus_to_fpga.h”#include “hxcomm/vx/instruction/system.h”#include “hxcomm/vx/instruction/timing.h”#include “hxcomm/vx/instruction/timing_from_fpga.h”#include “hxcomm/vx/instruction/to_fpga_jtag.h”
-
file
jtag_from_hicann.h
- #include “”#include “hxcomm/common/payload.h”
-
file
omnibus_from_fpga.h
- #include “”#include “hxcomm/common/payload.h”#include <>
-
file
omnibus_to_fpga.h
- #include “”#include “”#include “hxcomm/common/payload.h”#include <>
-
file
system.h
- #include “”#include “hxcomm/common/payload.h”
-
file
timing.h
- #include “”#include “hxcomm/common/payload.h”#include <>
-
file
timing_from_fpga.h
- #include “”#include “hxcomm/common/payload.h”#include <>
-
file
to_fpga_jtag.h
- #include “”#include “”#include “”#include “hxcomm/common/payload.h”#include “”#include <>
-
file
payload_random.h
- #include “hxcomm/common/payload.h”#include <>
-
file
payload_random.h
- #include “”#include “hxcomm/common/payload_random.h”#include “hxcomm/vx/instruction/event_from_fpga.h”#include “hxcomm/vx/instruction/event_to_fpga.h”#include “hxcomm/vx/instruction/omnibus_to_fpga.h”#include “hxcomm/vx/instruction/to_fpga_jtag.h”
-
file
quiggeldy_connection.h
- #include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/execute_messages.h”#include “hxcomm/common/quiggeldy_future.h”#include “hxcomm/common/quiggeldy_interface_types.h”#include “hxcomm/common/reinit_stack.h”#include “hxcomm/common/stream.h”#include “hxcomm/common/stream_rc.h”#include “hxcomm/common/target.h”#include “”#include “”#include “”#include <>#include <>#include <>#include <>#include <>#include “”
-
file
quiggeldy_connection.h
- #include “hxcomm/common/quiggeldy_connection.h”#include “hxcomm/vx/quiggeldy_rcf.h”
-
file
quiggeldy_interface_types.h
- #include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/execute_messages.h”#include <>#include <>#include <>
-
file
quiggeldy_interface_types.h
- #include “hxcomm/common/quiggeldy_interface_types.h”#include “hxcomm/vx/connection_parameter.h”
-
file
quiggeldy_rcf.h
- #include “”#include “”#include “”#include “”#include “”#include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/sf_serialization.h”#include “hxcomm/vx/connection_parameter.h”#include “hxcomm/vx/quiggeldy_interface_types.h”#include “”#include “”#include <>#include <>
-
file
quiggeldy_schedule_out_to_in_transform.h
- #include “”#include “hxcomm/vx/utmessage.h”#include <>
-
file
quiggeldy_server.h
- #include “hxcomm/common/quiggeldy_worker.h”#include “”#include <>#include <>#include <>#include <>
-
file
quiggeldy_server.h
- #include “hxcomm/common/quiggeldy_server.h”#include “hxcomm/vx/quiggeldy_rcf.h”
-
file
quiggeldy_utility.h
- #include “”#include <>#include <>#include <>#include “hxcomm/common/logger.h”#include “”
-
file
quiggeldy_utility.h
- #include “”#include “hxcomm/common/quiggeldy_utility.h”#include “hxcomm/vx/quiggeldy_server.h”#include “hxcomm/vx/quiggeldy_worker.h”#include “hxcomm/vx/simconnection.h”#include “”
-
file
quiggeldy_worker.h
- #include “hxcomm/common/quiggeldy_interface_types.h”#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include “”
-
file
quiggeldy_worker.h
- #include “hxcomm/common/quiggeldy_worker.h”
-
file
reinit_stack_entry.h
- #include “”#include “”#include “hxcomm/common/logger.h”#include “hxcomm/common/quiggeldy_interface_types.h”#include “hxcomm/common/stream_rc.h”#include <>#include <>#include <>#include <>#include <>#include “”
-
file
reinit_stack_entry.h
- #include “hxcomm/common/reinit_stack_entry.h”#include “hxcomm/vx/connection_variant.h”#include “hxcomm/vx/quiggeldy_connection.h”
-
file
simconnection.h
- #include “”#include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/connection_registry.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/decoder.h”#include “hxcomm/common/encoder.h”#include “hxcomm/common/listener_halt.h”#include “hxcomm/common/signal.h”#include “hxcomm/common/stream.h”#include “hxcomm/common/target.h”#include “hxcomm/common/utmessage.h”#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include <>#include “”
-
file
simconnection.h
- #include “”#include “hxcomm/common/simconnection.h”#include “hxcomm/vx/connection_parameter.h”
-
file
target.h
-
file
target.h
- #include “hxcomm/common/target.h”
-
file
utmessage.h
- #include “”#include “”#include “”#include “”#include “hxcomm/common/largest_utmessage_size.h”#include “hxcomm/common/to_utmessage_variant.h”#include “hxcomm/common/utmessage_header_width.h”#include “”
-
file
utmessage.h
- #include “hxcomm/common/utmessage.h”#include “hxcomm/vx/utmessage_fwd.h”
-
file
utmessage_fwd.h
- #include “hxcomm/common/to_utmessage_variant.h”#include “hxcomm/vx/instruction/instruction.h”
-
file
utmessage_random.h
- #include “hxcomm/common/payload_random.h”#include “hxcomm/common/utmessage.h”
-
file
utmessage_random.h
- #include “hxcomm/common/utmessage_random.h”#include “hxcomm/vx/payload_random.h”
-
file
zeromockconnection.h
- #include “”#include “hxcomm/common/connection.h”#include “hxcomm/common/connection_time_info.h”#include “hxcomm/common/stream.h”#include “hxcomm/common/target.h”#include “hxcomm/common/utmessage.h”#include <>#include <>#include <>#include “”
-
file
zeromockconnection.h
- #include “”#include “hxcomm/common/zeromockconnection.h”#include “hxcomm/vx/connection_parameter.h”
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm/include/hxcomm/common
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm/include/hxcomm
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm/include
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm/include/hxcomm/vx/instruction
-
dir
/jenkins/jenlib_workspaces_f9/doc_gerrit_documentation-brainscales2-dependencies.ZG9jX2dlcnJpdF9kb2N1bWVudGF0aW9uLWJyYWluc2NhbGVzMi1kZXBlbmRlbmNpZXMjMTI5NjI.x/hxcomm/include/hxcomm/vx