gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
45namespace sc_core
46{
47
50
53{
54 return new ::sc_gem5::VcdTraceFile(name);
55}
56
57void
59{
60 delete tf;
61}
62
63void
64sc_write_comment(sc_trace_file *tf, const std::string &comment)
65{
66 static_cast<::sc_gem5::TraceFile *>(tf)->writeComment(comment);
67}
68
69void
70sc_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
75void
76sc_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
81void
82sc_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
87void
88sc_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
93void
94sc_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
99void
100sc_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
105void
106sc_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
111void
112sc_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
117void
119 const std::string &name)
120{
121 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
122}
123
124void
126 const std::string &name)
127{
128 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
129}
130
131void
133 const std::string &name)
134{
135 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
136}
137
138void
140 const std::string &name)
141{
142 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
143}
144
145void
147 const std::string &name)
148{
149 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
150}
151
152void
154 const std::string &name)
155{
156 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
157}
158
159void
161 const std::string &name)
162{
163 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
164}
165
166void
168 const std::string &name)
169{
170 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
171}
172
173void
175 const std::string &name)
176{
177 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
178}
179
180void
182 const std::string &name)
183{
184 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
185}
186
187void
189 const std::string &name)
190{
191 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
192}
193
194void
196 const std::string &name)
197{
198 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
199}
200
201void
202sc_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
207void
208sc_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
213void
215 const std::string &name)
216{
217 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
218}
219
220void
222 const std::string &name)
223{
224 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
225}
226
227void
228sc_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
233void
234sc_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
239void
241 const std::string &name)
242{
243 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name);
244}
245
246void
248 const std::string &name)
249{
250 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name);
251}
252
253void
254sc_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
259void
260sc_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
265void
266sc_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
271void
272sc_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
277void
278sc_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
284void
285sc_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
291void
292sc_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
298void
299sc_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
305void
306sc_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
312void
313sc_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
319void
320sc_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
326void
327sc_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
333void
334sc_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
339void
340sc_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
345void
346sc_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
352void
353sc_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
359void
360sc_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
365void
366sc_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
371void
372sc_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
377void
378sc_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
383void
385 const std::string &name, int width)
386{
387 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
388}
389
390void
392 const std::string &name, int width)
393{
394 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
395}
396
397void
399 const std::string &name, int width)
400{
401 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(&v, name, width);
402}
403
404void
406 const std::string &name, int width)
407{
408 static_cast<::sc_gem5::TraceFile *>(tf)->addTraceVal(v, name, width);
409}
410
411void
413 const std::string &name, int width)
414{
415 static_cast<::sc_gem5::TraceFile *>(tf)->
416 addTraceVal(&v.read(), name, width);
417}
418
419void
421 const std::string &name, int width)
422{
423 static_cast<::sc_gem5::TraceFile *>(tf)->
424 addTraceVal(&v.read(), name, width);
425}
426
427void
429 const std::string &name, int width)
430{
431 static_cast<::sc_gem5::TraceFile *>(tf)->
432 addTraceVal(&v.read(), name, width);
433}
434
435void
437 const std::string &name, int width)
438{
439 static_cast<::sc_gem5::TraceFile *>(tf)->
440 addTraceVal(&v.read(), name, width);
441}
442
443void
444sc_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
451void
453{
454 static_cast<::sc_gem5::TraceFile *>(tf)->traceDeltas(on);
455}
456
457} // namespace sc_core
sc_trace_file * sc_create_vcd_trace_file(const char *name)
void sc_trace_delta_cycles(sc_trace_file *, bool on=true)
void sc_close_vcd_trace_file(sc_trace_file *tf)
void sc_trace(sc_trace_file *tf, const sc_in< T > &i, const std::string &name)
Definition sc_in.hh:156
void sc_write_comment(sc_trace_file *tf, const std::string &comment)
uint64_t uint64
Definition sc_nbdefs.hh:172
int64_t int64
Definition sc_nbdefs.hh:171
const std::string & name()
Definition trace.cc:48

Generated on Tue Jun 18 2024 16:24:07 for gem5 by doxygen 1.11.0