CGRA-ME
Macros | Functions
HyCUBE.cpp File Reference
#include <CGRA/Exception.h>
#include <CGRA/user-inc/UserArchs.h>
#include <CGRA/user-inc/UserModules.h>
#include <vector>

Go to the source code of this file.

Macros

#define has_input_from_N(conn)   (conn & 0b00000001)
 
#define has_input_from_E(conn)   (conn & 0b00000010)
 
#define has_input_from_S(conn)   (conn & 0b00000100)
 
#define has_input_from_W(conn)   (conn & 0b00001000)
 
#define has_input_from_NW(conn)   (conn & 0b00010000)
 
#define has_input_from_NE(conn)   (conn & 0b00100000)
 
#define has_input_from_SE(conn)   (conn & 0b01000000)
 
#define has_input_from_SW(conn)   (conn & 0b10000000)
 
#define is_top_pe(r, c, rows, cols)   (r == 0)
 
#define is_bot_pe(r, c, rows, cols)   (r == rows-1)
 
#define is_leftmost_pe(r, c, rows, cols)   (c == 0)
 
#define is_rightmost_pe(r, c, rows, cols)   (c == cols-1)
 
#define mask_top_pe(conn)   ((conn & 0b11001111) | 0b00000001)
 
#define mask_bot_pe(conn)   ((conn & 0b00111111) | 0b00000100)
 
#define mask_leftmost_pe(conn)   ((conn & 0b01101111) | 0b00001000)
 
#define mask_rightmost_pe(conn)   ((conn & 0b10011111) | 0b00000010)
 
#define mask_top_pred(conn)   ((conn & 0b11001111) | 0b00000001)
 
#define mask_bot_pred(conn)   ((conn & 0b00111111) | 0b00000100)
 
#define mask_leftmost_pred(conn)   ((conn & 0b01100111))
 
#define mask_rightmost_pred(conn)   ((conn & 0b10011111) | 0b00000010)
 
#define mask_rightmost_pred_mem(conn)   ((conn & 0b10011101))
 
#define mask_top_event_pred(conn)   ((conn & 0b11001111) | 0b00000001)
 

Functions

int leftshift2 (int val)
 
void fillPEConnArray (std::vector< std::vector< std::vector< int > > > &pcv, int pe_conn_orig, int rows, int cols, bool pred, bool extra_mem=false, std::string pred_scheme="")
 

Macro Definition Documentation

◆ has_input_from_E

#define has_input_from_E (   conn)    (conn & 0b00000010)

Definition at line 22 of file HyCUBE.cpp.

◆ has_input_from_N

#define has_input_from_N (   conn)    (conn & 0b00000001)

Definition at line 21 of file HyCUBE.cpp.

◆ has_input_from_NE

#define has_input_from_NE (   conn)    (conn & 0b00100000)

Definition at line 26 of file HyCUBE.cpp.

◆ has_input_from_NW

#define has_input_from_NW (   conn)    (conn & 0b00010000)

Definition at line 25 of file HyCUBE.cpp.

◆ has_input_from_S

#define has_input_from_S (   conn)    (conn & 0b00000100)

Definition at line 23 of file HyCUBE.cpp.

◆ has_input_from_SE

#define has_input_from_SE (   conn)    (conn & 0b01000000)

Definition at line 27 of file HyCUBE.cpp.

◆ has_input_from_SW

#define has_input_from_SW (   conn)    (conn & 0b10000000)

Definition at line 28 of file HyCUBE.cpp.

◆ has_input_from_W

#define has_input_from_W (   conn)    (conn & 0b00001000)

Definition at line 24 of file HyCUBE.cpp.

◆ is_bot_pe

#define is_bot_pe (   r,
  c,
  rows,
  cols 
)    (r == rows-1)

Definition at line 32 of file HyCUBE.cpp.

◆ is_leftmost_pe

#define is_leftmost_pe (   r,
  c,
  rows,
  cols 
)    (c == 0)

Definition at line 33 of file HyCUBE.cpp.

◆ is_rightmost_pe

#define is_rightmost_pe (   r,
  c,
  rows,
  cols 
)    (c == cols-1)

Definition at line 34 of file HyCUBE.cpp.

◆ is_top_pe

#define is_top_pe (   r,
  c,
  rows,
  cols 
)    (r == 0)

Definition at line 31 of file HyCUBE.cpp.

◆ mask_bot_pe

#define mask_bot_pe (   conn)    ((conn & 0b00111111) | 0b00000100)

Definition at line 38 of file HyCUBE.cpp.

◆ mask_bot_pred

#define mask_bot_pred (   conn)    ((conn & 0b00111111) | 0b00000100)

Definition at line 43 of file HyCUBE.cpp.

◆ mask_leftmost_pe

#define mask_leftmost_pe (   conn)    ((conn & 0b01101111) | 0b00001000)

Definition at line 39 of file HyCUBE.cpp.

◆ mask_leftmost_pred

#define mask_leftmost_pred (   conn)    ((conn & 0b01100111))

Definition at line 44 of file HyCUBE.cpp.

◆ mask_rightmost_pe

#define mask_rightmost_pe (   conn)    ((conn & 0b10011111) | 0b00000010)

Definition at line 40 of file HyCUBE.cpp.

◆ mask_rightmost_pred

#define mask_rightmost_pred (   conn)    ((conn & 0b10011111) | 0b00000010)

Definition at line 45 of file HyCUBE.cpp.

◆ mask_rightmost_pred_mem

#define mask_rightmost_pred_mem (   conn)    ((conn & 0b10011101))

Definition at line 46 of file HyCUBE.cpp.

◆ mask_top_event_pred

#define mask_top_event_pred (   conn)    ((conn & 0b11001111) | 0b00000001)

Definition at line 48 of file HyCUBE.cpp.

◆ mask_top_pe

#define mask_top_pe (   conn)    ((conn & 0b11001111) | 0b00000001)

Definition at line 37 of file HyCUBE.cpp.

◆ mask_top_pred

#define mask_top_pred (   conn)    ((conn & 0b11001111) | 0b00000001)

Definition at line 42 of file HyCUBE.cpp.

Function Documentation

◆ fillPEConnArray()

void fillPEConnArray ( std::vector< std::vector< std::vector< int > > > &  pcv,
int  pe_conn_orig,
int  rows,
int  cols,
bool  pred,
bool  extra_mem = false,
std::string  pred_scheme = "" 
)

Definition at line 56 of file HyCUBE.cpp.

◆ leftshift2()

int leftshift2 ( int  val)

Definition at line 50 of file HyCUBE.cpp.