cliffc Posted March 6, 2011 Report Share Posted March 6, 2011 Hi, All - I tried to run a simple UVM 1.0 example using Questasim v10.0a. The example ran with UVM 1.0ea. I think the problem has to do with some missing optimization switches that I found in the UVM examples QuestaSim Makefile. The failing example: Command: qverilog -sv -mfcu -f run.f (top.sv file) module top; import uvm_pkg::*; logic clk; clkgen ck (clk); initial begin myrun_task(); $finish; end task myrun_task; `uvm_info("top","myrun_task running", UVM_LOW); #100ns; endtask endmodule (clkgen.sv file) `include "CYCLE.sv" module clkgen ( output logic clk); initial begin clk <= '0; forever #(`CYCLE/2) clk = ~clk; end endmodule (CYCLE.sv file) `ifndef CYCLE `define CYCLE 10 `endif `timescale 1ns/1ns (run.f file) -f ../../uvm.f +incdir+.. ../clkgen.sv top.s (uvm.f file) +incdir+/home/uvm/src /home/uvm/src/uvm.sv // /home/uvm/src/uvm_pkg.sv (partial transcript) QuestaSim qverilog 10.0a Compiler 2011.02 Feb 21 2011 /home/questasim/bin/../linux/qverilog -sv -mfcu -f run.f -- Compiling package uvm_pkg -- Compiling module clkgen -- Compiling module top -- Importing package uvm_pkg Top level modules: top + /home/packages/questasim_10.0a/questasim/linux/vsim -lib work top -c -do run -all; quit -f -appendlog -l qverilog.log -vopt vsim -appendlog -do {run -all; quit -f} -l qverilog.log -lib work -c -vopt top ... Loading sv_std.std Loading work.uvm_pkg Loading work.top(fast) ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_check_path'. The search list was empty. Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list of shared libraries that will be used to resolve user specified functions. Time: 0 ns Iteration: 0 Instance: /top File: top.sv ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_deposit'. The search list was empty. Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list of shared libraries that will be used to resolve user specified functions. Time: 0 ns Iteration: 0 Instance: /top File: top.sv ... ** Warning: (vsim-3770) Failed to find user specified function 'dpi_get_next_arg_c'. The search list was empty. Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list of shared libraries that will be used to resolve user specified functions. Time: 0 ns Iteration: 0 Instance: /top File: top.sv ** Warning: (vsim-3770) Failed to find user specified function 'dpi_get_tool_name_c'. The search list was empty. Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list of shared libraries that will be used to resolve user specified functions. Time: 0 ns Iteration: 0 Instance: /top File: top.sv ... run -all ** Fatal: (vsim-160) /home/uvm/src/dpi/uvm_svcmd_dpi.svh(27): Null foreign function pointer encountered when calling 'dpi_get_next_arg_c' Time: 0 ns Iteration: 0 Process: /uvm_pkg File: /home/uvm/src/dpi/uvm_svcmd_dpi.svh Fatal error at /home/uvm/src/dpi/uvm_svcmd_dpi.svh line 27 HDL call sequence: Stopped at /home/uvm/src/dpi/uvm_svcmd_dpi.svh 27 called from /home/uvm/src/dpi/uvm_svcmd_dpi.svh 32 called from /home/uvm/src/base/uvm_cmdline_processor.svh 245 called from /home/uvm/src/base/uvm_cmdline_processor.svh 61 called from /home/uvm/src/base/uvm_root.svh 275 called from /home/uvm/src/base/uvm_root.svh 255 called from /home/uvm/src/uvm_pkg.sv 0 Do I need some new switches or options to run UVM 1.0 on Questasim? Thanks - Cliff Cummings Quote Link to comment Share on other sites More sharing options...
lenguyen8888 Posted March 6, 2011 Report Share Posted March 6, 2011 Hi Cliff, I ran into the same issue. There are 2 possible solutions: 1. Add +define+UVM_NO_DPI 2. Follow the examples/simple/phases/run_test/Makefile.questa (or any other simple examples). Please note your gcc/g++ version, the code would not work with older GCC (mine is gcc-4.3.2) By default, UVM would bring in some DPI for regexp in the new resource configuration. Hope that this helps, Nguyen Le Quote Link to comment Share on other sites More sharing options...
David Long Posted March 16, 2011 Report Share Posted March 16, 2011 (edited) Hi Cliff, UVM 1.0 requires some DPI code - you need to include it in your compiler options file, e.g. +incdir+${UVM_HOME}/src ${UVM_HOME}/src/dpi/uvm_dpi.cc Your UVM-EA examples should then build OK with Questa version 10. Note that you will also need to update the phase semantics in your UVM-EA examples to match UVM 1.0 (or you are likely to see your simulation exit at time 0). If you do not want to modify your OVM/UVM-EA code, the other alternative is to add the +UVM_OVM_RUN_SEMANTIC command line option to qverilog. Additional Note: You do not need to set the incdir if you are using the version of UVM included with Questa (as opposed to a version from the Accellera web site) - it is set implicitly to path_to_uvm_pkg/../verilog_src/uvm-1.0/src Regards, Dave Edited March 18, 2011 by David Long Added note Quote Link to comment Share on other sites More sharing options...
dave_59 Posted March 18, 2011 Report Share Posted March 18, 2011 Please see http://go.mentor.com/uvm1-0-questa for instructions for running Questa 10.0a with the UVM. Quote Link to comment Share on other sites More sharing options...
R_C1363912821 Posted March 25, 2011 Report Share Posted March 25, 2011 Please see http://go.mentor.com/uvm1-0-questa for instructions for running Questa 10.0a with the UVM. Dave, thanks for pointing to the link. The link specifiies following commands to run on windows vlib work vlog hello.sv cp $UVM_HOME/lib/uvm_dpi.dll . vsim -c -sv_lib ./uvm_dpi … Questasim 10.0beta2 version does not contain lib directory or uvm_dpi.dll file. The Accellera uvm does contain uvm_dpi.svh and uvm_dpi.cc. Can you please specify steps for 10.0beta2 Quote Link to comment Share on other sites More sharing options...
dave_59 Posted March 25, 2011 Report Share Posted March 25, 2011 If you are using a release prior to 10.0a, then you must follow the directions Building the UVM DPI Shared Object Yourself setting $UVM_HOME to the location where you downloaded the Accelera kit. Questa 10.0a was the first release that included the Accellera kit. Dave Quote Link to comment Share on other sites More sharing options...
R_C1363912821 Posted March 29, 2011 Report Share Posted March 29, 2011 Dave, Using vsim -c -sv_lib ./uvm_dpi … with Questa 10.0a makes it working without any error/warning. Nguyen Le, First solution 1. Add +define+UVM_NO_DPI does not works. Thanks, RC Quote Link to comment Share on other sites More sharing options...
krunal.kapadiya Posted May 11, 2011 Report Share Posted May 11, 2011 To run any UVM example with questasim10.0a, no need to add +define+UVM_NO_DPI". Just set the environment of UVM_HOME for methodology & MTI_HOME for simulator as mentioned below, any UVM example will run. setenv UVM_HOME ~/uvm-1.0p1/src setenv MTI_HOME ~/questa10.0/questasim Krunal Kapadiya eInfochips Pvt Ltd. www.einfochips.com Quote Link to comment Share on other sites More sharing options...
enchanter Posted June 8, 2011 Report Share Posted June 8, 2011 What's difference between the simulation with or without "+define+UVM_NO_DPI" ? What's difference between the two solution? 1. Add +define+UVM_NO_DPI 2. Follow the examples/simple/phases/run_test/Makefile.questa (or any other simple examples). Please note your gcc/g++ version, the code would not work with older GCC (mine is gcc-4.3.2) Quote Link to comment Share on other sites More sharing options...
chandan Posted March 17, 2014 Report Share Posted March 17, 2014 I am able to run by defining -sv_lib as suggested in http://go.mentor.com/uvm1-0-questa. qverilog +incdir+../../../src ../../../src/uvm.sv +incdir+. ${FILES} -R -sv_lib ../../../win64/uvm_dpi chandan 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.