Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1074

NCSim 15.10 fails to execute VPI function

$
0
0

Dear all,


at our institute we are using Cadence Incisive for simulating behavioral RTL designs of open-source microprocessors. So far, we used an older version (12.10) with which everything was running fine. Now, however, we upgraded to 15.10, which causes a problem, which I will explain next. I hope you have an idea how to resolve this issue. We use RHEL 6 as operating system.

We use irun to simulate a combination of C++-code and Verilog code. Therefore, VPI functions are used. While with INCISIVE 12.10 this works fine, with 15.10 the following code leads to a simulation error:


int getArchRegValue_calltf(char *user_data)
{
  int data;
  vpiHandle systf_handle, arg_iterator, arg_handle, reg_handle;
  s_vpi_value current_value;
  s_vpi_value value_s;
  //unsigned long long instruction;

  /* obtain a handle to the system task instance. */
  systf_handle  = vpi_handle(vpiSysTfCall, 0);

  /* obtain handle to system task argument. */
  arg_iterator  = vpi_iterate(vpiArgument, systf_handle);
  reg_handle    = vpi_scan(arg_iterator);

  /* free iterator memory */
  vpi_free_object(arg_iterator);

  /* read current value */
  current_value.format = vpiIntVal;  /* read value as a integer */
  vpi_get_value(reg_handle, &current_value);

 
  data = (unsigned int) THREAD[0]->get_arch_reg_value(current_value.value.integer);
  //vpi_printf("Arch Reg:%d Value:%x\n",current_value.value.integer,data);

  value_s.format        = vpiIntVal;
  value_s.value.integer = data;

 
  vpi_put_value(systf_handle, &value_s, 0, vpiNoDelay);

  return(0);

}


The critical line is " vpi_get_value(reg_handle, &current_value);", which is a VPI function call. Up to our understanding this library should be included in the INCISIVE release.

The error message is:


ncsim: *F,INTERR: INTERNAL EXCEPTION
Observed simulation time : 0 FS + 0
-----------------------------------------------------------------
The tool has encountered an unexpected condition and must exit.
Contact Cadence Design Systems customer support about this
problem and provide enough information to help us reproduce it,
including the logfile that contains this error message.
  TOOL: ncsim   15.10-s002
  HOSTNAME: XXX
  OPERATING SYSTEM: Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64
  MESSAGE: sv_seghandler - trapno -1 addr(0xeddfdb9c)
-----------------------------------------------------------------
System task:  $getArchRegValue
  file:  fabscalar/simulate.v
  line:  218
csi-ncsim - CSI: Cadence Support Investigation, sending details to ncsim_35424.err
csi-ncsim - CSI: investigation complete, send ncsim_35424.err to Cadence Support
***Current stack trace:
 -->[VPI Overhead    ] 0x83307eb <don't know>        
make: *** [run_nc_beh] Error 255


and the ncsim.err file includes the following message:


csi-ncsim - CSI: Command line:
ncsim
    -f INCA_libs/irun.lnx86.15.10.nc/XXX_35424/ncsim.args
        -INPUT commands/commands.tcl
        -MESSAGES
        +EMGRLOG run.log
        -XLSTIME 1464607385
        -XLKEEP
        -XLMODE ./INCA_libs/irun.lnx86.15.10.nc
        -RUNMODE
        -CDSLIB ./INCA_libs/irun.lnx86.15.10.nc/cds.lib
        -HDLVAR ./INCA_libs/irun.lnx86.15.10.nc/hdl.var
        -XLNAME irun
        -XLVERSION TOOL:        irun    15.10-s002
        -XLNAME ./INCA_libs/irun.lnx86.15.10.nc/XXX_35424
    -CHECK_VERSION TOOL:        irun    15.10-s002
    -LOG_FD 4
    -LOG_FD_NAME run.log
    -cmdnopsim
    -runlock INCA_libs/irun.lnx86.15.10.nc/.nclib.lock
    -runscratch INCA_libs/irun.lnx86.15.10.nc/i83compute2_35424

csi-ncsim - CSI: *F,INTERR: INTERNAL EXCEPTION
Observed simulation time : 0 FS + 0
-----------------------------------------------------------------
The tool has encountered an unexpected condition and must exit.
Contact Cadence Design Systems customer support about this
problem and provide enough information to help us reproduce it,
including the logfile that contains this error message.
  TOOL: ncsim   15.10-s002
  HOSTNAME: XXX
  OPERATING SYSTEM: Linux 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64
  MESSAGE: sv_seghandler - trapno -1 addr(0xeddfdb9c)
-----------------------------------------------------------------

csi-ncsim - CSI: Cadence Support Investigation, recording details
Simulator Snap Shot: gd (SSS_GD) in snapshot worklib.simulate:v (SSS)
Intermediate File: data block (IF_BLK) in snapshot worklib.simulate:v (SSS)
User Code in function: __kernel_rt_sigreturn offset 0
Verilog Syntax Tree: identifier expression (VST_E_IDENTIFIER) in module worklib.simulate:v (VST)
        File: fabscalar/simulate.v, line 218, position 60
        Scope: simulate.Processor_Initialization
        Decompile: i
        Source  :       fabScalar.reg_read.PhyRegFile1.sram[i] = $getArchRegValue(i);
        Position:                                                                 ^
Verilog Syntax Tree: register declaration (VST_D_REG) in module worklib.simulate:v (VST)
        File: fabscalar/simulate.v, line 148, position 9
        Scope: simulate.Processor_Initialization
        Decompile: integer i
        Source  :  integer i;
        Position:          ^
Verilog Syntax Tree: identifier expression (VST_E_IDENTIFIER) in module worklib.simulate:v (VST)
        File: fabscalar/simulate.v, line 218, position 60
        Scope: simulate.Processor_Initialization
        Decompile: i
        Source  :       fabScalar.reg_read.PhyRegFile1.sram[i] = $getArchRegValue(i);
        Position:                                                                 ^
Internal Code in function: vpi_get_value offset 88
User Code in function: _Z22getArchRegValue_calltfPc offset 101 in ./INCA_libs/irun.lnx86.15.10.nc/librun.so
Verilog Syntax Tree: system function call expression (VST_E_SYSTEM_FUNCTION_CALL) in module worklib.simulate:v (VST)
        File: fabscalar/simulate.v, line 218, position 58
        Scope: simulate.Processor_Initialization
        Decompile: $getArchRegValue()
        Source  :       fabScalar.reg_read.PhyRegFile1.sram[i] = $getArchRegValue(i);
        Position:                                                               ^
Intermediate File: array of pointers (IF_PTRBLK) in snapshot worklib.simulate:v (SSS)
Error: Error processing stack frame(11) - skipping rest of frame!
csi-ncsim - CSI: investigation complete took 0.002 secs, send this file to Cadence Support


As you can see a function getArchRegValue() is called, which contains the VPI call that fails in 15.10 but not in 12.10.

The simulation is started with:

irun -access rwc -expand -l run.log -top worklib.simulate:v $(NCSC_RUNARGS) $(FILES_BEH) $(VPI_FILES) -loadvpi :initializeSim.initializeSim,readOpcode_calltf.readOpcode_calltf,readOperand_calltf.readOperand_calltf -input commands/commands.tcl

We really appreciate, if you can help us to resolve this issue. Please feel free to ask for more details, if required. Thank you very much.


Viewing all articles
Browse latest Browse all 1074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>