Skip to content

Commit fbe4ac0

Browse files
committed
Improving LT model to have dynamic time to wait for module response
1 parent b00346a commit fbe4ac0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

modules/filter/include/ips_filter_lt_model.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ void Filter<IN, OUT, N>::filter(IN* img_window, OUT* result)
120120
for (j = 0; j < N; ++j)
121121
this->img_window_tmp[i * N + j] = (OUT) img_window[i * N + j];
122122

123-
// N * N * copy_pixel_to_mem_time + mult + redux + copy_pixel_to_mem_time
124-
// Image is copied pixel by pixel
125-
const float DELAY_TIME = (N * N * 1) + 4 + 2 + 1;
126123
this->event.notify(DELAY_TIME, SC_NS);
127124
}
128125

modules/filter/src/tb_filter.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#define IPS_OUT_TYPE_TB float
1717
#endif // IPS_OUT_TYPE_TB
1818

19+
#ifndef IPS_FILTER_PV_EN
20+
// N * N * copy_pixel_to_mem_time + mult + redux + copy_pixel_to_mem_time
21+
// Image is copied pixel by pixel
22+
#define DELAY_TIME = (IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE * 1) + 4 + 2 + 1;
23+
#endif // IPS_FILTER_PV_EN
24+
1925
#ifdef IPS_FILTER_AT_EN
2026
#include "ips_filter_at_model.hpp"
2127
#elif defined(IPS_FILTER_LT_EN)
@@ -103,7 +109,9 @@ void run_one_window()
103109
filter.filter(img_window, result);
104110
#elif defined(IPS_FILTER_LT_EN)
105111
filter.filter(img_window, &result);
106-
sc_start(100, SC_NS);
112+
sc_start(DELAY_TIME + 10, SC_NS);
113+
#elif defined(IPS_FILTER_AT_EN)
114+
sc_start(DELAY_TIME + 10, SC_NS);
107115
#endif // IPS_FILTER_XX_EN
108116

109117
#ifdef IPS_DEBUG_EN

0 commit comments

Comments
 (0)