pulp-platform / pulp

This is the top-level project for the PULP Platform. It instantiates a PULP open-source system with a PULP SoC (microcontroller) domain accelerated by a PULP cluster with 8 cores.
Other
456 stars 114 forks source link

Error during simulation with ModelSim #29

Open CPKrebs opened 4 years ago

CPKrebs commented 4 years ago

HI, I'm a master student from Brazil, and I'm working on a project that uses the PULP platform.

I'm having difficulty when I simulate a test with ModelSim, a message appears saying that there was a failure to access the "work" library.

# source /opt/pulp/sim/tcl_files/config/run_and_exit.tcl
# source /opt/pulp/sim/tcl_files/run.tcl
# vsim -c -quiet vopt_tb -L models_lib -L vip_lib -t ps "+nowarnTRAN" "+nowarnTSCALE" "+nowarnTFMPC" "+TB_PATH=/opt/pulp/sim" "+UVM_NO_RELNOTES" -permit_unmatched_virtual_intf "+VSIM_PATH=/opt/pulp/sim" -gUSE_SDVT_SPI=0 -gUSE_SDVT_CPI=0 -gBAUDRATE=115200 -gENABLE_DEV_DPI=0 -gLOAD_L2=JTAG -gUSE_SDVT_I2S=0 
# Start time: 13:29:15 on May 26,2020
# ** Error (suppressible): (vsim-19) Failed to access library 'work' at "work".
# No such file or directory. (errno = ENOENT)
# Error loading design
Error loading design
# End time: 13:29:17 on May 26,2020, Elapsed time: 0:00:02
# Errors: 1, Warnings: 0
Simulator reported an error, leaving
/opt/pulp/pulp-sdk/pulp-rt-examples/time/timer_periodic/build/pulp/__rules.mk:182: recipe for target 'run' failed
make: *** [run] Error 1

I'm using ModelSim - Intel FPGA Pro 2020.1 Searching, I saw that the error is related to the version of ModelSim, however when using another version other than 2020.1, the following error appears:

Failed to open executable /opt/intelFPGA_pro/19.4/modelsim_ase/linuxaloem/../linux_x86_64pe/vish in execute mode needed for the option -64.
execv: No such file or directory
** Fatal: Unable to exec the GUI /opt/intelFPGA_pro/20.1/modelsim_ase/linuxaloem/../linux_x86_64pe/vish.
Simulator reported an error, leaving
/opt/pulp/pulp-sdk/pulp-rt-examples/time/timer_periodic/build/pulp/__rules.mk:182: recipe for target 'run' failed
make: *** [run] Error 1

Grateful for the attention.

FrancescoConti commented 4 years ago

In general, we do not support the reduced version of ModelSim that Intel/Altera ships, only the full version by Mentor (see https://github.com/pulp-platform/pulpissimo/issues?q=intel+fpga for several issues on the topic).

Here it looks something is going wrong with the building / optimization phase, so check the output of the make build opt command you used to build the platform. My guess is that the first problem you report is related to the vopt command that, unfortunately, is not supported by the Intel reduced version AFAIK. Bypassing vopt is possible, but requires quite some ModelSim script hacking -- if you are in an university, chances are you could get access to a "real" version of Mentor ModelSim. It will be far easier to work with that as the Intel version may have also other limitations.

The second problem seems a tool installation issue entirely unrelated to PULP.

CPKrebs commented 4 years ago

Hi, I made modifications to ModelSim based on another issue (https://github.com/pulp-platform/pulpissimo/issues/12), and now I'm facing this error:


# source /opt/pulp/pulp/sim/tcl_files/config/run_and_exit.tcl
# source /opt/pulp/pulp/sim/tcl_files/run.tcl
# vsim -c -quiet tb_pulp -L models_lib -L vip_lib -t ps "+nowarnTRAN" "+nowarnTSCALE" "+nowarnTFMPC" "+TB_PATH=/opt/pulp/pulp/sim" "+UVM_NO_RELNOTES" -permit_unmatched_virtual_intf "+VSIM_PATH=/opt/pulp/pulp/sim" -gUSE_SDVT_SPI=0 -gUSE_SDVT_CPI=0 -gBAUDRATE=115200 -gENABLE_DEV_DPI=0 -gLOAD_L2=JTAG -gUSE_SDVT_I2S=0 
# Start time: 17:37:16 on May 28,2020
# ** Note: (vsim-2179) An older version (version 10) DPI tfdb file is being read.
#    Time: 0 ps  Iteration: 0  Unknown: <UNKNOWN>
# ** Fatal: (vsim-3381) Obsolete library format for design unit. Design unit '/opt/pulp/pulp/sim/modelsim_libs/tb_lib.tb_pulp'
#    Time: 0 ps  Iteration: 0  Root: / File: NOFILE
# FATAL ERROR while loading design
# Error loading design
Error loading design
# End time: 17:37:16 on May 28,2020, Elapsed time: 0:00:00
# Errors: 1, Warnings: 0
Simulator reported an error, leaving
/opt/pulp/pulp-sdk/pulp-rt-examples/hello/build/pulp/__rules.mk:182: recipe for target 'run' failed
make: *** [run] Error 1

I realized that the version of ModelSim - Intel 2020.1 starts the simulation without having to modify the vsim command in the file vsim_runner.py, however this error remains in both forms of execution.

Grateful for the attention.

pedrocgr commented 1 year ago

Hello @CPKrebs , i'm also from Brazil and my group is trying to simulate one of the recent Pulp Designs. I Would love to get in touch with you and discuss our problems if you could give us some tips about it. Thanks!