Skip to content

Commit 7c197d8

Browse files
committed
Fixing issue related to dump filter kernel when not in debug mode
1 parent de599f7 commit 7c197d8

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

modules/filter/include/ips_filter_at_model.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,21 @@ void Filter<IN, OUT, N>::init()
151151

152152
std::cout << std::endl;
153153
}
154+
#else
155+
#ifdef IPS_DUMP_EN
156+
size_t i, j;
157+
158+
for (i = 0; i < N; ++i)
159+
{
160+
for (j = 0; j < N; ++j)
161+
{
162+
// Adding the signals to the waveform
163+
std::ostringstream var_name;
164+
var_name << "kernel_" << i << "_" << j;
165+
sc_trace(this->wf, this->kernel[i * N + j], var_name.str());
166+
}
167+
}
168+
#endif // IPS_DUMP_EN
154169
#endif // IPS_DEBUG_EN
155170
}
156171
#endif // IPS_FILTER_AT_MODEL_HPP

modules/filter/include/ips_filter_lt_model.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,21 @@ void Filter<IN, OUT, N>::init()
156156

157157
std::cout << std::endl;
158158
}
159+
#else
160+
#ifdef IPS_DUMP_EN
161+
size_t i, j;
162+
163+
for (i = 0; i < N; ++i)
164+
{
165+
for (j = 0; j < N; ++j)
166+
{
167+
// Adding the signals to the waveform
168+
std::ostringstream var_name;
169+
var_name << "kernel_" << i << "_" << j;
170+
sc_trace(this->wf, this->kernel[i * N + j], var_name.str());
171+
}
172+
}
173+
#endif // IPS_DUMP_EN
159174
#endif // IPS_DEBUG_EN
160175
}
161176
#endif // IPS_FILTER_LT_MODEL_HPP

modules/filter/include/ips_filter_pv_model.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ void Filter<IN, OUT, N>::init_kernel()
112112

113113
std::cout << std::endl;
114114
}
115+
#else
116+
#ifdef IPS_DUMP_EN
117+
size_t i, j;
118+
119+
for (i = 0; i < N; ++i)
120+
{
121+
for (j = 0; j < N; ++j)
122+
{
123+
// Adding the signals to the waveform
124+
std::ostringstream var_name;
125+
var_name << "kernel_" << i << "_" << j;
126+
sc_trace(this->wf, this->kernel[i * N + j], var_name.str());
127+
}
128+
}
129+
#endif // IPS_DUMP_EN
115130
#endif // IPS_DEBUG_EN
116131
}
117132
#endif // IPS_FILTER_PV_MODEL_HPP

0 commit comments

Comments
 (0)