Issue #246
Trace switch for SystemC
| Status: | Closed | Start date: | 04/19/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | Usage | |||
| Target version: | - |
Description
Hi
I am trying to generate Trace files using verilator using -trace switch.
The thing that i am observing is that {prefix}__Trace.cpp & {prefix}__Trace__Slow.cpp
files are being generated as C trace files without timing information.
which i check it as the header included in those files are "verilated_vcd_c.h" & not "verilated_vcd_sc.h"
which give errors while linking when i call it through main file as
VerilatedVcdSc* tf = new VerilatedVcdSc;
if0->trace(tf,1);
I am using following command to verilate
verilator --sc $(INCLUDE) $(CORES) $(VERILOG_INTERFACE) $(INTERFACE) -Mdir Interface -trace
Probably i m not using the switch -trace in the right way.
regards
Muhammad Aurang zaib
History
Updated by Wilson Snyder about 3 years ago
- Category set to Usage
- Status changed from New to AskedReporter
- Assignee set to Wilson Snyder
What errors specifically? Link errors or compiler errors?
If compile errors are you #include'ing "verilated_vcd_sc.h"
If link errors are you linking against $(VK_GLOBAL_OBJS)
Updated by Wilson Snyder about 3 years ago
BTW see the "test_sc" directory in the kit for an example.
Updated by Muhammad Aurang Zaib about 3 years ago
Hi,
Thanks for your early response
Errors are not compiling errors,as i m including that header.
Well those errors are specific to linking.
Error occurs as i have noticed that the trace files that verilator generates trace .cpp files which
are compliant to C++ & not SystemC as when i link my program by calling through sc_main
using VerilatedVcdC* tf = new VerilatedVcdC executable is generated
but not when i use VerilatedVcdSc* tf = new VerilatedVcdSc.
I am using correct headers & correct files for linking but the problem
is that verilator with --trace switch is generating {prefix}__Trace.cpp & {prefix}__Trace__Slow.cpp
which is not including SystemC support.
Thanks once again
Updated by Wilson Snyder about 3 years ago
The __Trace files shouldn't need anything else.
Again, what exact errors are you getting?
Updated by Muhammad Aurang Zaib about 3 years ago
- File tmp.log added
Hi,
Attached please find the error log.
Thanks
Updated by Wilson Snyder about 3 years ago
You need to link against verilated_vcd_c.o I'll update the docs about that.
I suspect your makefile is missing the link against $(VK_GLOBAL_OBJS) as that object should be listed in that variable.
Updated by Wilson Snyder about 3 years ago
- Status changed from AskedReporter to Closed
Updated docs for 3.802+.
Also available in: Atom
![[logo]](/img/veripool_small.png)