diff --git a/codeGenerator/local_search.py b/codeGenerator/local_search.py
index 6e0e311..893a7e7 100644
--- a/codeGenerator/local_search.py
+++ b/codeGenerator/local_search.py
@@ -22,15 +22,15 @@ def conv_layer_perf(n, m, r, s, k, Tn, Tm, P_const, Tr, Tc):
lat_read = math.ceil((min(Tn, n)/float(8))) * ((Tr-1)*s + k) * ((Tr-1)*s + k)
# lat_read = 0
if n == 3:
- lat_com = Tr * Tc * math.ceil(k*2)
+ lat_com = Tr * Tc * math.ceil(k*k/2)
else:
lat_com = Tr * Tc * k * k
- lat_out = math.ceil(Tm/float(8)) * math.ceil(Tr/2) * math.ceil(Tc/2)
+ lat_out = math.ceil(Tm/float(8)) * math.ceil(Tr) * math.ceil(Tc)
# lat_out = 0
# tmp = R_iter * R_iter * M_iter * (lat_read + N_iter*lat_com + lat_out)
# tmp = R_iter * R_iter * M_iter * N_iter * lat_com
- tmp = R_iter * R_iter * M_iter * ((N_iter + 1) * max(lat_read, lat_com) + lat_out)
+ tmp = R_iter * R_iter * M_iter * (lat_read + (N_iter) * max(lat_read, lat_com) + lat_out)
return tmp
@@ -76,7 +76,7 @@ def conv_net_perf(N, M, R, S, K, flag, Tn, Tm, P_const, Tr, Tc):
for j in range(0, int(len(N))):
if flag[j] == True:
tmp += conv_layer_perf(N[j], M[j], R[j], S[j], K[j], Tn, Tm, P_const, Tr, Tc)
- tmp += pool_layer_perf(M[j], R[j], K[j], Tm, P_const)
+ # tmp += pool_layer_perf(M[j], R[j], K[j], Tm, P_const)
else:
tmp += conv_layer_perf(N[j], M[j], R[j], S[j], K[j], Tn, Tm, P_const, Tr, Tc)
return tmp
@@ -178,7 +178,7 @@ def per_die_config_dse_multiAcc_flex(sub_conv_N, sub_conv_M, sub_conv_r, sub_con
# k: the index to split the sub_conv_N
for k in split_sub_net(0, len(sub_conv_N[i]), j):
- DSP = 6840 / 3 * 2
+ DSP = 6840 / 3
dsp_list = []
local_cycle_list = []
local_pair_list = []
diff --git a/example/test_demo.lenet.multinet/.idea/misc.xml b/example/test_demo.lenet.multinet/.idea/misc.xml
index 6789c22..ebedef3 100644
--- a/example/test_demo.lenet.multinet/.idea/misc.xml
+++ b/example/test_demo.lenet.multinet/.idea/misc.xml
@@ -6,14 +6,4 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/test_demo.lenet.multinet/.idea/test_demo.iml b/example/test_demo.lenet.multinet/.idea/test_demo.iml
index 4744597..f08604b 100644
--- a/example/test_demo.lenet.multinet/.idea/test_demo.iml
+++ b/example/test_demo.lenet.multinet/.idea/test_demo.iml
@@ -1,15 +1,2 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/example/test_demo.lenet.multinet/.idea/workspace.xml b/example/test_demo.lenet.multinet/.idea/workspace.xml
index a3cb48b..9f57296 100644
--- a/example/test_demo.lenet.multinet/.idea/workspace.xml
+++ b/example/test_demo.lenet.multinet/.idea/workspace.xml
@@ -1,19 +1,18 @@
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
@@ -24,7 +23,6 @@
-
@@ -33,8 +31,8 @@
-
-
+
+
@@ -43,13 +41,11 @@
-
-
+
+
-
-
-
+
@@ -58,8 +54,8 @@
-
-
+
+
@@ -70,10 +66,10 @@
-
-
+
+
-
+
@@ -92,8 +88,8 @@
-
+
@@ -104,22 +100,12 @@
DEFINITION_ORDER
-
+
-
-
-
-
-
-
-
-
-
-
@@ -135,54 +121,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -195,12 +134,26 @@
-
-
+
+
+
+
+
-
-
+
+
+
+
@@ -256,15 +209,6 @@
-
- project
-
-
-
-
-
-
-
@@ -377,18 +321,14 @@
-
-
-
-
-
+
+ project
+
+
+
+
-
-
-
-
-
@@ -452,11 +392,12 @@
+
-
+
@@ -468,29 +409,32 @@
-
+
-
+
-
-
+
-
+
+
-
+
+
-
+
-
+
+
+
@@ -517,28 +461,28 @@
-
+
-
+
-
+
-
+
@@ -548,9 +492,9 @@
-
+
-
+
@@ -558,56 +502,56 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -617,9 +561,9 @@
-
+
-
+
@@ -627,49 +571,49 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -679,9 +623,9 @@
-
+
-
+
@@ -689,42 +633,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -734,9 +678,9 @@
-
+
-
+
@@ -744,42 +688,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -789,9 +733,9 @@
-
+
-
+
@@ -799,28 +743,28 @@
-
+
-
+
-
+
-
+
@@ -828,49 +772,49 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -879,31 +823,29 @@
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
-
+
diff --git a/example/test_demo.lenet.multinet/inference_net/acc_instance.h b/example/test_demo.lenet.multinet/inference_net/acc_instance.h
index ba2cc7c..303b338 100644
--- a/example/test_demo.lenet.multinet/inference_net/acc_instance.h
+++ b/example/test_demo.lenet.multinet/inference_net/acc_instance.h
@@ -12,7 +12,7 @@
using namespace std;
-conv_acc convAcc1;
+conv_acc convAcc1;
void conv_layer_acc_1(
const int N,
diff --git a/example/test_demo.lenet.multinet/inference_net/conv_acc_innerpp.h b/example/test_demo.lenet.multinet/inference_net/conv_acc_innerpp.h
index 9ab7d8c..aadbb6d 100644
--- a/example/test_demo.lenet.multinet/inference_net/conv_acc_innerpp.h
+++ b/example/test_demo.lenet.multinet/inference_net/conv_acc_innerpp.h
@@ -731,16 +731,16 @@ class conv_acc
#pragma HLS resource variable=out_buf_1 core=XPM_MEMORY uram
#pragma HLS ARRAY_PARTITION variable = in_buf_0 complete dim = 1
-#pragma HLS ARRAY_PARTITION variable = w_buf_0 complete
-//#pragma HLS ARRAY_PARTITION variable = w_buf_0 complete dim = 2
+#pragma HLS ARRAY_PARTITION variable = w_buf_0 complete dim = 1
+#pragma HLS ARRAY_PARTITION variable = w_buf_0 complete dim = 2
//#pragma HLS ARRAY_PARTITION variable = w_buf_0 complete dim = 4
#pragma HLS ARRAY_PARTITION variable = b_buf_0 complete
#pragma HLS ARRAY_PARTITION variable = out_buf_0 complete dim = 1
//II=4 depth=61 // II=2 Depth=65
#pragma HLS ARRAY_PARTITION variable = in_buf_1 complete dim = 1
-#pragma HLS ARRAY_PARTITION variable = w_buf_1 complete
-//#pragma HLS ARRAY_PARTITION variable = w_buf_1 complete dim = 2
+#pragma HLS ARRAY_PARTITION variable = w_buf_1 complete dim = 1
+#pragma HLS ARRAY_PARTITION variable = w_buf_1 complete dim = 2
//#pragma HLS ARRAY_PARTITION variable = w_buf_1 complete dim = 4
#pragma HLS ARRAY_PARTITION variable = b_buf_1 complete
#pragma HLS ARRAY_PARTITION variable = out_buf_1 complete dim = 1
@@ -783,7 +783,7 @@ class conv_acc
i_data_0, i_data_1, i_data_2, i_data_3, i_data_4, i_data_5, i_data_6, i_data_7,
in_offset, n, r, c, S, K, P, R_IN, C_IN, N);
//------------------------------compute buffered data -----------------------------------//
- conv_engine(in_buf_1, w_buf_1, b_buf_1, out_buf_0, S, n-Tn, N, r, c, K, R_OUT, C_OUT, 0, 0);
+ conv_iq(in_buf_1, w_buf_1, b_buf_1, out_buf_0, S, n-Tn, N, r, c, K, R_OUT, C_OUT, 0, 0);
} else {
//--------------------------Load input B W D in ping-pong manner-------------------------//
b_buf_load(b_buf_1, layer_bias, bias_offset, m);
@@ -795,7 +795,7 @@ class conv_acc
i_data_0, i_data_1, i_data_2, i_data_3, i_data_4, i_data_5, i_data_6, i_data_7,
in_offset, n, r, c, S, K, P, R_IN, C_IN, N);
//------------------------------compute buffered data -----------------------------------//
- conv_engine(in_buf_0, w_buf_0, b_buf_0, out_buf_0, S, n-Tn, N, r, c, K, R_OUT, C_OUT, 0, 0);
+ conv_iq(in_buf_0, w_buf_0, b_buf_0, out_buf_0, S, n-Tn, N, r, c, K, R_OUT, C_OUT, 0, 0);
}
com_0 = !com_0;
#if _C_DEBUG_MODE_