Examples: Clearer to define sc_time_stamp
This commit is contained in:
parent
5b4448de23
commit
d4d87ef300
|
@ -49,12 +49,6 @@ VERILATOR_FLAGS += --coverage
|
||||||
#VERILATOR_FLAGS += --debug
|
#VERILATOR_FLAGS += --debug
|
||||||
# Add this trace to get a backtrace in gdb
|
# Add this trace to get a backtrace in gdb
|
||||||
#VERILATOR_FLAGS += --gdbbt
|
#VERILATOR_FLAGS += --gdbbt
|
||||||
# This example does not use vl_time_stamp but rather
|
|
||||||
# VerilatedContext::timeInc(), so to avoid a linker error on cygwin which
|
|
||||||
# does not support weak symbols, we need to define VL_TIME_CONTEXT *in CPP*
|
|
||||||
# to not compile in the vl_time_stamp using code.
|
|
||||||
VERILATOR_FLAGS += -CFLAGS -DVL_TIME_CONTEXT
|
|
||||||
|
|
||||||
|
|
||||||
# Input files for Verilator
|
# Input files for Verilator
|
||||||
VERILATOR_INPUT = -f input.vc top.v sim_main.cpp
|
VERILATOR_INPUT = -f input.vc top.v sim_main.cpp
|
||||||
|
|
|
@ -45,12 +45,6 @@ OPT_FAST = -Os -fstrict-aliasing
|
||||||
#OPT_FAST = -O
|
#OPT_FAST = -O
|
||||||
#OPT_FAST =
|
#OPT_FAST =
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Linking final exe -- presumes have a sim_main.cpp
|
|
||||||
|
|
||||||
# Special compile rule
|
|
||||||
sim_main.o: sim_main.cpp $(VM_PREFIX).h
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
######################################################################
|
######################################################################
|
||||||
# Automatically understand dependencies
|
# Automatically understand dependencies
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
// Include model header, generated from Verilating "top.v"
|
// Include model header, generated from Verilating "top.v"
|
||||||
#include "Vtop.h"
|
#include "Vtop.h"
|
||||||
|
|
||||||
|
// Legacy function required only so linking works on Cygwin and MSVC++
|
||||||
|
double sc_time_stamp() { return 0; }
|
||||||
|
|
||||||
int main(int argc, char** argv, char** env) {
|
int main(int argc, char** argv, char** env) {
|
||||||
// This is a more complicated example, please also see the simpler examples/make_hello_c.
|
// This is a more complicated example, please also see the simpler examples/make_hello_c.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue