openrisc / orpsoc-cores

Core description files for FuseSoC
123 stars 78 forks source link

Unable to simulate de0_nano #62

Closed jeebujacob closed 8 years ago

jeebujacob commented 10 years ago

Hello , i m a newbie to openrisc system, got an error trying to simulate the de0_nano system.

Reference: jeebu@jeebu:~/openrisc/orpsoc-build$ fusesoc sim --sim=icarus de0_nano

Compiling /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/elf-loader/elf-loader.c... Compiling /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/elf-loader/vpi_wrapper.c... /usr/bin/iverilog-vpi: 1 file(s) failed to compile. ERROR: Failed to build simulation model ERROR: Failed to compile VPI library elf-loader

Thanks in advance.

regards Jeebu

olofk commented 10 years ago

Hi,

Not sure why this is happening, but let's find out :) Which version of FuseSoC are you using? I'm also very interested in seeing what you have in build/de0_nano/sim-icarus/jtag_vpi.log. Could you send over the contents of that file?

As a general advice, you should rerun the simulation with the --force parameter (fusesoc sim --force --sim=icarus de0_nano) to make sure that there aren't any old parts left. It's not very intuitive, I know that :) You could also try to clean out the cache manually. Just delete everything under ~/.cache/fusesoc

jeebujacob commented 10 years ago

Thanks a lot Olof, the last error was due to the absence of gelf.h header. But once the header was in place, and simulation was forced, it came up with a syntax error

jeebu@jeebu:~/openrisc/orpsoc-build$ fusesoc sim --force --sim-icarus de0_nano

Compiling /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/elf-loader/elf-loader.c... Compiling /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/elf-loader/vpi_wrapper.c... Making elf-loader.vpi from elf-loader.o vpi_wrapper.o... Compiling /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/jtag_vpi/jtag_vpi.c... Making jtag_vpi.vpi from jtag_vpi.o... /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/wb_intercon/wb_mux.v:56: syntax error I give up. /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/mor1kx/bench/verilog/mor1kx_monitor.v:42: Include file test-defines.v not found ERROR: Failed to build simulation model ERROR: Failed to compile Icarus Simulation model

Dont understand why the syntax is wrong. I m attaching a snap of the code, highlighting the 56th line.

wb_mux

Attaching build/de0_nano/sim-icarus/jtag_vpi.log file contents

/home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/jtag_vpi/jtag_vpi.c: In function ‘send_result_to_server’: /home/jeebu/openrisc/orpsoc-build/build/de0_nano/src/jtag_vpi/jtag_vpi.c:181:6: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]

Regards Jeebu

olofk commented 10 years ago

Hi.

I've been working on adding simulation support for de0_nano the last couple of days. It's working now, but I will need some more time to clean things up

jeebujacob commented 10 years ago

Forgot to mention..... the last syntactical mistake was because of the version of iverilog(0.9.6 needed).

Jeebu

olofk commented 9 years ago

Hi, Seems like it was quite a while since I last looked at the open issues. Was this ever resolved?

olofk commented 8 years ago

Closing this now due to inactivity. Simulations also work fine for me on de0 nano