Ensō 0.4.5
Software API reference
Loading...
Searching...
No Matches
consts.h File Reference

Constants used throughout the codebase. Some of these constants need to be kept in sync with the hardware. More...

#include <cstdint>
#include <string>

Go to the source code of this file.

Classes

struct  enso::MmioNotification
 
struct  enso::FallbackNotification
 
struct  enso::RoundRobinNotification
 
struct  enso::NotifBufNotification
 
struct  enso::AllocatePipeNotification
 
struct  enso::FreePipeNotification
 
struct  enso::PipeNotification
 

Macros

#define MAX_NB_APPS   1024
 
#define MAX_NB_FLOWS   8192
 
#define NOTIFICATION_BUF_SIZE   16384
 
#define ENSO_PIPE_SIZE   32768
 

Enumerations

enum class  NotifType : uint8_t {
  kWrite = 0 , kRead = 1 , kTranslAddr = 2 , kAllocatePipe = 3 ,
  kAllocateNotifBuf = 4 , kGetNbFallbackQueues = 5 , kSetRrStatus = 6 , kGetRrStatus = 7 ,
  kFreeNotifBuf = 8 , kFreePipe = 9
}
 

Variables

constexpr uint32_t enso::kMaxNbApps = MAX_NB_APPS
 
constexpr uint32_t enso::kMaxNbFlows = MAX_NB_FLOWS
 
constexpr uint32_t enso::kMaxTransferLen = 131072
 
constexpr uint32_t enso::kBatchSize = 64
 
constexpr uint32_t enso::kNotificationBufSize = NOTIFICATION_BUF_SIZE
 
constexpr uint32_t enso::kEnsoPipeSize = ENSO_PIPE_SIZE
 
constexpr uint32_t enso::kMaxPendingTxRequests = kNotificationBufSize - 1
 
constexpr uint32_t enso::kBufPageSize = 1UL << 21
 
constexpr uint32_t enso::kAlignedDscBufPairSize
 
constexpr uint32_t enso::kNsPerTimestampCycle = 5
 The clock period of the timestamp module in nanoseconds.
 
constexpr uint32_t enso::kPacketRttOffset = 18
 Offset of the RTT when timestamp is enabled (in bytes).
 
constexpr uint32_t enso::kMaxHardwareFlitRate = 200e6
 Maximum number of flits (64 byte chunks) that the hardware can send per second.
 
constexpr uint32_t enso::kMemorySpacePerQueue = 1 << 12
 
constexpr uint32_t enso::kCacheLineSize = 64
 

Detailed Description

Constants used throughout the codebase. Some of these constants need to be kept in sync with the hardware.

Author
Hugo Sadok sadok.nosp@m.@cmu.nosp@m..edu

Definition in file consts.h.

Macro Definition Documentation

◆ ENSO_PIPE_SIZE

#define ENSO_PIPE_SIZE   32768

Definition at line 75 of file consts.h.

◆ MAX_NB_APPS

#define MAX_NB_APPS   1024

Definition at line 54 of file consts.h.

◆ MAX_NB_FLOWS

#define MAX_NB_FLOWS   8192

Definition at line 55 of file consts.h.

◆ NOTIFICATION_BUF_SIZE

#define NOTIFICATION_BUF_SIZE   16384

Definition at line 68 of file consts.h.

Enumeration Type Documentation

◆ NotifType

enum class enso::NotifType : uint8_t
strong

Definition at line 138 of file consts.h.

Variable Documentation

◆ kAlignedDscBufPairSize

constexpr uint32_t enso::kAlignedDscBufPairSize
constexpr
Initial value:
=
((kNotificationBufSize * 64 * 2 - 1) / kBufPageSize + 1) * kBufPageSize

Sizes aligned to the huge page size, but if both buffers fit in a single page, we may put them in the same page.

Definition at line 103 of file consts.h.

◆ kBatchSize

constexpr uint32_t enso::kBatchSize = 64
constexpr

Definition at line 63 of file consts.h.

◆ kBufPageSize

constexpr uint32_t enso::kBufPageSize = 1UL << 21
constexpr

Definition at line 82 of file consts.h.

◆ kCacheLineSize

constexpr uint32_t enso::kCacheLineSize = 64
constexpr

Definition at line 129 of file consts.h.

◆ kEnsoPipeSize

constexpr uint32_t enso::kEnsoPipeSize = ENSO_PIPE_SIZE
constexpr

Definition at line 77 of file consts.h.

◆ kMaxHardwareFlitRate

constexpr uint32_t enso::kMaxHardwareFlitRate = 200e6
constexpr

Maximum number of flits (64 byte chunks) that the hardware can send per second.

This is simply the clock frequency of the rate_limiter module.

Definition at line 125 of file consts.h.

◆ kMaxNbApps

constexpr uint32_t enso::kMaxNbApps = MAX_NB_APPS
constexpr

Definition at line 57 of file consts.h.

◆ kMaxNbFlows

constexpr uint32_t enso::kMaxNbFlows = MAX_NB_FLOWS
constexpr

Definition at line 58 of file consts.h.

◆ kMaxPendingTxRequests

constexpr uint32_t enso::kMaxPendingTxRequests = kNotificationBufSize - 1
constexpr

Definition at line 79 of file consts.h.

◆ kMaxTransferLen

constexpr uint32_t enso::kMaxTransferLen = 131072
constexpr

Definition at line 60 of file consts.h.

◆ kMemorySpacePerQueue

constexpr uint32_t enso::kMemorySpacePerQueue = 1 << 12
constexpr

Definition at line 127 of file consts.h.

◆ kNotificationBufSize

constexpr uint32_t enso::kNotificationBufSize = NOTIFICATION_BUF_SIZE
constexpr

Definition at line 70 of file consts.h.

◆ kNsPerTimestampCycle

constexpr uint32_t enso::kNsPerTimestampCycle = 5
constexpr

The clock period of the timestamp module in nanoseconds.

This assumes that the FPGA clk_datamover runs at 200MHz. If we change this clock, we must also change this value.

Definition at line 112 of file consts.h.

◆ kPacketRttOffset

constexpr uint32_t enso::kPacketRttOffset = 18
constexpr

Offset of the RTT when timestamp is enabled (in bytes).

Definition at line 117 of file consts.h.