Parameterized implementation of a network packet.
More...
#include <nvhls_packet.h>
|
enum | {
data_width = DataWidth
, dest_width_per_hop = DestWidthPerHop
, dest_width = DestWidthPerHop * MaxHops
, packet_id_width = PacketIdWidth
,
width = data_width + dest_width + packet_id_width
, data_start_bit = 0
, data_end_bit = data_width - 1
, dest_start_bit = data_end_bit + 1
,
dest_end_bit = dest_start_bit + dest_width - 1
, packet_id_start_bit = dest_end_bit + 1
, packet_id_end_bit = packet_id_start_bit + packet_id_width - 1
} |
|
|
| Packet (const Packet &other) |
|
Packet & | operator= (const Packet &other) |
|
void | reset () |
|
| NVUINTW (data_width) data |
|
| NVUINTW (dest_width) dest |
|
| NVUINTW (packet_id_width) packet_id |
|
template<unsigned int Size> |
void | Marshall (Marshaller< Size > &m) |
|
template<int DataWidth, int DestWidthPerHop, int MaxHops = 1, int PacketIdWidth = 0>
class Packet< DataWidth, DestWidthPerHop, MaxHops, PacketIdWidth >
Parameterized implementation of a network packet.
- Template Parameters
-
DataWidth | Width of data field in a packet. |
DestWidthPerHop | Number of bits required to encode destination field for one hop in a packet. |
MaxHops | Maximum number of hops. For source routing, this field is used along with DestWidthPerHop field to calculate total width of destination field to be encoded in a packet. (default: 1) |
PacketIdWidth | Width of packet id field. PacketID acts a an identified for every hop in a packet. (default: 0) |
- Overview
- Packet class is a generalized implementation of a network packet. Packet Format: <PACKET-ID>:<DEST>:<DATA>
- PacketID field is optional and can be removed by setting PacketIdWidth to 0.
- A Simple Example
#include <nvhls_packet.h>
...
Packet_t packet;
packet.data = 0xdeadbeef;
packet.dest = 0xde
...
Parameterized implementation of a network packet.
Definition at line 71 of file nvhls_packet.h.
The documentation for this class was generated from the following file: