Skip to content

Commit 134f309

Browse files
committed
Adding support to the TB for AT model of the filter module
1 parent 7c197d8 commit 134f309

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

modules/filter/src/tb_filter.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ void run_image()
114114
#else
115115
Filter<IPS_IN_TYPE_TB, IPS_OUT_TYPE_TB, IPS_FILTER_KERNEL_SIZE> filter("filter");
116116
#endif // IPS_DUMP_EN
117+
#ifdef IPS_FILTER_AT_EN
118+
filter.img_window(s_img_window);
119+
filter.result(s_result);
120+
#endif // IPS_FILTER_AT_EN
117121

118122
sc_start();
119123

@@ -128,7 +132,7 @@ void run_image()
128132
for (x = 0; x < image.cols - IPS_FILTER_KERNEL_SIZE; ++x)
129133
{
130134
#ifdef IPS_DEBUG_EN
131-
//SC_REPORT_INFO("TEST_MODE_IMAGE", "filtering");
135+
SC_REPORT_INFO("TEST_MODE_IMAGE", "filtering");
132136
#endif // IPS_DEBUG_EN
133137

134138
// Define the ROI
@@ -141,12 +145,12 @@ void run_image()
141145
{
142146
img_window[i * IPS_FILTER_KERNEL_SIZE + j] = sub_img.at<IPS_IN_TYPE_TB>(i, j);
143147
#ifdef IPS_DEBUG_EN
144-
//std::cout << "[" << img_window[i * IPS_FILTER_KERNEL_SIZE + j] << "]";
148+
std::cout << "[" << img_window[i * IPS_FILTER_KERNEL_SIZE + j] << "]";
145149
#endif // IPS_DEBUG_EN
146150
}
147151

148152
#ifdef IPS_DEBUG_EN
149-
//std::cout << std::endl;
153+
std::cout << std::endl;
150154
#endif // IPS_DEBUG_EN
151155
}
152156

@@ -157,14 +161,15 @@ void run_image()
157161
filter.filter(img_window, &result);
158162
sc_start(DELAY_TIME + 10, SC_NS);
159163
#elif defined(IPS_FILTER_AT_EN)
164+
s_img_window.write(img_window);
160165
filter.filter();
161166
sc_start(DELAY_TIME + 10, SC_NS);
162167

163168
result = s_result.read();
164169
#endif // IPS_FILTER_XX_EN
165170

166171
#ifdef IPS_DEBUG_EN
167-
//std::cout << "Result[" << x << "][" << y << "] = " << result << std::endl << std::endl;
172+
std::cout << "Result[" << x << "][" << y << "] = " << result << std::endl << std::endl;
168173
#endif // IPS_DEBUG_EN
169174
}
170175
}

0 commit comments

Comments
 (0)