gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sc_trace_file.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Google, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met: redistributions of source code must retain the above copyright
7  * notice, this list of conditions and the following disclaimer;
8  * redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution;
11  * neither the name of the copyright holders nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #include <vector>
29 
43 #include "systemc/utils/vcd.hh"
44 
45 namespace sc_core
46 {
47 
50 
53 {
54  return new ::sc_gem5::VcdTraceFile(name);
55 }
56 
57 void
59 {
60  delete tf;
61 }
62 
63 void
64 sc_write_comment(sc_trace_file *tf, const std::string &comment)
65 {
66  static_cast<::sc_gem5::TraceFile *>(tf)->writeComment(comment);
67 }
68 
69 void
70 sc_trace(sc_trace_file *tf, const bool &v, const std::string &name)
71 {
72  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
73 }
74 
75 void
76 sc_trace(sc_trace_file *tf, const bool *v, const std::string &name)
77 {
78  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
79 }
80 
81 void
82 sc_trace(sc_trace_file *tf, const float &v, const std::string &name)
83 {
84  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
85 }
86 
87 void
88 sc_trace(sc_trace_file *tf, const float *v, const std::string &name)
89 {
90  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
91 }
92 
93 void
94 sc_trace(sc_trace_file *tf, const double &v, const std::string &name)
95 {
96  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
97 }
98 
99 void
100 sc_trace(sc_trace_file *tf, const double *v, const std::string &name)
101 {
102  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
103 }
104 
105 void
106 sc_trace(sc_trace_file *tf, const sc_dt::sc_logic &v, const std::string &name)
107 {
108  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
109 }
110 
111 void
112 sc_trace(sc_trace_file *tf, const sc_dt::sc_logic *v, const std::string &name)
113 {
114  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
115 }
116 
117 void
119  const std::string &name)
120 {
121  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
122 }
123 
124 void
126  const std::string &name)
127 {
128  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
129 }
130 
131 void
133  const std::string &name)
134 {
135  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
136 }
137 
138 void
140  const std::string &name)
141 {
142  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
143 }
144 
145 void
147  const std::string &name)
148 {
149  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
150 }
151 
152 void
154  const std::string &name)
155 {
156  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
157 }
158 
159 void
161  const std::string &name)
162 {
163  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
164 }
165 
166 void
168  const std::string &name)
169 {
170  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
171 }
172 
173 void
175  const std::string &name)
176 {
177  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
178 }
179 
180 void
182  const std::string &name)
183 {
184  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
185 }
186 
187 void
189  const std::string &name)
190 {
191  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
192 }
193 
194 void
196  const std::string &name)
197 {
198  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
199 }
200 
201 void
202 sc_trace(sc_trace_file *tf, const sc_dt::sc_fxval &v, const std::string &name)
203 {
204  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
205 }
206 
207 void
208 sc_trace(sc_trace_file *tf, const sc_dt::sc_fxval *v, const std::string &name)
209 {
210  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
211 }
212 
213 void
215  const std::string &name)
216 {
217  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
218 }
219 
220 void
222  const std::string &name)
223 {
224  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
225 }
226 
227 void
228 sc_trace(sc_trace_file *tf, const sc_dt::sc_fxnum &v, const std::string &name)
229 {
230  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
231 }
232 
233 void
234 sc_trace(sc_trace_file *tf, const sc_dt::sc_fxnum *v, const std::string &name)
235 {
236  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
237 }
238 
239 void
241  const std::string &name)
242 {
243  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
244 }
245 
246 void
248  const std::string &name)
249 {
250  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
251 }
252 
253 void
254 sc_trace(sc_trace_file *tf, const sc_event &v, const std::string &name)
255 {
256  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
257 }
258 
259 void
260 sc_trace(sc_trace_file *tf, const sc_event *v, const std::string &name)
261 {
262  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
263 }
264 
265 void
266 sc_trace(sc_trace_file *tf, const sc_time &v, const std::string &name)
267 {
268  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
269 }
270 
271 void
272 sc_trace(sc_trace_file *tf, const sc_time *v, const std::string &name)
273 {
274  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
275 }
276 
277 void
278 sc_trace(sc_trace_file *tf, const unsigned char &v,
279  const std::string &name, int width)
280 {
281  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
282 }
283 
284 void
285 sc_trace(sc_trace_file *tf, const unsigned char *v,
286  const std::string &name, int width)
287 {
288  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
289 }
290 
291 void
292 sc_trace(sc_trace_file *tf, const unsigned short &v,
293  const std::string &name, int width)
294 {
295  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
296 }
297 
298 void
299 sc_trace(sc_trace_file *tf, const unsigned short *v,
300  const std::string &name, int width)
301 {
302  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
303 }
304 
305 void
306 sc_trace(sc_trace_file *tf, const unsigned int &v,
307  const std::string &name, int width)
308 {
309  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
310 }
311 
312 void
313 sc_trace(sc_trace_file *tf, const unsigned int *v,
314  const std::string &name, int width)
315 {
316  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
317 }
318 
319 void
320 sc_trace(sc_trace_file *tf, const unsigned long &v,
321  const std::string &name, int width)
322 {
323  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
324 }
325 
326 void
327 sc_trace(sc_trace_file *tf, const unsigned long *v,
328  const std::string &name, int width)
329 {
330  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
331 }
332 
333 void
334 sc_trace(sc_trace_file *tf, const char &v, const std::string &name, int width)
335 {
336  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
337 }
338 
339 void
340 sc_trace(sc_trace_file *tf, const char *v, const std::string &name, int width)
341 {
342  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
343 }
344 
345 void
346 sc_trace(sc_trace_file *tf, const short &v,
347  const std::string &name, int width)
348 {
349  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
350 }
351 
352 void
353 sc_trace(sc_trace_file *tf, const short *v,
354  const std::string &name, int width)
355 {
356  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
357 }
358 
359 void
360 sc_trace(sc_trace_file *tf, const int &v, const std::string &name, int width)
361 {
362  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
363 }
364 
365 void
366 sc_trace(sc_trace_file *tf, const int *v, const std::string &name, int width)
367 {
368  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
369 }
370 
371 void
372 sc_trace(sc_trace_file *tf, const long &v, const std::string &name, int width)
373 {
374  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
375 }
376 
377 void
378 sc_trace(sc_trace_file *tf, const long *v, const std::string &name, int width)
379 {
380  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
381 }
382 
383 void
385  const std::string &name, int width)
386 {
387  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
388 }
389 
390 void
392  const std::string &name, int width)
393 {
394  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
395 }
396 
397 void
399  const std::string &name, int width)
400 {
401  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
402 }
403 
404 void
406  const std::string &name, int width)
407 {
408  static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
409 }
410 
411 void
413  const std::string &name, int width)
414 {
415  static_cast<::sc_gem5::TraceFile *>(tf)->
416  addTraceVal(&v.read(), name, width);
417 }
418 
419 void
421  const std::string &name, int width)
422 {
423  static_cast<::sc_gem5::TraceFile *>(tf)->
424  addTraceVal(&v.read(), name, width);
425 }
426 
427 void
429  const std::string &name, int width)
430 {
431  static_cast<::sc_gem5::TraceFile *>(tf)->
432  addTraceVal(&v.read(), name, width);
433 }
434 
435 void
437  const std::string &name, int width)
438 {
439  static_cast<::sc_gem5::TraceFile *>(tf)->
440  addTraceVal(&v.read(), name, width);
441 }
442 
443 void
444 sc_trace(sc_trace_file *tf, const unsigned int &v,
445  const std::string &name, const char **enum_literals)
446 {
447  static_cast<::sc_gem5::TraceFile *>(tf)->
448  addTraceVal(&v, name, enum_literals);
449 }
450 
451 void
453 {
454  static_cast<::sc_gem5::TraceFile *>(tf)->traceDeltas(on);
455 }
456 
457 } // namespace sc_core
sc_fxnum.hh
sc_core
Definition: messages.cc:31
sc_int_base.hh
sc_dt::sc_fxnum_fast
Definition: sc_fxnum.hh:844
sc_dt::sc_fxval
Definition: sc_fxval.hh:86
sc_dt::sc_bv_base
Definition: sc_bv_base.hh:105
sc_dt::sc_int_base
Definition: sc_int_base.hh:494
sc_core::sc_trace_file
Definition: sc_trace_file.hh:61
sc_bv_base.hh
sc_dt::sc_signed
Definition: sc_signed.hh:984
sc_dt::sc_logic
Definition: sc_logic.hh:130
sc_core::sc_close_vcd_trace_file
void sc_close_vcd_trace_file(sc_trace_file *tf)
Definition: sc_trace_file.cc:58
sc_event.hh
sc_dt::uint64
uint64_t uint64
Definition: sc_nbdefs.hh:206
gem5::ArmISA::width
Bitfield< 4 > width
Definition: misc_types.hh:72
sc_core::sc_event
Definition: sc_event.hh:169
sc_core::sc_time
Definition: sc_time.hh:49
sc_dt::sc_fxnum
Definition: sc_fxnum.hh:483
sc_signal_in_if.hh
sc_gem5::TraceFile
Definition: tracefile.hh:191
sc_core::sc_signal_in_if
Definition: sc_signal_in_if.hh:53
sc_uint_base.hh
gem5::MipsISA::on
Bitfield< 0 > on
Definition: dt_constants.hh:90
sc_dt::int64
int64_t int64
Definition: sc_nbdefs.hh:205
sc_core::sc_trace
void sc_trace(sc_trace_file *tf, const sc_in< T > &i, const std::string &name)
Definition: sc_in.hh:156
name
const std::string & name()
Definition: trace.cc:48
sc_dt::sc_uint_base
Definition: sc_uint_base.hh:465
sc_core::sc_trace_file::sc_trace_file
sc_trace_file()
Definition: sc_trace_file.cc:48
sc_signed.hh
sc_dt::sc_lv_base
Definition: sc_lv_base.hh:118
gem5::X86ISA::tf
Bitfield< 8 > tf
Definition: misc.hh:574
gem5::VegaISA::v
Bitfield< 0 > v
Definition: pagetable.hh:65
sc_unsigned.hh
sc_core::sc_write_comment
void sc_write_comment(sc_trace_file *tf, const std::string &comment)
Definition: sc_trace_file.cc:64
vcd.hh
sc_dt::sc_fxval_fast
Definition: sc_fxval.hh:376
sc_core::sc_trace_file::~sc_trace_file
virtual ~sc_trace_file()
Definition: sc_trace_file.cc:49
sc_dt::sc_unsigned
Definition: sc_unsigned.hh:890
sc_trace_file.hh
sc_core::sc_trace_delta_cycles
void sc_trace_delta_cycles(sc_trace_file *, bool on=true)
Definition: sc_trace_file.cc:452
sc_lv_base.hh
sc_time.hh
sc_logic.hh
sc_fxval.hh
sc_core::sc_create_vcd_trace_file
sc_trace_file * sc_create_vcd_trace_file(const char *name)
Definition: sc_trace_file.cc:52

Generated on Sun Jul 30 2023 01:57:03 for gem5 by doxygen 1.8.17