|
CIRCT 22.0.0git
|
#include <Ports.h>

Public Member Functions | |
| ConnectOptions (std::optional< unsigned > bufferSize=std::nullopt, bool translateMessage=true) | |
Public Attributes | |
| std::optional< unsigned > | bufferSize = std::nullopt |
| The buffer size is optional and should be considered merely a hint. | |
| bool | translateMessage = true |
| If the type of this port is a window, translate the incoming/outgoing data into its underlying ('into') type. | |
|
inline |
| std::optional<unsigned> esi::ChannelPort::ConnectOptions::bufferSize = std::nullopt |
The buffer size is optional and should be considered merely a hint.
Individual implementations use it however they like. The unit is number of messages of the port type.
Definition at line 45 of file Ports.h.
Referenced by NB_MODULE().
| bool esi::ChannelPort::ConnectOptions::translateMessage = true |
If the type of this port is a window, translate the incoming/outgoing data into its underlying ('into') type.
For 'into' types without lists, just re-arranges the data fields from the lowered type to the 'into' type.
If this option is false, no translation is done and the data is passed through as-is. Same is true for non-windowed types.
For messages with lists, only two types are supported: 1) Parallel encoding includes any 'header' data with each frame. Said header data is the same across all frames, so this encoding is inefficient but is commonly used for on-chip streaming interfaces. Each frame contains a 'last' field to indicate the end of the list. In cases where 'numItems' is greater than 1, a field named '<listField>_size' indicates the number of valid items in that frame. 2) Serial (bulk transfer) encoding, where a 'header' frame precedes the list data frame. Said header frame contains a 'count' field indicating the number of items in the list. Importantly, the header frame is always re-transmitted after the specified number of list items have been sent. If the 'count' field is zero, the end of the list has been reached. If it is non-zero, the message has not been completely transmitted and reading should continue until a 'count' of zero is received.
In both cases, the host-side MessageData contains the complete header followed by the list data. In other words, header data is not duplicated in the returned message. So for a windowed type with header fields and a list of (x,y) coordinates, the host memory layout would be:
In a parallel encoding, each frame's wire format (from hardware) is:
Important note: for consistency, preserves SystemVerilog struct field ordering! So it's the opposite of C struct ordering.
Implementation status:
See the CIRCT documentation (or td files) for more details on windowed messages.
Definition at line 104 of file Ports.h.
Referenced by esi::ReadChannelPort::connect(), esi::ReadChannelPort::connect(), and NB_MODULE().