diff --git a/bin/verilator b/bin/verilator index 3855f1aa1..50d299a70 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1638,8 +1638,8 @@ will toggle forever and thus the executable will give the didn't converge error to prevent an infinite loop. To debug this, run Verilator with --profile-cfuncs. Run make on the -generated files with "CPPFLAGS_ADD=-DVL_DEBUG". Then call -Verilated::debug(1) in your main.cpp. +generated files with "OPT=-DVL_DEBUG". Then call Verilated::debug(1) in +your main.cpp. This will cause each change in a variable to print a message. Near the bottom you'll see the code and variable that causes the problem. For the diff --git a/include/verilated.mk.in b/include/verilated.mk.in index 918e89a3a..83c846354 100644 --- a/include/verilated.mk.in +++ b/include/verilated.mk.in @@ -84,8 +84,8 @@ endif ##### SystemPerl builds ifeq ($(VM_SP),1) - CPPFLAGS += -I$(SYSTEMPERL) -I$(SYSTEMPERL)/src -DSYSTEMPERL - VPATH += $(SYSTEMPERL) $(SYSTEMPERL)/src + CPPFLAGS += -I$(SYSTEMPERL)/src -DSYSTEMPERL + VPATH += $(SYSTEMPERL)/src VK_CLASSES_SP = $(addsuffix .sp, $(VM_CLASSES)) @@ -104,8 +104,8 @@ endif ifeq ($(VM_PCLI),1) LIBS += -lm -lstdc++ ifeq ($(VM_TRACE),1) - CPPFLAGS += -I$(SYSTEMPERL) -I$(SYSTEMPERL)/src - VPATH += $(SYSTEMPERL) $(SYSTEMPERL)/src + CPPFLAGS += -I$(SYSTEMPERL)/src + VPATH += $(SYSTEMPERL)/src endif endif diff --git a/include/verilatedos.h b/include/verilatedos.h index 9fa98e848..1fd944ad2 100644 --- a/include/verilatedos.h +++ b/include/verilatedos.h @@ -39,6 +39,8 @@ # define VL_ATTR_UNUSED __attribute__ ((unused)) # define VL_LIKELY(x) __builtin_expect(!!(x), 1) # define VL_UNLIKELY(x) __builtin_expect(!!(x), 0) +# define VL_PREFETCH_RD(p) __builtin_prefetch((p),0) +# define VL_PREFETCH_RW(p) __builtin_prefetch((p),1) #else # define VL_ATTR_PRINTF(fmtArgNum) ///< Function with printf format checking # define VL_ATTR_ALIGNED(alignment) ///< Align structure to specified byte alignment @@ -46,6 +48,8 @@ # define VL_ATTR_UNUSED ///< Function that may be never used # define VL_LIKELY(x) (!!(x)) ///< Boolean expression more often true then false # define VL_UNLIKELY(x) (!!(x)) ///< Boolean expression more often false then true +# define VL_PREFETCH_RD(p) ///< Prefetch data with read intent +# define VL_PREFETCH_RW(p) ///< Prefetch data with read/write intent #endif #ifdef VL_THREADED