-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.v
39 lines (33 loc) · 1.7 KB
/
global.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Global Variable
`ifndef _GLOBAL_PARA_V
`define _GLOBAL_PARA_V
// Port Arragement
// 5-BYPASS 4-LOCAL; 3-N; 2-S; 1-E; 0-W;
`define CURRENT_POS_X `WIDTH_COORDINATE'd0
`define CURRENT_POS_Y `WIDTH_COORDINATE'd0
`define SIZE_NETWORK 16
`define NUM_PORT 6 // Include Pypass
`define LOG_NUM_PORT 3 // = Celling (log2 (NUM_PORT))
`define WIDTH_DATA 128
`define WIDTH_CTRL 24
`define WIDTH_PORT `WIDTH_DATA+`WIDTH_CTRL
//`define WIDTH_PORT_NI `WIDTH_DATA+`WIDTH_CTRL
`define WIDTH_INTERNAL `WIDTH_PORT+1 // has 1-valid bit
`define WIDTH_INTERNAL_PV `WIDTH_PORT+1+`WIDTH_PV // has 1-valid bit + 5-bit PV
`define WIDTH_XBAR `WIDTH_PORT
`define WIDTH_TIME 8
`define WIDTH_COORDINATE 4 // support up to 16 nodes in each dimension
`define WIDTH_FLITID 2
`define WIDTH_PKTID 6
`define WIDTH_PV `NUM_PORT // width of productive vector
//`define WIDTH_RESERVE 3
//`define WIDTH_RESERVE `WIDTH_CTRL-`WIDTH_COORDINATE*2-`WIDTH_TIME-`WIDTH_FLITID-`WIDTH_PKTID-`WIDTH_PV
`define MAX_TIME 127
`define POS_Y_DST `WIDTH_DATA+`WIDTH_COORDINATE-1 : `WIDTH_DATA
`define POS_X_DST `WIDTH_DATA+2*`WIDTH_COORDINATE-1 : `WIDTH_DATA+`WIDTH_COORDINATE
`define POS_TIME `WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME-1 : `WIDTH_DATA+2*`WIDTH_COORDINATE
`define POS_FLITID `WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME+`WIDTH_FLITID-1:`WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME
`define POS_PKTID `WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME+`WIDTH_FLITID+`WIDTH_PKTID-1: `WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME+`WIDTH_FLITID
`define POS_PV `WIDTH_INTERNAL_PV-1:`WIDTH_INTERNAL_PV-`WIDTH_PV
//`define POS_PV `WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME+`WIDTH_FLITID+`WIDTH_PKTID+`WIDTH_PV-1:`WIDTH_DATA+2*`WIDTH_COORDINATE+`WIDTH_TIME+`WIDTH_FLITID+`WIDTH_PKTID
`endif