|
69 | 69 | //#endif // IPS_DUMP_EN |
70 | 70 | // |
71 | 71 | // // Variables |
72 | | -// sc_uint<8> * img_window; |
73 | | -// sc_uint<8> result; |
| 72 | +// sc_uint<8>* img_window; |
| 73 | +// sc_uint<8> result; |
74 | 74 | // |
75 | 75 | // int i, j; |
76 | 76 | // int x, y; |
77 | 77 | // |
78 | | -// sc_signal<sc_uint<8> > s_img_window[IPS_FILTER_KERNEL_SIZE*IPS_FILTER_KERNEL_SIZE]; |
79 | | -// sc_signal<sc_uint<8> > s_result; |
| 78 | +// sc_signal<sc_uint<8>> s_img_window[IPS_FILTER_KERNEL_SIZE*IPS_FILTER_KERNEL_SIZE]; |
| 79 | +// sc_signal<sc_uint<8>> s_result; |
80 | 80 | // |
81 | 81 | // // Initialize image window |
82 | | -// img_window = new sc_uint<8> [IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE]; |
| 82 | +// img_window = new sc_uint<8>[IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE]; |
83 | 83 | // |
84 | 84 | // // Instantiate filter module and do the connection |
85 | 85 | //#ifdef IPS_DUMP_EN |
|
128 | 128 | // { |
129 | 129 | // for (j = 0; j < IPS_FILTER_KERNEL_SIZE; ++j) |
130 | 130 | // { |
131 | | -// img_window[i * IPS_FILTER_KERNEL_SIZE + j] = sub_img.at<sc_uint<8> >(i, j); |
| 131 | +// img_window[i * IPS_FILTER_KERNEL_SIZE + j] = sub_img.at<sc_uint<8>>(i, j); |
132 | 132 | //#ifdef IPS_DEBUG_EN |
133 | 133 | // std::cout << "[" << img_window[i * IPS_FILTER_KERNEL_SIZE + j] << "]"; |
134 | 134 | //#endif // IPS_DEBUG_EN |
|
146 | 146 | // |
147 | 147 | // result = s_result.read(); |
148 | 148 | // |
149 | | -// o_img.at<sc_uint<8> >(y, x) = result; |
| 149 | +// o_img.at<sc_uint<8>>(y, x) = result; |
150 | 150 | // |
151 | 151 | //#ifdef IPS_DEBUG_EN |
152 | | -// std::cout << "Result[" << x << "][" << y << "] = " << o_img.at<sc_uint<8> >(y, x) << std::endl << std::endl; |
| 152 | +// std::cout << "Result[" << x << "][" << y << "] = " << o_img.at<sc_uint<8>>(y, x) << std::endl << std::endl; |
153 | 153 | //#endif // IPS_DEBUG_EN |
154 | 154 | // } |
155 | 155 | // } |
|
189 | 189 | //#endif // IPS_DEBUG_EN |
190 | 190 | // |
191 | 191 | // // Variables |
192 | | -// sc_uint<8> * img_window; |
193 | | -// sc_uint<8> result; |
| 192 | +// sc_uint<8>* img_window; |
| 193 | +// sc_uint<8> result; |
194 | 194 | // |
195 | | -// sc_signal<sc_uint<8> > s_img_window; |
196 | | -// sc_signal<sc_uint<8> > s_result; |
| 195 | +// sc_signal<sc_uint<8>> s_img_window; |
| 196 | +// sc_signal<sc_uint<8>> s_result; |
197 | 197 | // |
198 | 198 | // // Instantiate filter module and do the connection |
199 | 199 | //#ifdef IPS_DUMP_EN |
|
221 | 221 | //#endif // IPS_DEBUG_EN |
222 | 222 | // |
223 | 223 | // // Initialize image window |
224 | | -// img_window = new sc_uint<8> [IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE]; |
| 224 | +// img_window = new sc_uint<8>[IPS_FILTER_KERNEL_SIZE * IPS_FILTER_KERNEL_SIZE]; |
225 | 225 | // |
226 | 226 | // for (size_t i = 0; i < IPS_FILTER_KERNEL_SIZE; ++i) |
227 | 227 | // { |
228 | 228 | // for (size_t j = 0; j < IPS_FILTER_KERNEL_SIZE; ++j) |
229 | 229 | // { |
230 | | -// sc_uint<8> value; |
| 230 | +// sc_uint<8> value; |
231 | 231 | // |
232 | 232 | // #ifdef TEST_MODE_ONE_WINDOW_RANDOM |
233 | | -// value = (sc_uint<8> ) (rand() % 256); |
| 233 | +// value = (sc_uint<8>) (rand() % 256); |
234 | 234 | // #elif defined(TEST_MODE_ONE_WINDOW_NORMAL) |
235 | | -// value = (sc_uint<8> ) (i * IPS_FILTER_KERNEL_SIZE + j); |
| 235 | +// value = (sc_uint<8>) (i * IPS_FILTER_KERNEL_SIZE + j); |
236 | 236 | // #else |
237 | | -// value = (sc_uint<8> ) i; |
| 237 | +// value = (sc_uint<8>) i; |
238 | 238 | // #endif // TEST_MODE_ONE_WINDOW |
239 | 239 | // |
240 | 240 | // img_window[i * IPS_FILTER_KERNEL_SIZE + j] = value; |
|
260 | 260 | // std::cout << "Iteration: " << i << " img_window = " << (int) img_window[i] << std::endl; |
261 | 261 | //#endif // IPS_DEBUG_EN |
262 | 262 | // s_img_window.write(img_window[i]); |
263 | | -// sc_uint<8> value2 = s_img_window.read(); |
| 263 | +// sc_uint<8> value2 = s_img_window.read(); |
264 | 264 | // |
265 | 265 | //#ifdef IPS_DEBUG_EN |
266 | 266 | // std::cout << "Iteration: " << i << " s_img_window = " << (int) value2 << std::endl; |
|
289 | 289 |
|
290 | 290 | int sc_main(int, char*[]) |
291 | 291 | { |
292 | | - sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated" , SC_DO_NOTHING); |
293 | | - sc_report_handler::set_actions( SC_ID_LOGIC_X_TO_BOOL_, SC_LOG); |
294 | | - sc_report_handler::set_actions( SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, SC_LOG); |
295 | | - sc_report_handler::set_actions( SC_ID_OBJECT_EXISTS_, SC_LOG); |
| 292 | + // sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated" , SC_DO_NOTHING); |
| 293 | + // sc_report_handler::set_actions( SC_ID_LOGIC_X_TO_BOOL_, SC_LOG); |
| 294 | + // sc_report_handler::set_actions( SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, SC_LOG); |
| 295 | + // sc_report_handler::set_actions( SC_ID_OBJECT_EXISTS_, SC_LOG); |
296 | 296 | // Pass command linke arguments |
297 | 297 | sc_argc(); |
298 | 298 | sc_argv(); |
|
0 commit comments