@@ -26,10 +26,13 @@ void dense_resource_rf_leq_nin(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::
26
26
assert ((multiplier_limit == block_factor) && " This function is correct only for RF <= N_IN" );
27
27
28
28
#pragma HLS function_instantiate variable=weights,biases
29
- // #pragma HLS RESOURCE variable=weights core=RAM_2P_BRAM Commenting out the deisgnation HLS seems to choose correctly
30
29
#pragma HLS ARRAY_RESHAPE variable=weights block factor=block_factor
31
30
#pragma HLS ARRAY_PARTITION variable=biases complete
32
31
32
+ if (CONFIG_T::reuse_factor > 1 ) {
33
+ #pragma HLS RESOURCE variable=weights core=ROM_nP_BRAM
34
+ }
35
+
33
36
typename CONFIG_T::accum_t acc[CONFIG_T::n_out];
34
37
#pragma HLS ARRAY_PARTITION variable=acc complete
35
38
@@ -97,10 +100,13 @@ void dense_resource_rf_gt_nin_rem0(data_T data[CONFIG_T::n_in], res_T res[CONFIG
97
100
assert ((rufactor > nin && rufactor % nin == 0 ) && " This function is correct only for RF > N_IN && RF % N_IN == 0" );
98
101
99
102
#pragma HLS function_instantiate variable=weights,biases
100
- // #pragma HLS RESOURCE variable=weights core=RAM_2P_BRAM Commenting out the deisgnation HLS seems to choose correctly
101
103
#pragma HLS ARRAY_RESHAPE variable=weights block factor=block_factor
102
104
#pragma HLS ARRAY_PARTITION variable=biases complete
103
105
106
+ if (CONFIG_T::reuse_factor > 1 ) {
107
+ #pragma HLS RESOURCE variable=weights core=ROM_nP_BRAM
108
+ }
109
+
104
110
typename CONFIG_T::accum_t acc[CONFIG_T::n_out];
105
111
#pragma HLS ARRAY_PARTITION variable=acc complete
106
112
@@ -176,10 +182,13 @@ void dense_resource_rf_gt_nin(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n
176
182
assert ((rufactor > nin) && " This function is correct only for RF > N_IN" );
177
183
178
184
#pragma HLS function_instantiate variable=weights,biases
179
- // #pragma HLS RESOURCE variable=weights core=RAM_2P_BRAM Commenting out the deisgnation HLS seems to choose correctly
180
185
#pragma HLS ARRAY_RESHAPE variable=weights block factor=block_factor
181
186
#pragma HLS ARRAY_PARTITION variable=biases complete
182
187
188
+ if (CONFIG_T::reuse_factor > 1 ) {
189
+ #pragma HLS RESOURCE variable=weights core=ROM_nP_BRAM
190
+ }
191
+
183
192
typename CONFIG_T::accum_t acc[CONFIG_T::n_out];
184
193
#pragma HLS ARRAY_PARTITION variable=acc complete
185
194
0 commit comments