Skip to content

Commit

Permalink
Fix Verilator path resolution in Makefile
Browse files Browse the repository at this point in the history
- Check if VERILATOR_ROOT is defined to use custom installs verilator binary
- Fallback to system-wide verilator if VERILATOR_ROOT is not set
- Resolves verilator_bin not found error by ensuring correct /bin subdirectory
  • Loading branch information
bi262934 committed Jan 30, 2025
1 parent 103ade8 commit c450ddd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/cpp/naxriscv/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ run: compile
./obj_dir/VNaxRiscv

verilate: ${NAXRISCV_VERILOG}
verilator -cc ${NAXRISCV_VERILOG} -CFLAGS -std=c++14 -LDFLAGS -pthread ${ADDCFLAGS} ${FLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-UNOPTFLAT -Wno-WIDTH --x-assign unique --exe ${SRCS}
ifdef VERILATOR_ROOT
${VERILATOR_ROOT}/bin/verilator -cc ${NAXRISCV_VERILOG} -CFLAGS -std=c++14 -LDFLAGS -pthread ${ADDCFLAGS} ${FLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-UNOPTFLAT -Wno-WIDTH --x-assign unique --exe ${SRCS}
else
verilator -cc ${NAXRISCV_VERILOG} -CFLAGS -std=c++14 -LDFLAGS -pthread ${ADDCFLAGS} ${FLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-UNOPTFLAT -Wno-WIDTH --x-assign unique --exe ${SRCS}
endif

src/nax.h: ${NAXRISCV_HEADER}
cp ${NAXRISCV_HEADER} src/nax.h
Expand Down

0 comments on commit c450ddd

Please sign in to comment.