template<int DataWidth, int DestWidthPerHop, int MaxHops, int PacketIdWidth, class FlitId>
class Flit< DataWidth, DestWidthPerHop, MaxHops, PacketIdWidth, FlitId, StoreForward >
Parameterized implementation of a network flit.
- Template Parameters
-
| DataWidth | Width of data field in a flit. |
| 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
- Flit class implements a parameterized network flit.
- Flit format varies based on the type of router.
- StoreForward router flit format: <FlitID>:<PACKET-ID>:<DEST>:<DATA>
- Wormhole router flit format: <FlitID>:<PACKET-ID>:<DATA>. <DEST> is encoded in header flit.
- PacketID field is optional and can be removed by setting PacketIdWidth to 0.
- A Simple Example
#include <nvhls_packet.h>
...
Flit_t flit;
flit.data = 0xdeadbeef;
flit.flit_id.set(FlitId2bit::BODY);
...
Definition at line 284 of file nvhls_packet.h.
template<int DataWidth, int DestWidthPerHop, int MaxHops, int PacketIdWidth, class FlitId >
template<unsigned int Size>
| void Flit< DataWidth, DestWidthPerHop, MaxHops, PacketIdWidth, FlitId, StoreForward >::Marshall |
( |
Marshaller< Size > & |
m | ) |
|
|
inline |