From a155657bfd5f3de23a5e151997c308c98f9413c8 Mon Sep 17 00:00:00 2001 From: Kazushi Kawamura Date: Fri, 24 Aug 2018 23:48:38 +0900 Subject: [PATCH] Bug fixed (in pq_pop func.) --- hls_2018/README.md | 37 ++++++++++++++++++++++++++++++++++- hls_2018/router_03/router.cpp | 2 +- hls_2018/router_04/router.cpp | 2 +- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/hls_2018/README.md b/hls_2018/README.md index 3994d6f..9785b00 100644 --- a/hls_2018/README.md +++ b/hls_2018/README.md @@ -27,5 +27,40 @@ Options: * Input/Output: boardstr(8bit\*41472), seed(32bit), &status(32bit), return(1bit) ## Results -TODO +|Q|heap(seed:0)|c-array(seed:0)| +|:---|:---|:---| +|01|1|1| +|02|1|1| +|03|1|1| +|04|1|1| +|05|1|1| +|06|1|1| +|07|1|1| +|08|1|1| +|09|1|1| +|10|1|1| +|11|1|1| +|12|1|1| +|13|1|1| +|14|1|1| +|15|1|1| +|16|1|1| +|17|1|1| +|18|1|1| +|19|1|1| +|20|1|1| +|21|1|1| +|22|1|1| +|23|1|1| +|24|1|1| +|25|1|1| +|26|1|1| +|27|1|1| +|28|1|1| +|29|1|1| +|30|1|1| +|31|1|1| +|32|1|1| +|33|1|1| +|34|1|1| diff --git a/hls_2018/router_03/router.cpp b/hls_2018/router_03/router.cpp index adf00df..0a21b17 100755 --- a/hls_2018/router_03/router.cpp +++ b/hls_2018/router_03/router.cpp @@ -481,7 +481,7 @@ void pq_pop(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> *ret_priority, ap_uint<16> ap_uint last_priority = (ap_uint<16>)(pq_nodes[*pq_len] & PQ_PRIORITY_MASK); // Priority of last element PQ_POP_LOOP: - while (1) { + while (!(i >> (PQ_BIT-1))) { // (2018.08.24) Loop condition fixed #pragma HLS LOOP_TRIPCOUNT min=1 max=15 /** Set!: min=0 max=PQ_BIT **/ ap_uint c1 = i << 1; // child node(left) diff --git a/hls_2018/router_04/router.cpp b/hls_2018/router_04/router.cpp index 81804e0..2fde0ec 100755 --- a/hls_2018/router_04/router.cpp +++ b/hls_2018/router_04/router.cpp @@ -481,7 +481,7 @@ void pq_pop(ap_uint<32> pq_nodes[MAX_PQ], ap_uint<16> *ret_priority, ap_uint<16> ap_uint last_priority = (ap_uint<16>)(pq_nodes[*pq_len] & PQ_PRIORITY_MASK); // Priority of last element PQ_POP_LOOP: - while (1) { + while (!(i >> (PQ_BIT-1))) { // (2018.08.24) Loop condition fixed #pragma HLS LOOP_TRIPCOUNT min=1 max=16 /** Set!: min=0 max=PQ_BIT **/ ap_uint c1 = i << 1; // child node(left) -- 2.22.0