MatchLib
Public Types | Public Member Functions | Public Attributes | List of all members
Flit< DataWidth, DestWidthPerHop, MaxHops, PacketIdWidth, FlitId, StoreForward > Class Template Reference

Parameterized implementation of a network flit. More...

#include <nvhls_packet.h>

Inheritance diagram for Flit< DataWidth, DestWidthPerHop, MaxHops, PacketIdWidth, FlitId, StoreForward >:
nvhls_message

Public Types

enum  {
  data_width = DataWidth, dest_width_per_hop = DestWidthPerHop, dest_width = DestWidthPerHop * MaxHops, packet_id_width = PacketIdWidth,
  flit_id_width = FlitId::width, width = data_width + dest_width + packet_id_width + flit_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,
  flit_id_start_bit = packet_id_end_bit + 1, flit_id_end_bit = flit_id_start_bit + flit_id_width - 1
}
 

Public Member Functions

 Flit (const Flit &other)
 
Flitoperator= (const Flit &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)
 

Public Attributes

FlitId flit_id
 

Detailed Description

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
DataWidthWidth of data field in a flit.
DestWidthPerHopNumber of bits required to encode destination field for one hop in a packet.
MaxHopsMaximum 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)
PacketIdWidthWidth 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; // Initialize data
flit.flit_id.set(FlitId2bit::BODY);
...

Definition at line 284 of file nvhls_packet.h.


The documentation for this class was generated from the following file: