@@ -17,7 +17,7 @@ package redmule_pkg;
1717 parameter int unsigned NumByte = MemDw/ 8 ;
1818 parameter int unsigned ADDR_W = hci_package :: DEFAULT_AW ;
1919 parameter int unsigned DATAW = DATA_W ;
20- parameter int unsigned REDMULE_REGS = 27 ;
20+ parameter int unsigned REDMULE_REGS = 7 ;
2121 parameter int unsigned N_CONTEXT = 2 ;
2222 parameter fpnew_pkg :: fp_format_e FPFORMAT = fpnew_pkg :: FP16 ;
2323 parameter int unsigned BITW = fpnew_pkg :: fp_width (FPFORMAT );
@@ -58,67 +58,6 @@ package redmule_pkg;
5858 parameter int unsigned MACFG = 5 ; // 0x14
5959 // Reduction initialization values addr
6060 parameter int unsigned R_ADDR_R = 6 ; // 0x18
61- /* *********************
62- ** Final RF indexing **
63- **********************/
64- // Number of iterations on X and W matrices
65- // (15 bits for number of rows iterations, 15 bits for number of columns iterations)
66- parameter int unsigned X_ITERS = 3 ; // 0x0C --> [31:16] -> ROWS ITERATIONS, [15:0] -> COLUMNS ITERATIONS
67- parameter int unsigned W_ITERS = 4 ; // 0x10 --> [31:16] -> ROWS ITERATIONS, [15:0] -> COLUMNS ITERATIONS
68- // Number of rows and columns leftovers (8 bits for each)
69- // [31:24] -> X/Y ROWS LEFTOVERS
70- // [23:16] -> X COLUMNS LEFTOVERS
71- // [15:8] -> W ROWS LEFTOVERS
72- // [7:0] -> W/Y COLUMNS LEFTOVERS
73- parameter int unsigned LEFTOVERS = 5 ; // 0x14
74- // We keep a register for the remaining params
75- // [31:16] -> TOT_NUMBER_OF_STORES
76- // [14] -> 1'b0: X cols/W rows >= ARRAY_HEIGHT; 1'b1: X cols/W rows < ARRAY_HEIGHT
77- // [13] -> 1'b0: W cols >= TILE ( TILE = (PIPE_REGS + 1)*ARRAY_HEIGHT ); 1'b1: W cols < TILE ( TILE = (PIPE_REGS + 1)*ARRAY_HEIGHT )
78- parameter int unsigned LEFT_PARAMS = 6 ; // 0x18
79- parameter int unsigned X_D1_STRIDE = 7 ; // 0x1C
80- parameter int unsigned W_TOT_LEN = 8 ; // 0x20
81- parameter int unsigned TOT_X_READ = 9 ; // 0x24
82- parameter int unsigned W_D0_STRIDE = 10 ; // 0x28
83- parameter int unsigned Z_TOT_LEN = 11 ; // 0x2C
84- parameter int unsigned Z_D0_STRIDE = 12 ; // 0x30
85- parameter int unsigned Z_D2_STRIDE = 13 ; // 0x34
86- parameter int unsigned X_ROWS_OFFS = 14 ; // 0x38
87- parameter int unsigned X_SLOTS = 15 ; // 0x3C
88- parameter int unsigned IN_TOT_LEN = 16 ; // 0x40
89-
90- // One register is used for the round modes and operations of the Computing Elements.
91- // [31:29] -> roundmode of the stage 1
92- // [28:26] -> roundmode of the stage 2
93- // [25:21] -> operation of the stage 1
94- // [20:16] -> operation of the stage 2
95- // [15:13] -> input/output format
96- // [12:10] -> computing format
97- // [1:1] -> pace mode
98- // [0:0] -> GEMM selection
99- parameter int unsigned OP_SELECTION = 17 ; // 0x44
100-
101- parameter int unsigned M_SIZE = 18 ; // 0x48
102- parameter int unsigned N_SIZE = 19 ; // 0x4C
103- parameter int unsigned K_SIZE = 20 ; // 0x50
104- parameter int unsigned R_ADDR = 21 ; // 0x54
105-
106- // [2:1] -> reduction operation
107- // [0:0] -> init enable
108- parameter int unsigned R_CONF = 22 ; // 0x58
109-
110- // X/W Streams configuration
111- // [3:3] -> Send X
112- // [2:2] -> Receive X
113- // [1:1] -> Send W
114- // [0:0] -> Receive W
115- parameter int unsigned STREAM_CONF = 23 ; // 0x5C
116-
117- `ifdef PACE_ENABLED
118- parameter int unsigned PACE_IN_ADDR = 24 ; // 0x60
119- parameter int unsigned PACE_OUT_ADDR = 25 ; // 0x68
120- parameter int unsigned PACE_D0_LENGTH = 26 ; // 0x6C
121- `endif
12261
12362 parameter bit [6 : 0 ] MCNFIG = 7'b0001011 ; // 0x0B
12463 parameter bit [6 : 0 ] MARITH = 7'b0101011 ; // 0x2B
0 commit comments