ucb-bar / riscv-sodor

educational microarchitectures for risc-v isa
Other
660 stars 154 forks source link

make run-tmulator fails #49

Open farhadmerchant opened 5 years ago

farhadmerchant commented 5 years ago

I am getting following error in "make run-emulator"

verilator --cc --exe --top-module Top +define+PRINTF_COND=1 --assert --output-split 20000 --x-assign unique -I/home/farhad/Downloads/riscv-sodor/vsrc -O3 -CFLAGS " -O1 -std=c++11 -g -I/home/farhad/Downloads/riscv-sodor/emulator/common -I/usr/local/include -I/home/farhad/Downloads/riscv-sodor/riscv-fesvr/fesvr -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -lpthread -DVERILATOR -include /home/farhad/Downloads/riscv-sodor/emulator/common/verilator.h" \ -o /home/farhad/Downloads/riscv-sodor/emulator/rv32_1stage/emulator generated-src/Top.v /home/farhad/Downloads/riscv-sodor/vsrc/SimDTM.v -LDFLAGS " -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -lpthread" /home/farhad/Downloads/riscv-sodor/emulator/common/emulator.cpp /home/farhad/Downloads/riscv-sodor/riscv-fesvr/build/libfesvr.so /home/farhad/Downloads/riscv-sodor/emulator/rv32_1stage/SimDTM.o %Error: generated-src/Top.v:3748: syntax error, unexpected INTEGER NUMBER, expecting IDENTIFIER %Error: generated-src/Top.v:4254: syntax error, unexpected INTEGER NUMBER, expecting IDENTIFIER %Error: generated-src/Top.v:4741: syntax error, unexpected INTEGER NUMBER, expecting IDENTIFIER %Error: Exiting due to 3 error(s) %Error: Command Failed /usr/bin/verilator_bin --cc --exe --top-module Top '+define+PRINTF_COND=1' --assert --output-split 20000 --x-assign unique -I/home/farhad/Downloads/riscv-sodor/vsrc -O3 -CFLAGS ' -O1 -std=c++11 -g -I/home/farhad/Downloads/riscv-sodor/emulator/common -I/usr/local/include -I/home/farhad/Downloads/riscv-sodor/riscv-fesvr/fesvr -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -lpthread -DVERILATOR -include /home/farhad/Downloads/riscv-sodor/emulator/common/verilator.h' -o /home/farhad/Downloads/riscv-sodor/emulator/rv32_1stage/emulator generated-src/Top.v /home/farhad/Downloads/riscv-sodor/vsrc/SimDTM.v -LDFLAGS ' -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L. -lpthread' /home/farhad/Downloads/riscv-sodor/emulator/common/emulator.cpp /home/farhad/Downloads/riscv-sodor/riscv-fesvr/build/libfesvr.so /home/farhad/Downloads/riscv-sodor/emulator/rv32_1stage/SimDTM.o /home/farhad/Downloads/riscv-sodor/emulator/common/Makefile.include:103: recipe for target 'emulator' failed make[1]: [emulator] Error 10 make[1]: Leaving directory '/home/farhad/Downloads/riscv-sodor/emulator/rv32_1stage' Makefile:108: recipe for target 'emulator/rv32_1stage/emulator' failed make: [emulator/rv32_1stage/emulator] Error 2

Can someone tell me a solution for this error?

thnbp24 commented 4 years ago

I just had the same issue. The problem was that the verilator version was incompatible. It happened to me when I did apt install verilator and my ubuntu is 16.04. Make sure your deb is the same as verilator_3.900-1_amd64.deb

hz0ne commented 3 years ago

my error not same as you,please help me

hessen@ParaComp:~/risc-v/riscv-sodor$ CC=gcc-5 CXX=g++-5 make run-emulator

running basedir/Makefile: make run-emulator

make -C emulator/rv32_1stage/ run
make[1]: Entering directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage'
Package verilator was not found in the pkg-config search path.
Perhaps you should add the directory containing `verilator.pc'
to the PKG_CONFIG_PATH environment variable
No package 'verilator' found
/home/hessen/risc-v/riscv-sodor/emulator/common/Makefile.include:38: Have you sourced "cs152.lab1.bashrc"?
make -C /home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/fesvr libfesvr.a
make[2]: Entering directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/fesvr'
make[2]: 'libfesvr.a' is up to date.
make[2]: Leaving directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/fesvr'
verilator --cc --exe  --top-module Top +define+PRINTF_COND=1 --assert --output-split 20000 --x-assign unique -I/home/hessen/risc-v/riscv-sodor/vsrc -O3 -CFLAGS "-O1 -std=c++11 -g -I/home/hessen/risc-v/riscv-sodor/emulator/common -I/home/hessen/risc-v/riscv-sodor/riscv-isa-sim -DVERILATOR -include /home/hessen/risc-v/riscv-sodor/emulator/common/verilator.h" -LDFLAGS " /home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/fesvr/libfesvr.a -lpthread" -o /home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/emulator generated-src/Top.v /home/hessen/risc-v/riscv-sodor/vsrc/SimDTM.v /home/hessen/risc-v/riscv-sodor/emulator/common/emulator.cpp /home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/SimDTM.o
make -C /home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/obj_dir -f VTop.mk
make[2]: Entering directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/obj_dir'
make[2]: Nothing to be done for 'default'.
make[2]: Leaving directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage/obj_dir'
./emulator +max-cycles=30000 /home/hessen/risc-v/riscv-sodor/install/riscv-tests/rv32ui-p-simple 3>&1 1>&2 2>&3 | /home/hessen/risc-v/riscv-sodor/emulator/common/tracer.py > output/rv32ui-p-simple.out
/home/hessen/risc-v/riscv-sodor/emulator/common/Makefile.include:225: recipe for target 'output/rv32ui-p-simple.out' failed
make[1]: *** [output/rv32ui-p-simple.out] Error 255
make[1]: Leaving directory '/home/hessen/risc-v/riscv-sodor/emulator/rv32_1stage'
Makefile:99: recipe for target 'emulator/rv32_1stage/generated-src/timestamp' failed
make: *** [emulator/rv32_1stage/generated-src/timestamp] Error 2