Hello,
I'm currently working in a project that I need to cosimulate two identical RTL DUTs in different HDLs (SystemC and VHDL) with a e testbench based on UVM. To do this I use irun to call necessary tools to compile and elaborate the DUTs and testbench and the call the simulator, I'm currently using Specman on master mode and ncsc to simulate the SysC DUT.
This is the way I'm invoking irun:
#! /bin/sh
SPECMAN_HOME=`sn_root -home`
##################
# env-s
##################
test_name_vhd="top.vhd utmc.vhd reset_sync.vhd"
test_name_vhd_ent=top
test_name_sc="reset_sync_main.cpp "
test_name_sc_mod=reset_sync_top
top_e_module=utmc_reset_sync_sc_config
##test_name_vhd=xor
##################
# Prepare a working directory
##################
mkdir ncsc$$
cp `dirname $0`/* ncsc$$ 1>/dev/null 2>&1;
cd ncsc$$
################
# invoke irun
################
irun "$@" \
$test_name_sc \
$test_name_vhd \
-snload ${top_e_module}.e \
-sysc \
-DSN_USE_DYNAMIC_C_INTERFACE \
-I. -I${SPECMAN_HOME} \
-top ${test_name_sc_mod} \
-top ${test_name_vhd_ent} \
-smartorder \
-v93 \
-scsynceverydelta on \
-gui
cd ..
##################
# Clean up
##################
rm -rf ncsc$$
#-scsynceverydelta on
#-sysc \
#-DSN_USE_DYNAMIC_C_INTERFACE \
#${test_name}.cpp \
Though I succeeded the cosimulation of a simple model (an XOR), when I moved to the actual DUTs I need to verify I get an error on a file that's automatically generated by irun (runvstub.cpp):
ncsc: compiling $TESTDIR/reset_sync_main.cpp
ncsc: compiling $TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp
make: *** [INCA_libs/irun.lnx8664.13.20.nc/ncsc_run/ncsc_obj/runvstub.o] Error 1
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 143: error:
identifier "top" is undefined
return snsc_convert_to_int32(top.asyncrst_n_i.read());
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 147: error:
identifier "top" is undefined
top.asyncrst_n_i.write(int_to_T_with_bp(top.asyncrst_n_i.read(),val,bit_preserve) );
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 149: error:
identifier "top" is undefined
top.asyncrst_n_i.write(uint_to_T(top.asyncrst_n_i.read(),val) );
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 153: error:
identifier "top" is undefined
put_T_to_mvl_list(3,top.asyncrst_n_i.read(),value,1);
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 156: error:
identifier "top" is undefined
top.asyncrst_n_i.write(mvl_list_to_T(3,top.asyncrst_n_i.read(),l,bp,1));
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 159: error:
identifier "top" is undefined
top.asyncrst_n_i.write(mvl_to_T(3,top.asyncrst_n_i.read(),mval));
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 191: error:
class "sc_core::sc_in<sc_dt::sc_logic>" has no member "write"
specman_p->ptr_0->asyncrst_n_i.write(int_to_T_with_bp(specman_p->ptr_0->asyncrst_n_i.read(),val,bit_preserve) );
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 193: error:
class "sc_core::sc_in<sc_dt::sc_logic>" has no member "write"
specman_p->ptr_0->asyncrst_n_i.write(uint_to_T(specman_p->ptr_0->asyncrst_n_i.read(),val) );
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 200: error:
class "sc_core::sc_in<sc_dt::sc_logic>" has no member "write"
specman_p->ptr_0->asyncrst_n_i.write(mvl_list_to_T(10,specman_p->ptr_0->asyncrst_n_i.read(),l,bp,1));
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 203: error:
class "sc_core::sc_in<sc_dt::sc_logic>" has no member "write"
specman_p->ptr_0->asyncrst_n_i.write(mvl_to_T(10,specman_p->ptr_0->asyncrst_n_i.read(),mval));
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 227: error:
identifier "top" is undefined
sensitive << sensitive_neg_wrapper(top.clk_i);
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 227: error:
no instance of overloaded function "sensitive_neg_wrapper" matches
the argument list
argument types are: (<error-type>)
sensitive << sensitive_neg_wrapper(top.clk_i);
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 234: error:
no instance of overloaded function "sensitive_pos_wrapper" matches
the argument list
argument types are: (<error-type>)
sensitive << sensitive_pos_wrapper(top.clk_i);
^
"$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp", line 241: error:
no instance of overloaded function "sensitive_pos_wrapper" matches
the argument list
argument types are: (<error-type>)
sensitive << sensitive_pos_wrapper(top.clk_i);
^
ncsc: Error executing: $CDSROOT/tools/cdsgcc/gcc/4.4/bin/g++ -DNCSC -DCADENCE -DLNX86 -I$CDSROOT/tools/systemc/include_pch/64bit -o ./INCA_libs/irun.lnx8664.13.20.nc/ncsc_run/ncsc_obj/runvstub.o -I$TESTDIR/. -I$CDSROOT/specman -I$TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s -DSN_USE_DYNAMIC_C_INTERFACE -I$CDSROOT/tools/include -I$CDSROOT/tools/inca/include -I$CDSROOT/specman -DNCSC -I$CDSROOT/tools/systemc/include_pch -I$CDSROOT/tools/tbsc/include -I$CDSROOT/tools/vic/include -I$CDSROOT/tools/methodology/OVM/CDNS-2.1.2/sc/src -I$CDSROOT/tools/methodology/UVM/CDNS-1.1d/sc/sc -I$CDSROOT/tools/methodology/UVM/CDNS-1.1d/ml/sc -I$CDSROOT/tools/systemc/include/cci -I$CDSROOT/tools/systemc/include/factory -I$CDSROOT/tools/systemc/include/tlm2 -fPIC -c -x c++ -Wall $TESTDIR/INCA_libs/irun.lnx8664.13.20.nc/specman.13.20.019-s/runvstub.cpp
ncsc_run: *E,TBBLDF: Failed to generate object ./INCA_libs/irun.lnx8664.13.20.nc/ncsc_run/ncsc_obj/runvstub.o
irun: *E,CCERR: Error during cc compilation (status 1), exiting.
This is part of the content of runvstub.cpp:
// Topmost e module: utmc_reset_sync_config.e
// Generated using seed = 1
// Generated using separator : '.'
// Date: Thu Jan 22 14:28:53 2015
// Specman Elite version: 13.20.019-s
// *****************************************************************
// surefire coverage_off
// No verilog time declaration
module specman;
// Stub attributes section
// ================================================================
parameter sn_version_id = 0; /* Stub checksum */
parameter sn_version_date = 1010908; /* Stub version */
parameter sn_use_wave = 1; /* specman_wave module existance*/
parameter sn_declarations_num = 0; /* The number of reflected HDL declarations */
parameter sn_port_unification = 2; // 1 for enabled, 2 for disabled
parameter ncvlog = 1;
parameter sn_stub_elab = 0;
// General section
// ================================================================
endmodule /* specman */
module specman_wave;
/* Errors */
parameter sn_error_num = 1;
parameter sn_error_len = 80;
reg [647:0] sn_err_str1;
/* Output */
parameter sn_message_num = 3;
parameter sn_message_len = 80;
reg [647:0] sn_msg_str1;
reg [647:0] sn_msg_str2;
reg [647:0] sn_msg_str3;
/* Events */
parameter sn_event_num = 100;
reg sn_emit_event1;
event sn_event1;
end
reg sn_emit_event2;
event sn_event2;
always @sn_emit_event2 begin
->sn_event2;
end
reg sn_emit_event3;
event sn_event3;
always @sn_emit_event3 begin
->sn_event3;
end
reg sn_emit_event4;
event sn_event4;
always @sn_emit_event4 begin
->sn_event4;
Does anyone knows what is this runvstub.cpp file? And where the source of the problem could be?