You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I think this is something I can work around, it would be nice if it "just worked".
I took the SystemC example given in the documentation and just changed the verilator command line to:
followed by:
and I get a linker failure as follows:
```verilated_vpi.o: In function vpi_get_time': verilated_vpi.cpp:(.text+0x11e4): undefined reference to sc_time_stamp()'
verilated_vpi.o: In function `vpi_register_cb':
verilated_vpi.cpp:(.text+0x7ea3): undefined reference to `sc_time_stamp()'
collect2: ld returned 1 exit status
The reason for the undefined reference is because verilated_vpi.cpp in this case really needs
```#include "systemc.h"
before the #include "verilated.h" so that the VL_TIME_IQD macros used within it are defined by verilated.h to refer to the SystemC sc_time_stamp() that returns a class instead of the default for non-systemC that returns a double.
This could easily be fixed by adding to $VERILATOR_ROOT/include/verilated.mk a definition of:
VK_CPPFLAGS_WALL += -DVM_SC=$(VM_SC)
endif
and then adding before line 29 of $VERILATOR_ROOT/include/verilated_vpi.cpp :
#include "systemc.h"
#endif
The text was updated successfully, but these errors were encountered:
Author Name: Arthur Kahlich
Original Redmine Issue: 1081 from https://www.veripool.org
While I think this is something I can work around, it would be nice if it "just worked".
I took the SystemC example given in the documentation and just changed the verilator command line to:
followed by:
and I get a linker failure as follows:
```verilated_vpi.o: In function
vpi_get_time': verilated_vpi.cpp:(.text+0x11e4): undefined reference to
sc_time_stamp()'verilated_vpi.o: In function `vpi_register_cb':
verilated_vpi.cpp:(.text+0x7ea3): undefined reference to `sc_time_stamp()'
collect2: ld returned 1 exit status
before the #include "verilated.h" so that the VL_TIME_IQD macros used within it are defined by verilated.h to refer to the SystemC sc_time_stamp() that returns a class instead of the default for non-systemC that returns a double.
This could easily be fixed by adding to $VERILATOR_ROOT/include/verilated.mk a definition of:
and then adding before line 29 of $VERILATOR_ROOT/include/verilated_vpi.cpp :
The text was updated successfully, but these errors were encountered: