Loading hls_2018/router_03/bitstream/router_design.bit (3.86 MiB) File changed.No diff preview for this file type. View original file View changed file hls_2018/router_03/bitstream/router_design_old.bit +x+3.86 MiB File added.No diff preview for this file type. View file hls_2018/router_03/bitstream/router_design_old.tcl +x+1113 File added.Preview size limit exceeded, changes collapsed. Show changes hls_2018/router_03/router.cpp +11 −2 Changes for hls_2018/router_03/router.cpp: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat // Memories for Overlap Check ap_uint<1> overlap_checks[MAX_CELLS]; #pragma HLS ARRAY_PARTITION variable=overlap_checks cyclic factor=32 dim=1 bool has_overlap = false; // ================================ Loading Loading @@ -188,6 +189,7 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat // (Step.2-1) Reset weights of target line WEIGHT_RESET: for (ap_uint<BUFF_BIT> j = s_idx[target]; j != s_idx[next_target]; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=256 weights[paths[j]] = 1; } Loading @@ -196,11 +198,13 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat ap_uint<8> current_round_weight = new_weight(round); WEIGHT_PATH: for (ap_uint<BUFF_BIT> j = s_idx[next_target]; j != pointer; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=8192 weights[paths[j]] = current_round_weight; } WEIGHT_TERMINAL: for (ap_uint<LINE_BIT> i = 0; i < (ap_uint<LINE_BIT>)(line_num); i++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=2 max=999 weights[starts[i]] = MAX_WEIGHT; weights[goals[i]] = MAX_WEIGHT; Loading Loading @@ -230,16 +234,19 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat has_overlap = false; OVERLAP_RESET: for (ap_uint<CELL_BIT> i = 0; i < (ap_uint<CELL_BIT>)(MAX_CELLS); i++) { #pragma HLS UNROLL factor=32 overlap_checks[i] = 0; } OVERLAP_CHECK_LINE: for (ap_uint<LINE_BIT> i = 0; i < (ap_uint<LINE_BIT>)(line_num); i++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=2 max=999 overlap_checks[starts[i]] = 1; overlap_checks[goals[i]] = 1; } OVERLAP_CHECK_PATH: for (ap_uint<BUFF_BIT> j = s_idx[next_target]; j != pointer; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=8192 ap_uint<CELL_BIT> cell_id = paths[j]; if (overlap_checks[cell_id]) { Loading Loading @@ -340,10 +347,12 @@ ap_uint<3> abs_uint3(ap_uint<3> a, ap_uint<3> b) { ap_uint<BUFF_BIT> search(ap_uint<BUFF_BIT> idx, ap_uint<CELL_BIT> paths[MAX_BUFFER], ap_uint<CELL_BIT> start, ap_uint<CELL_BIT> goal, ap_uint<8> w[MAX_CELLS]) { ap_uint<CELL_BIT> dist[MAX_CELLS]; #pragma HLS ARRAY_PARTITION variable=dist cyclic factor=64 dim=1 ap_uint<CELL_BIT> prev[MAX_CELLS]; SEARCH_INIT_DIST: for (ap_uint<CELL_BIT> i = 0; i < (ap_uint<CELL_BIT>)(MAX_CELLS); i++) { #pragma HLS UNROLL factor=64 dist[i] = 65535; // = (2^16 - 1) } Loading Loading @@ -459,7 +468,7 @@ void pq_push(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> priority, ap_uint<16> dat ap_uint<PQ_BIT> p = (*pq_len) >> 1; // parent node PQ_PUSH_LOOP: while (i > 1 && (ap_uint<16>)(pq_nodes[p] & PQ_PRIORITY_MASK) >= priority) { #pragma HLS LOOP_TRIPCOUNT min=0 max=15 #pragma HLS LOOP_TRIPCOUNT min=0 max=14 /** Set!: min=0 max=PQ_BIT **/ pq_nodes[i] = pq_nodes[p]; i = p; Loading @@ -482,7 +491,7 @@ void pq_pop(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> *ret_priority, ap_uint<16> PQ_POP_LOOP: while (!(i >> (PQ_BIT-1))) { // (2018.08.24) Loop condition fixed #pragma HLS LOOP_TRIPCOUNT min=1 max=15 #pragma HLS LOOP_TRIPCOUNT min=1 max=14 /** Set!: min=0 max=PQ_BIT **/ ap_uint<PQ_BIT> c1 = i << 1; // child node(left) ap_uint<PQ_BIT> c2 = c1 + 1; // child node(right) Loading hls_2018/router_03/router.hpp +2 −2 Changes for hls_2018/router_03/router.hpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -29,11 +29,11 @@ using namespace std; #define MAX_CELLS 41472 // Max #cells (16bit) #define MAX_LINES 1024 // Max #lines (10bit) #define MAX_PQ 32768 // Queue size (15bit) #define MAX_PQ 16384 // Queue size (14bit) #define MAX_BUFFER 16384 // Line buffer size (14bit) #define CELL_BIT 16 #define LINE_BIT 10 #define PQ_BIT 15 #define PQ_BIT 14 #define BUFF_BIT 14 #define PQ_PRIORITY_WIDTH 16 Loading Loading
hls_2018/router_03/bitstream/router_design.bit (3.86 MiB) File changed.No diff preview for this file type. View original file View changed file
hls_2018/router_03/bitstream/router_design_old.bit +x+3.86 MiB File added.No diff preview for this file type. View file
hls_2018/router_03/bitstream/router_design_old.tcl +x+1113 File added.Preview size limit exceeded, changes collapsed. Show changes
hls_2018/router_03/router.cpp +11 −2 Changes for hls_2018/router_03/router.cpp: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat // Memories for Overlap Check ap_uint<1> overlap_checks[MAX_CELLS]; #pragma HLS ARRAY_PARTITION variable=overlap_checks cyclic factor=32 dim=1 bool has_overlap = false; // ================================ Loading Loading @@ -188,6 +189,7 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat // (Step.2-1) Reset weights of target line WEIGHT_RESET: for (ap_uint<BUFF_BIT> j = s_idx[target]; j != s_idx[next_target]; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=256 weights[paths[j]] = 1; } Loading @@ -196,11 +198,13 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat ap_uint<8> current_round_weight = new_weight(round); WEIGHT_PATH: for (ap_uint<BUFF_BIT> j = s_idx[next_target]; j != pointer; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=8192 weights[paths[j]] = current_round_weight; } WEIGHT_TERMINAL: for (ap_uint<LINE_BIT> i = 0; i < (ap_uint<LINE_BIT>)(line_num); i++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=2 max=999 weights[starts[i]] = MAX_WEIGHT; weights[goals[i]] = MAX_WEIGHT; Loading Loading @@ -230,16 +234,19 @@ bool pynqrouter(char boardstr[BOARDSTR_SIZE], ap_uint<32> seed, ap_int<32> *stat has_overlap = false; OVERLAP_RESET: for (ap_uint<CELL_BIT> i = 0; i < (ap_uint<CELL_BIT>)(MAX_CELLS); i++) { #pragma HLS UNROLL factor=32 overlap_checks[i] = 0; } OVERLAP_CHECK_LINE: for (ap_uint<LINE_BIT> i = 0; i < (ap_uint<LINE_BIT>)(line_num); i++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=2 max=999 overlap_checks[starts[i]] = 1; overlap_checks[goals[i]] = 1; } OVERLAP_CHECK_PATH: for (ap_uint<BUFF_BIT> j = s_idx[next_target]; j != pointer; j++) { #pragma HLS UNROLL factor=2 #pragma HLS LOOP_TRIPCOUNT min=1 max=8192 ap_uint<CELL_BIT> cell_id = paths[j]; if (overlap_checks[cell_id]) { Loading Loading @@ -340,10 +347,12 @@ ap_uint<3> abs_uint3(ap_uint<3> a, ap_uint<3> b) { ap_uint<BUFF_BIT> search(ap_uint<BUFF_BIT> idx, ap_uint<CELL_BIT> paths[MAX_BUFFER], ap_uint<CELL_BIT> start, ap_uint<CELL_BIT> goal, ap_uint<8> w[MAX_CELLS]) { ap_uint<CELL_BIT> dist[MAX_CELLS]; #pragma HLS ARRAY_PARTITION variable=dist cyclic factor=64 dim=1 ap_uint<CELL_BIT> prev[MAX_CELLS]; SEARCH_INIT_DIST: for (ap_uint<CELL_BIT> i = 0; i < (ap_uint<CELL_BIT>)(MAX_CELLS); i++) { #pragma HLS UNROLL factor=64 dist[i] = 65535; // = (2^16 - 1) } Loading Loading @@ -459,7 +468,7 @@ void pq_push(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> priority, ap_uint<16> dat ap_uint<PQ_BIT> p = (*pq_len) >> 1; // parent node PQ_PUSH_LOOP: while (i > 1 && (ap_uint<16>)(pq_nodes[p] & PQ_PRIORITY_MASK) >= priority) { #pragma HLS LOOP_TRIPCOUNT min=0 max=15 #pragma HLS LOOP_TRIPCOUNT min=0 max=14 /** Set!: min=0 max=PQ_BIT **/ pq_nodes[i] = pq_nodes[p]; i = p; Loading @@ -482,7 +491,7 @@ void pq_pop(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> *ret_priority, ap_uint<16> PQ_POP_LOOP: while (!(i >> (PQ_BIT-1))) { // (2018.08.24) Loop condition fixed #pragma HLS LOOP_TRIPCOUNT min=1 max=15 #pragma HLS LOOP_TRIPCOUNT min=1 max=14 /** Set!: min=0 max=PQ_BIT **/ ap_uint<PQ_BIT> c1 = i << 1; // child node(left) ap_uint<PQ_BIT> c2 = c1 + 1; // child node(right) Loading
hls_2018/router_03/router.hpp +2 −2 Changes for hls_2018/router_03/router.hpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -29,11 +29,11 @@ using namespace std; #define MAX_CELLS 41472 // Max #cells (16bit) #define MAX_LINES 1024 // Max #lines (10bit) #define MAX_PQ 32768 // Queue size (15bit) #define MAX_PQ 16384 // Queue size (14bit) #define MAX_BUFFER 16384 // Line buffer size (14bit) #define CELL_BIT 16 #define LINE_BIT 10 #define PQ_BIT 15 #define PQ_BIT 14 #define BUFF_BIT 14 #define PQ_PRIORITY_WIDTH 16 Loading