Jump to content

uvm-1.2 uvm_dpi.cc compile errors using questasim 10.2c


Roman

Recommended Posts

I met following issue in UVM-1.2 built-in example, but it could work well in UVM-1.1d.

questasim 10.3c is the same.

 

Are these versions not supporting UVM-1.2?

 

 

cybvgar-nx23:/home/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence% m Makefile.questa all
make -f Makefile.questa BITS=32 dpi_lib
make[1]: Entering directory `/home/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
mkdir -p ../../../../lib
gcc -m32 -fPIC -DQUESTA -g -W -shared -x c -I/tool/cbar/apps/questa/10.2c/questasim/include ../../../../src/dpi/uvm_dpi.cc -o ../../../../lib/uvm_dpi.so
In file included from ../../../../src/dpi/uvm_dpi.cc:38:
../../../../src/dpi/uvm_svcmd_dpi.c: In function 'walk_level':
../../../../src/dpi/uvm_svcmd_dpi.c:45: error: 'for' loop initial declaration used outside C99 mode
../../../../src/dpi/uvm_svcmd_dpi.c: At top level:
../../../../src/dpi/uvm_svcmd_dpi.c:57: error: expected ';', ',' or ')' before '=' token
make[1]: *** [dpi_lib] Error 1
make[1]: Leaving directory `/home/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
make: *** [dpi_lib32] Error 2
 
 
Link to comment
Share on other sites

Roman,

 

I suspect the problem is the version of C compiler you are using to compile the DPI code. I don't know if the UVM committee has documented their C compile requirements. I recommend you use the gcc version that is available with the version of Questa you are using.

 

Disclaimer: Unless you have a specific need to use UVM 1.2 (i.e. to provide feedback), we suggest that you stay with UVM 1.1d and continue to use the pre-compiled libraries that come with Questa. UVM 1.2 is still in transition as it being transferred to the IEEE.

Link to comment
Share on other sites

Thanks Dave.

 

The story of this case is that my friends asked me why Mentor's simulator could not work for UVM-1.2 built-in example, but other vendors could do that without any changes. You know, everyone is going to try the UVM-1.2 example and we are also on the migration way.

 

I also tried to change the gcc to MTI install dir as following changes in Makefile.questa, however I meet the same compile errors.

 

GCC     = $(MTI_HOME)/gcc-4.5.0-linux/bin/g++
 
Do you have any other suggestions?
Thanks!
 
 
cybvgar-nx23:/home/romwang/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence% m Makefile.questa all
make -f Makefile.questa BITS=32 dpi_lib
make[1]: Entering directory `/home/romwang/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
mkdir -p ../../../../lib
/tool/cbar/apps/questa/10.2c/questasim/gcc-4.5.0-linux/bin/g++ -m32 -fPIC -DQUESTA -g -W -shared -x c -I/tool/cbar/apps/questa/10.2c/questasim/include ../../../../src/dpi/uvm_dpi.cc -o ../../../../lib/uvm_dpi.so
In file included from ../../../../src/dpi/uvm_dpi.cc:38:0:
../../../../src/dpi/uvm_svcmd_dpi.c: In function 'walk_level':
../../../../src/dpi/uvm_svcmd_dpi.c:45:5: error: 'for' loop initial declarations are only allowed in C99 mode
../../../../src/dpi/uvm_svcmd_dpi.c:45:5: note: use option -std=c99 or -std=gnu99 to compile your code
../../../../src/dpi/uvm_svcmd_dpi.c: At top level:
../../../../src/dpi/uvm_svcmd_dpi.c:57:45: error: expected ';', ',' or ')' before '=' token
make[1]: *** [dpi_lib] Error 1
make[1]: Leaving directory `/home/romwang/uvm/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
make: *** [dpi_lib32] Error 2
 
Link to comment
Share on other sites

Hi Dave,

 

Above question is based on linux version.

 

My friend also tired the Questa Sim-64 10.2c win64 to compile the UVM-1.2 example.
but he met following error.
do you have any suggestion?

[Administrator@PC201408061944 ...sequence/basic_read_write_sequence]$ make -f Makefile.questa all
make -f Makefile.questa LIBNAME=uvm_dpi BITS=64 dpi_libWin
make[1]: Entering directory '/home/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
mkdir -p ../../../../lib
d:/questasim64_10.2c/gcc-4.5.0-mingw64/bin/g++.exe -g -DQUESTA -W -shared -Bsymbolic -Id:/questasim64_10.2c/include -I../../../../src ../../../../src/dpi/uvm_dpi.cc -o ../../../../lib/uvm_dpi.dll d:/questasim64_10.2c/win64/mtipli.dll -Id:/questasim64_10.2c/gcc-4.5.0-mingw64/include -lregex
C:\cygwin64\tmp\cc46pq7f.o: In function `m_uvm_report_dpi':
C:\cygwin64\home\uvm-1.2\examples\simple\sequence\basic_read_write_sequence/../../../../src/dpi/uvm_common.c:33: undefined reference to `m__uvm_report_dpi'
collect2: ld returned 1 exit status
../../../Makefile.questa:167: recipe for target 'dpi_libWin' failed
make[1]: *** [dpi_libWin] Error 1
make[1]: Leaving directory '/home/uvm-1.2/examples/simple/sequence/basic_read_write_sequence'
../../../Makefile.questa:174: recipe for target 'dpi_lib64' failed
make: *** [dpi_lib64] Error 2

Link to comment
Share on other sites

Hi Dave,

 

I tried your new Makefile.questa, but QuestaSim 10.2c could not work both on  Linux version (32bits mode in Makefile) and on Win7_64 OS with Cygwin64 tool (64bits mode in Makefile / gcc-4.5.0-mingw64).

 

Here are the full error messages.

 

1. The errors in QuestaSim vlog 10.2c Linux version with 32bits

vlib work
vlog -timescale "1ns/1ns" ../../../../src/dpi/uvm_dpi.cc -ccflags -DQUESTA -writetoplevels questa.tops +incdir+../../../../src ../../../../src/uvm.sv +incdir+. \
top.sv
QuestaSim vlog 10.2c Compiler 2013.07 Jul 18 2013
-- Compiling package uvm_pkg
** Warning: ../../../../src/base/uvm_event.svh(39): (vlog-2181) Use of a parameterized class uvm_event_callback as a type creates a default specialization.
-- Compiling package user_pkg
-- Importing package uvm_pkg
-- Compiling module top
-- Importing package user_pkg

Top level modules:
top
-- Compiling DPI C/C++ file ../../../../src/dpi/uvm_dpi.cc
vsim -voptargs=+acc=rmb -c -do "run -all; q" -l questa.log -f questa.tops
Reading pref.tcl

# 10.2c

# vsim -do {run -all; q} -l questa.log -voptargs=+acc=rmb -c top
# Loading /var/tmp/romwang@cybvgar-nx23_dpi_29739/linux_gcc-4.5.0/export_tramp.so
# ** Note: (vsim-3812) Design is being optimized...
# ** Warning: ../../../../src/base/uvm_tr_stream.svh(494): (vopt-2250) Function "do_open_recorder" has no return value assignment.
# ** Warning: ../../../../src/base/uvm_recorder.svh(678): (vopt-2250) Function "check_handle_kind" has no return value assignment.
# ** Warning: ../../../../src/tlm1/uvm_sqr_ifs.svh(248): (vopt-2250) Function "is_auto_item_recording_enabled" has no return value assignment.
# // Questa Sim
# // Version 10.2c linux Jul 18 2013
# //
# // Copyright 1991-2013 Mentor Graphics Corporation
# // All Rights Reserved.
# //
# // THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION
# // WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS
# // LICENSORS AND IS SUBJECT TO LICENSE TERMS.
# //
# Loading sv_std.std
# Loading work.uvm_pkg(fast)
# Loading work.user_pkg(fast)
# ** Note: (vsim-8785) UVM-aware debugging capabilities will be disabled since no compiled "questa_uvm_pkg" can be found.
# This also means that later if you turn on UVM-aware debugging your debug simulations may have
# different random seeds from your non-debug simulations.
# Loading work.top(fast)
# ** Error: (vsim-3978) ../../../../src/base/uvm_transaction.svh(487): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Error: (vsim-3978) ../../../../src/base/uvm_transaction.svh(676): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Error: (vsim-3978) ../../../../src/base/uvm_component.svh(2597): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Error: (vsim-3978) ../../../../src/base/uvm_component.svh(2810): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Error: (vsim-3978) ../../../../src/base/uvm_component.svh(2762): Illegal assignment to class work.uvm_pkg::uvm_event #(class work.uvm_pkg::uvm_object) from unknown class type
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# Error loading design
Error loading design
make: *** [run] Error 12

 

 

2. The errors in QuestaSim vlog 10.2c win64 in Win7_64 OS and Cygwin64 tool

(64bits mode in Makefile / gcc-4.5.0-mingw64)

 

[Administrator@PC201408061944 ...sequence/basic_read_write_sequence]$ make -f Makefile.questa all
vlib work
vlog -timescale "1ns/1ns" -ccflags -DQUESTA -writetoplevels questa.tops +incdir+../../../../src ../../../../src/uvm.sv +incdir+. \
top.sv
QuestaSim-64 vlog 10.2c Compiler 2013.07 Jul 19 2013
-- Compiling package uvm_pkg
** Warning: ../../../../src/base/uvm_event.svh(39): (vlog-2181) Use of a parameterized class uvm_event_callback as a type creates a default specialization.
-- Compiling package user_pkg
-- Importing package uvm_pkg
-- Compiling module top
-- Importing package user_pkg

Top level modules:
top
vsim -voptargs=+acc=rmb -c -do "run -all; q" -l questa.log -f questa.tops
Reading D:/questasim64_10.2c/tcl/vsim/pref.tcl

# 10.2c

# vsim -do {run -all; q} -l questa.log -voptargs=+acc=rmb -c top
# Loading C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\export_tramp.dll
# ** Note: (vsim-3812) Design is being optimized...
#
# ** Warning: ../../../../src/base/uvm_tr_stream.svh(494): (vopt-2250) Function "do_open_recorder" has no return value assignment.
#
# ** Warning: ../../../../src/base/uvm_recorder.svh(678): (vopt-2250) Function "check_handle_kind" has no return value assignment.
#
# // Questa Sim-64
# // Version 10.2c Unknown Platform Jul 19 2013
# //
# // Copyright 1991-2013 Mentor Graphics Corporation
# // All Rights Reserved.
# //
# // THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION
# // WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS
# // LICENSORS AND IS SUBJECT TO LICENSE TERMS.
# //
# Loading sv_std.std
# Loading work.uvm_pkg(fast)
# Loading work.user_pkg(fast)
# ** Note: (vsim-8785) UVM-aware debugging capabilities will be disabled since no compiled "questa_uvm_pkg" can be found.
#
# This also means that later if you turn on UVM-aware debugging your debug simulations may have
#
# different random seeds from your non-debug simulations.
#
# Loading work.top(fast)
# Compiling C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\exportwrapper.c
# Loading C:\cygwin64\tmp\Administrator@PC201408061944_dpi_4772\win64_gcc-4.5.0\dpi_auto_compile.dll
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_check_path' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_deposit' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_force' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_release_and_read' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_release' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_hdl_read' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_get_next_arg_c' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_get_tool_name_c' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_get_tool_version_c' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_regcomp' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_regexec' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dpi_regfree' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_re_match' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_dump_re_cache' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# ** Warning: (vsim-3770) Failed to find user specified function 'uvm_glob_to_re' in DPI C/C++ source files.
# Time: 0 ns Iteration: 0 Region: /uvm_pkg File: ../../../../src/uvm_pkg.sv
# run -all
# ** Fatal: (vsim-160) ../../../../src/dpi/uvm_svcmd_dpi.svh(27): Null foreign function pointer encountered when calling 'uvm_dpi_get_next_arg_c'
# Time: 0 ns Iteration: 0 Process: /uvm_pkg/#INITIAL#212 File: ../../../../src/dpi/uvm_svcmd_dpi.svh
# Fatal error in Module uvm_pkg at ../../../../src/dpi/uvm_svcmd_dpi.svh line 27
#
# HDL call sequence:
# Stopped at ../../../../src/dpi/uvm_svcmd_dpi.svh 27 Module uvm_pkg
# called from ../../../../src/dpi/uvm_svcmd_dpi.svh 32 Module uvm_pkg
# called from ../../../../src/base/uvm_cmdline_processor.svh 247 Function uvm_pkg/uvm_cmdline_processor::new
# called from ../../../../src/base/uvm_cmdline_processor.svh 62 Function uvm_pkg/uvm_cmdline_processor::get_inst
# called from ../../../../src/base/uvm_root.svh 339 Function uvm_pkg/uvm_root::new
# called from ../../../../src/base/uvm_root.svh 271 Function uvm_pkg/uvm_root::m_uvm_get_root
# called from ../../../../src/base/uvm_coreservice.svh 184 Function uvm_pkg/uvm_default_coreservice_t::get_root
# called from ../../../../src/base/uvm_root.svh 326 Function uvm_pkg/uvm_root::get
# called from ../../../../src/base/uvm_root.svh 315 Module uvm_pkg
#
# q
Makefile.questa:34: recipe for target 'run' failed
make: *** [run] Error 1

Link to comment
Share on other sites

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...