Vsim schematic doesn't work (PULPissimo)
#1
Goodmirning everyone Smile 

I was trying to track some signals using che schematic tracer built inside Vsim. I tried to do this using the hello test program inside the pulp-rt-examples repo.

I called the simulation enabling the gui using the commands:

Code:
- make clean all
- make run gui=1


but once vsim gui starts, when i try to send the selected instance to vsim schematic editor (doing Rmouse click on the instance -> Add to -> Schematic) i got the following error:
 
# Debug data file, vsim.dbg, does not exist.

#
# Invoke vsim with -debugDB to create this file.

So, i tried to manually set the command -debugdb inside the script invoked before running.


The vsim options file invoked might be located in: pulpissimo/sim/tcl_files/run.tcl and i changed the label to be:

Code:
set TB "vopt_tb -L models_lib -L vip_lib -debugdb"


i try to run the simulation once again, and i noticed the file vsim.dbg has been created inside the working folder (pulp-rt-examples/hello/build/pulpissimo). However when i try to send the instance inside the schematic tracer again i get the following error:

# Schematic viewing and causality tracing unavailable.

# Possible reasons are :
# 1. vopt was run without -debugdb
# 2. The -novopt option is given with -debugdb which is not allowed.

I tried to manually set vopt that might be invoked from the file located in: pulpissimo/sim/tcl_files/config/vsim.tcl

I modified the related vopt arg list to be something like:

Code:
quietly set vopt_args ""

if {$vopt_acc_ena == "YES"} {
 #+ quietly append vopt_args $vopt_args "+acc=abflmnprstv"
 quietly append vopt_args $vopt_args "+acc=mnprv \
                                      -assertdebug \
                                      -bitscalars \
                                      -fsmdebug \
                                      -debugdb \  //line added by me
                                      -linedebug"

both commands are recognised by vsim inside the gui debug windows, but the error which appears is one more time the latter i have shown:

# Schematic viewing and causality tracing unavailable.

# Possible reasons are :
# 1. vopt was run without -debugdb
# 2. The -novopt option is given with -debugdb which is not allowed.

Have I done the whole process correctly, or there are already some command line options i need to set in order to activate the debugdb?

Thanks for the time you will dedicate to me, and thanks in advance for all the incoming suggestions Smile
Reply
#2
which version of Questasim are you using? Note that, we have seen plenty of issues with the Altera Edition of Modelsim/Questasim.
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#3
I am using questaSim version 2019/1. So you think the step I did were correct in order to achieve my goal, and i think I might need to swich to another and recent verson?
Reply
#4
No.. the version is OK. Technically it is better to use vopt as a separate step and not let it be called implicitly through vsim. You get better control over it. This is now more than 10 years old. Back in the day, Modelsim changed to a two step compile process (I believe starting with version 6.0 or so) from their older single step process. To make the transition transparent, they added this implicit vopt stage so that people that wrote scripts in 2004 or so, would not have to make any changes.

For a reasonably sized design, it makes more sense to do two separate tasks
vopt options
vsim

As for your question, I am not sure anyone here tried the feature you mention, personally I have never used it. But 2019.1 should be recent enough to have everything working properly. Some of the posters used much older or the AE version, which ended up being an issue (mainly for assertions and SV features).
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#5
Thanks for clarifications, i will figure out if i will be able to activate it in some ways. Anyway i tried to activaed it inside the RI5CY project and it worked fine. That's why i was afraid was something missing related on the execution process of PULPissimo project. I will reply once more if i will discover something interesting Smile
Reply
#6
(04-03-2020, 09:58 AM)kgf Wrote: No.. the version is OK. Technically it is better to use vopt as a separate step and not let it be called implicitly through vsim. You get better control over it. This is now more than 10 years old. Back in the day, Modelsim changed to a two step compile process (I believe starting with version 6.0 or so) from their older single step process. To make the transition transparent, they added this implicit vopt stage so that people that wrote scripts in 2004 or so, would not have to make any changes.

For a reasonably sized design, it makes more sense to do two separate tasks
vopt options
vsim

As for your question, I am not sure anyone here tried the feature you mention, personally I have never used it. But 2019.1 should be recent enough to have everything working properly. Some of the posters used much older or the AE version, which ended up being an issue (mainly for assertions and SV features).

The thing you mention above Frank is actually the problem. PULPissimo is compiled with this two step approach. You generated the debugdb only for the testbench while the actual RTL was already optimized before that (without the -debugdb option).

In order to generate the debugdb for the whole design additionally to the changes you already made you have to modify the following file:
pulpissimo/sim/tcl_files/rtl_vopt.tcl

Change line 28 from:
    eval exec >@stdout vopt+acc -o vopt_tb tb_pulp -floatparameters+tb_pulp  $VSIM_IP_LIBS $VSIM_RTL_LIBS -work work 
to:
    eval exec >@stdout vopt -debugdb +acc -o vopt_tb tb_pulp -floatparameters+tb_pulp  $VSIM_IP_LIBS $VSIM_RTL_LIBS -work work 

and rerun the rtl build with 'make clean build' from the toplevel directory.

I just verified that this allows to use the schematic viewer in questa-2020.1.
Reply
#7
(04-03-2020, 10:36 AM)meggiman Wrote:
(04-03-2020, 09:58 AM)kgf Wrote: No.. the version is OK. Technically it is better to use vopt as a separate step and not let it be called implicitly through vsim. You get better control over it. This is now more than 10 years old. Back in the day, Modelsim changed to a two step compile process (I believe starting with version 6.0 or so) from their older single step process. To make the transition transparent, they added this implicit vopt stage so that people that wrote scripts in 2004 or so, would not have to make any changes.

For a reasonably sized design, it makes more sense to do two separate tasks
vopt options
vsim

As for your question, I am not sure anyone here tried the feature you mention, personally I have never used it. But 2019.1 should be recent enough to have everything working properly. Some of the posters used much older or the AE version, which ended up being an issue (mainly for assertions and SV features).

The thing you mention above Frank is actually the problem. PULPissimo is compiled with this two step approach. You generated the debugdb only for the testbench while the actual RTL was already optimized before that (without the -debugdb option).

In order to generate the debugdb for the whole design additionally to the changes you already made you have to modify the following file:
pulpissimo/sim/tcl_files/rtl_vopt.tcl

Change line 28 from:
    eval exec >@stdout vopt+acc -o vopt_tb tb_pulp -floatparameters+tb_pulp  $VSIM_IP_LIBS $VSIM_RTL_LIBS -work work 
to:
    eval exec >@stdout vopt -debugdb +acc -o vopt_tb tb_pulp -floatparameters+tb_pulp  $VSIM_IP_LIBS $VSIM_RTL_LIBS -work work 

and rerun the rtl build with 'make clean build' from the toplevel directory.

I just verified that this allows to use the schematic viewer in questa-2020.1.

YES! it worked! Smile Cool  I was quite close to the solution... So we need to rebuild at the top level dir becaise this let the auto generated scripts to be updated using the newly added -debugdb command, and so the new list of scripts will finally support the debugdb for RTL too, right?
Reply
#8
Hi Nordic, the change Manuel suggested is "local" in the rtl_vopt.tcl script, which is not generated. This vopt stage is performed for the whole simulation platform, linking the entire RTL sources. It should work out of the box without regenerating anything (no update-ips or generate-scripts step). Actually I think it's not even necessary to due a full rebuild, if you go to the sim/ directory and execute only this stage with make opt it should work.
Reply
#9
(04-03-2020, 08:31 PM)fconti Wrote: Hi Nordic, the change Manuel suggested is "local" in the rtl_vopt.tcl script, which is not generated. This vopt stage is performed for the whole simulation platform, linking the entire RTL sources. It should work out of the box without regenerating anything (no update-ips or generate-scripts step). Actually I think it's not even necessary to due a full rebuild, if you go to the sim/ directory and execute only this stage with make opt it should work.

Hi fconti, tranks for explainations. Once i read your suggestion i saw the opt target in the /sim makefile which points to rtl_vopt.tcl i previously modified. Maybe I could have noticed that, but I went directly to the solution steps that Meggiman gave me. I will try also this solution if might be necessary, and i will post again if your proposed solution works too. Thanks all for your time and help! Smile
Reply


Forum Jump: