Jump to content

Trouble running Questasim 10.0a with simple UVM example


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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 by David Long
Added note
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 4 weeks later...

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)

Link to comment
Share on other sites

  • 2 years later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...