Altera_Forum
Honored Contributor
12 years agoSIGSEGV in Modelsim using DPI tasks
I am trying to use DPI-C to import tasks into a Modelsim Verilog simulation. Some of them appear to work fine, but on others I get and error such as the following:# ** Fatal: (SIGSEGV) Bad handle or reference.
# Time: 90 ps Iteration: 1 Process: /axi_test/reader_i/#ALWAYS#72 File: ../src/axi_reader.sv # Fatal error in Module axi_reader at ../src/axi_reader.sv line 49 # # HDL call sequence: # Stopped at ../src/axi_reader.sv 49 Module axi_reader # called from ../src/axi_reader.sv 84 Module axi_reader In this case, line 84 is where the task is called, and line 49 is the last line of the import statement for the task. Line 49: import "DPI-C" task axi_readRequest(input int unsigned startAddress, input shortint unsigned burstLength); Line 84:axi_readRequest(startAddress, burstLength); The two variables (startAddress and burstLength) are declared as:int unsigned startAddress; shortint unsigned burstLength; The imported task is declared as:extern "C" int axi_readRequest(const unsigned int startAddress, const unsigned short burstLength) I am using the free version of Modelsim, version 10.1d Any pointers to where I'm going wrong would be hugely appreciated. Colin