UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor yang0345
Visitor
13,807 Views
Registered: ‎08-13-2014

Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hi all, 

 

I'm following the DPI example from ug900-vivado-logic-simulation(ug900, latest version). Here's the sample code:

// file: function1.c

#include "svdpi.h"

DPI_DLLESPEC
int myFunction1()
{
return 5;
}

 

// file: function2.c

#include <stdio.h>
#include "svdpi.h"  //code in ug900 misses this header.

DPI_DLLESPEC
int myFunction2()
{
return 10;
}

 

// file: file.sv

module m();
import "DPI-C" pure function int myFunction1 ();
import "DPI-C" pure function int myFunction2 ();
integer i, j;
initial
begin
#1;
i = myFunction1();
j = myFunction2();
$display(i, j);
if( i == 5 && j == 10)
$display("PASSED");
else
$display("FAILED");
end
endmodule

 

And compilation and linking work successfully as follows:

» xsc function1.c function2.c
Multi-threading is on. Using 2 slave threads.
Running compilation flow
Waiting for 2 sub-compilation(s) to finish...
0 sub-compilation(s) remaining...
Done compilation
Done linking: "/home/liwei/test/Xi_IP/IP_test/xsim.dir/xsc/dpi.so"

 

» xelab -svlog file.sv -sv_lib dpi
Vivado Simulator 2014.4
Copyright 1986-1999, 2001-2014 Xilinx, Inc. All Rights Reserved.
Running: /opt/Xilinx/Vivado/2014.4/bin/unwrapped/lnx64.o/xelab -svlog file.sv -sv_lib dpi
Multi-threading is on. Using 2 slave threads.
WARNING: [XSIM 43-3431] One or more environment variables have been detected which affect the operation of the C compiler. These are typically not set in standard installations and are not tested by Xilinx, however they may be appropriate for your system, so the flow will attempt to continue. If errors occur, try running fuse with the "-mt off -v 1" switches to see more information from the C compiler. The following environment variables have been detected:
LIBRARY_PATH
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/test/Xi_IP/IP_test/file.sv" into library work
INFO: [VRFC 10-311] analyzing module m
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
Completed simulation data flow analysis
Time Resolution for simulation is 1ps
Compiling module work.m
Waiting for 3 sub-compilation(s) to finish...
0 sub-compilation(s) remaining...
Built simulation snapshot work.m

 

However, when I click "Run Behavioral Simulation", it fails as below.

INFO: [USF-XSim-4] XSim::Simulate design
INFO: [USF-XSim-61] Executing 'SIMULATE' step in '/home/liwei/test/Xi_IP/IP_test/IP_test.sim/sim_1/behav'
INFO: [USF-XSim-98] *** Running xsim
with args "m_behav -key {Behavioral:sim_1:Functional:m} -tclbatch {m.tcl} -log {simulate.log}"
INFO: [USF-XSim-8] Loading simulator feature
Vivado Simulator 2014.4
ERROR: [Simtcl 6-50] Simulation engine failed to start: Simulation exited with status code 1.
Please see the Tcl Console or the Messages for details.

ERROR: [USF-XSim-62] 'simulate' step failed with errors. Please check the Tcl console or log files for more information.

 

Is there anything wrong with my steps? Or anything I've missed?

How can I fix this simulation failure with DPI employed?

 

Any suggestions are welcome! Thanks.

 

Here's my system info:

OS: Ubuntu 14.04LTS 64bit

Vivado: 2014.4 (licensed)

Simulator: Vivado Simulator

 

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
22,209 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Can you please pass “-cc gcc”  to xelab and see if this resolves your issue.

 

--dhiRAj

View solution in original post

0 Kudos
23 Replies
Xilinx Employee
Xilinx Employee
13,798 Views
Registered: ‎10-24-2013

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Hi,
Can you please attach the log file?
Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Visitor yang0345
Visitor
13,788 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Thank you for your reply, Vijay.

 

Attached is my vivado.log file.

0 Kudos
Xilinx Employee
Xilinx Employee
13,779 Views
Registered: ‎04-16-2012

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hello @yang0345 

 

I observe the below warning message in the log file: 

WARNING: [XSIM 43-3431] One or more environment variables have been detected which affect the operation of the C compiler. These are typically not set in standard installations and are not tested by Xilinx, however they may be appropriate for your system, so the flow will attempt to continue. If errors occur, try running fuse with the "-mt off -v 1" switches to see more information from the C compiler. The following environment variables have been detected:
LIBRARY_PATH

 

 

So as mentioned in warning message, can you try running simulation after removing the environmental variable?

 

Thanks,

Vinay

--------------------------------------------------------------------------------------------
Have you tried typing your question in Google? If not you should before posting. Also, MARK this is as an answer in case it helped resolve your query/issue.Give kudos to the post that helped you to find the solution.
0 Kudos
Xilinx Employee
Xilinx Employee
13,761 Views
Registered: ‎10-24-2013

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Hi,
This issue doesn't seems to be related to DPI. This is more onto environmental variable related. Please try the suggestion in the above post and reply for any queries.
Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Visitor yang0345
Visitor
13,736 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Thanks, vuppalaI removed LIBRARY_PATH from my .zshrc, this warning is gone now.

 

But the error remains still as below:

ERROR: [Simtcl 6-50] Simulation engine failed to start: Simulation exited with status code 1.
Please see the Tcl Console or the Messages for details.

 

ERROR: [USF-XSim-62] 'simulate' step failed with errors. Please check the Tcl console or log files for more information.
launch_simulation: Time (s): cpu = 00:00:03 ; elapsed = 00:00:06 . Memory (MB): peak = 5745.504 ; gain = 17.137 ; free physical = 3075 ; free virtual = 13393

 

Seems like this failure has nothing to do with this LIBRARY_PATH warning?

Attached is my new log file.

0 Kudos
Visitor yang0345
Visitor
13,735 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

I also tried my .sv file without calling imported functions from .c files by simply commenting out these two line:

// i = myFunction1();
// j = myFunction2();

 

Now the simulation is started successfully, although the two integers are all of "X".

So it seems like that this simulation failure still has something to do with the DPI imported functions?

0 Kudos
Xilinx Employee
Xilinx Employee
13,716 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hi,

 

From the log file, it's clear that it's running xvlog, xelab and Xsim. Not to run DPI related test case, you need to run XSC as well to compile the C file to generate shared library and then link that to xelab command. As DPI is beta in 2014.4, our Vivado infrastructure is not in place to run DPI test case correctly from Vivado so you need to run them in command line mode.

 

You don't need to invoke Vivado rather invoke the exact set of comment mentioned in UG-900 i.e

 

xsc function1.c function2.c
xelab -svlog file.sv -sv_lib dpi -R

 

or 

 

xsc -compile function1.c function2.c -work abc
xsc -link abc/function1.lnx64.o abc/function2.lnx64.o -work abc
xelab -svlog file.sv -sv_root abc -sv_lib dpi -R

 

on command line.

 

 

--dhiRAj

 

0 Kudos
Visitor yang0345
Visitor
13,711 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Thanks dprasad,

Actually I've performed 'xsc' and 'xelab'. Both of them worked at my previous trial.
I just didn't use '-R' for xelab. So this time, I used your command after xsc but it still failed. Here's the command line output.

» xelab -svlog file.sv -sv_lib dpi -R
Vivado Simulator 2014.4
Copyright 1986-1999, 2001-2014 Xilinx, Inc. All Rights Reserved.
Running: /opt/Xilinx/Vivado/2014.4/bin/unwrapped/lnx64.o/xelab -svlog file.sv -sv_lib dpi -R
Multi-threading is on. Using 2 slave threads.
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/test/Xi_IP/IP_test/file.sv" into library work
INFO: [VRFC 10-311] analyzing module m
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
Completed simulation data flow analysis
Time Resolution for simulation is 1ps
Compiling module work.m
Waiting for 3 sub-compilation(s) to finish...
0 sub-compilation(s) remaining...
Built simulation snapshot work.m

****** xsim v2014.4 (64-bit)
**** SW Build 1071353 on Tue Nov 18 16:47:07 MST 2014
**** IP Build 1070531 on Tue Nov 18 01:10:18 MST 2014
** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.

source xsim.dir/work.m/xsim_script.tcl
# xsim {work.m} -maxdeltaid 10000 -runall
Vivado Simulator 2014.4
ERROR: [Simtcl 6-50] Simulation engine failed to start: Simulation exited with status code 1.
Please see the Tcl Console or the Messages for details.

while executing
"xsim {work.m} -maxdeltaid 10000 -runall"
(file "xsim.dir/work.m/xsim_script.tcl" line 1)
xsim%

How can I move on from here? And what does status code 1 mean though?
0 Kudos
Visitor yang0345
Visitor
13,706 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
FYI, the snapshot is generated by xelab, here's its information.

» file xsimk
xsimk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=e43f08f0d460bbbe1f85a8838cfaf56eb36e641e, not stripped

But when I run xsim on it, it still fails:
» xsim work.m -runall

****** xsim v2014.4 (64-bit)
**** SW Build 1071353 on Tue Nov 18 16:47:07 MST 2014
**** IP Build 1070531 on Tue Nov 18 01:10:18 MST 2014
** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.

source xsim.dir/work.m/xsim_script.tcl
# xsim {work.m} -maxdeltaid 10000 -runall
Vivado Simulator 2014.4
ERROR: [Simtcl 6-50] Simulation engine failed to start: Simulation exited with status code 1.
Please see the Tcl Console or the Messages for details.

while executing
"xsim {work.m} -maxdeltaid 10000 -runall"
(file "xsim.dir/work.m/xsim_script.tcl" line 1)
xsim%
0 Kudos
Visitor jens1.602-19
Visitor
12,905 Views
Registered: ‎03-02-2015

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hi,

 

I am having the exact same problem. The moment I put a call on a imported C-function in my SystemVerilog it fails with:

 

ERROR: [Simtcl 6-50] Simulation engine failed to start: Simulation exited with status code 1.

My environment is vivado 2014.4 under 14.10 ubuntu 64Bit with a 3.16.0-31-generic kernel.

Is there anyone out there who got a DPI example running?

 

Thanks,

Jens

0 Kudos
Visitor jens1.602-19
Visitor
12,884 Views
Registered: ‎03-02-2015

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hi there,

 

I tried a little debuging with "strace" and "gdb" to get an idee what is going wrong here. So "strace" shows that my DPI shared library is opened. Interesting fact here, when SystemVerilog contains no call to the shared DPI library then XSim does not touch the DPI library.  And that's how "strace" shows the access to my DPI library:

 

[pid 4024] open("/home/jens/devel/dpi/test/xsim.dir/xsc/dpi.so", O_RDONLY|O_CLOEXEC) = 3
[pid 4024] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\5\0\0\0\0\0\0"..., 832) = 832
[pid 4024] fstat(3, {st_mode=S_IFREG|0775, st_size=7896, ...}) = 0
[pid 4024] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f962344d000
[pid 4024] mmap(NULL, 2101304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9622c2d000
[pid 4024] mprotect(0x7f9622c2e000, 2093056, PROT_NONE) = 0
[pid 4024] mmap(0x7f9622e2d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f9622e2d000
[pid 4024] close(3) = 0

 

I assume all of that is just fine. But the very same process get suisidal a moment later:

 

[pid 4024] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
[pid 4024] +++ killed by SIGSEGV (core dumped) +++
[pid 4025] <... read resumed> "", 8192) = 0
[pid 4022] <... nanosleep resumed> NULL) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
[pid 4025] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=4024, si_status=SIGSEGV, si_utime=0, si_stime=0} ---

 

At this point 'GDB' may give a little hint where to search from here. There is obviously some NULL pointer the cause. It looks that the problem occures in global constructor.

 

(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000400f0e in global constructors keyed to a ()
#2 0x000000000040159d in __libc_csu_init ()
#3 0x00007ffff71b0e55 in __libc_start_main (main=0x401290 <main>, argc=12, argv=0x7fffffffd668, init=0x401550 <__libc_csu_init>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffd658) at libc-start.c:246
#4 0x0000000000400f4d in _start ()

 

Again, if anyone had success with run XSim and some DPI function please write note.

 

Thanks, Jens

0 Kudos
Xilinx Employee
Xilinx Employee
22,210 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Can you please pass “-cc gcc”  to xelab and see if this resolves your issue.

 

--dhiRAj

View solution in original post

0 Kudos
Visitor jens1.602-19
Visitor
12,823 Views
Registered: ‎03-02-2015

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Hi dhiRAj,

 

a thousand thanks for your post. That does the trick!

I modified the "simple_import" run.csh script as follows and everything is fine.

 

  #!/bin/csh -xvf
  xsc unction.c
  xvlog -svlog file.sv
  xelab -cc gcc work.m -sv_lib dpi -R   # place here the option

 

Cheers, Jens

 

P.S. I don't find the option to mark this thread as solved?

 

0 Kudos
Scholar pratham
Scholar
12,813 Views
Registered: ‎06-05-2013

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

hi @jens1.602-19 ,

 

Glad to know the information provided to you was helpful. You dont see the option mark as an asnwer because you are not the owner of this thread that is thread is not started by other user hence you dont see the option.

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Visitor yang0345
Visitor
12,781 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Thanks, dhiRAj!

This works for me as well. I added the '-cc gcc' to Simulation Settings in Vivado GUI.

BTW can we specify which .c files to use for dpi.so in GUI?

I'm now trying a GUI flow for a simulation which involves with multiple .c files for DPI. Once the GUI flow works, I'll add the commands in .jou file into a tcl script for automation.
0 Kudos
Visitor yang0345
Visitor
12,776 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Another tiny question, if we have multiple .sv files, each of which includes DPI functions, how can we use -dpiheader to make a single header for all of them?

The tutorial only shows how to make a header from one .sv file as follows:
xelab -dpiheader file.h -svlog test.sv
0 Kudos
Xilinx Employee
Xilinx Employee
12,772 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

You can use command like

 

xelab -dpiheader file.h -svlog test.sv -svlog a.sv -svlog b.sv ...

 

--dhiRAj

0 Kudos
Visitor yang0345
Visitor
12,764 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
Hi dhiRAj,

This command didn't work as expected. Here's the command according to your example.

xelab -dpiheader file.h -svlog srand_0_32.sv -svlog rand_32.sv
Vivado Simulator 2014.4
Copyright 1986-1999, 2001-2014 Xilinx, Inc. All Rights Reserved.
Running: /opt/Xilinx/Vivado/2014.4/bin/unwrapped/lnx64.o/xelab -dpiheader file.h -svlog srand_0_32.sv -svlog rand_32.sv
Multi-threading is on. Using 2 slave threads.
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/srand_0_32.sv" into library work
INFO: [VRFC 10-311] analyzing module srand_0_32
INFO: [VRFC 10-443] port direction not specified for function/task, assuming input [/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/srand_0_32.sv:9]
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/rand_32.sv" into library work
INFO: [VRFC 10-311] analyzing module rand_32
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
Exiting after writing out the dpi header file file.h.

Then file.h only has srand_0_32.
» cat file.h
/**********************************************************************/
/* ____ ____ */
/* / /\/ / */
/* /___/ \ / */
/* \ \ \/ */
/* \ \ Copyright (c) 2003-2013 Xilinx, Inc. */
/* / / All Right Reserved. */
/* /---/ /\ */
/* \ \ / \ */
/* \___\/\___\ */
/**********************************************************************/


/* NOTE: DO NOT EDIT. AUTOMATICALLY GENERATED FILE. CHANGES WILL BE LOST. */

#ifndef DPI_H
#define DPI_H
#ifdef __cplusplus
#define DPI_LINKER_DECL extern "C"
#else
#define DPI_LINKER_DECL
#endif

#include "svdpi.h"



/* Imported (by SV) function */
DPI_LINKER_DECL DPI_DLLESPEC
void srand_0_32(
int in0);


#endif

Here're my two imported functions in two .sv files.
// srand_0_32.sv
module srand_0_32 (
input start,
output reg fin,
input [32-1:0] in0,
input clk,
input rstN
);

import "DPI-C" pure function void srand_0_32(int in0);

// rand_32.sv
module rand_32 (
input start,
output reg fin,
output reg [32-1:0] out0,
input clk,
input rstN
);

import "DPI-C" pure function int rand_32();

So, It seems like xelab can only capture the functions in the first .sv file?
0 Kudos
Xilinx Employee
Xilinx Employee
12,751 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

It's happening because you have multiple top module, please add  top module named with your command like

 

xelab -dpiheader my.h -svlog t1.v -svlog t2.v srand_0_32 rand_32

 

with this you would see hear like

___________

/* NOTE: DO NOT EDIT. AUTOMATICALLY GENERATED FILE. CHANGES WILL BE LOST. */

#ifndef DPI_H
#define DPI_H
#ifdef __cplusplus
#define DPI_LINKER_DECL extern "C"
#else
#define DPI_LINKER_DECL
#endif

#include "svdpi.h"

 

/* Imported (by SV) function */
DPI_LINKER_DECL DPI_DLLESPEC
void srand_0_32(
int in0);


/* Imported (by SV) function */
DPI_LINKER_DECL DPI_DLLESPEC
int rand_32(
);


#endif

_____________

 

 

--dhiRAj

 

0 Kudos
Visitor yang0345
Visitor
9,401 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

I added the names of top modules into the command line. But it still didn't work out.

 

» xelab -dpiheader file.h -svlog srand_0_32.sv -svlog rand_32.sv srand_0_32 rand_32
Vivado Simulator 2014.4
Copyright 1986-1999, 2001-2014 Xilinx, Inc. All Rights Reserved.
Running: /opt/Xilinx/Vivado/2014.4/bin/unwrapped/lnx64.o/xelab -dpiheader file.h -svlog srand_0_32.sv -svlog rand_32.sv srand_0_32 rand_32
Multi-threading is on. Using 2 slave threads.
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/srand_0_32.sv" into library work
INFO: [VRFC 10-311] analyzing module srand_0_32
INFO: [VRFC 10-443] port direction not specified for function/task, assuming input [/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/srand_0_32.sv:9]
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/home/liwei/devel/sochls/vast_work/build_g++-4.8/tools/shang/testsuite/benchmark/rodinia/backprop_kernel/backprop_kernel/20150311-110305-229653/pure_hw_sim/rand_32.sv" into library work
INFO: [VRFC 10-311] analyzing module rand_32
Starting static elaboration
Completed static elaboration
Starting simulation data flow analysis
Exiting after writing out the dpi header file file.h.

 

Anything I'm still missing here?

0 Kudos
Visitor yang0345
Visitor
9,400 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Here's file.h header generated.

 

» cat file.h
/**********************************************************************/
/* ____ ____ */
/* / /\/ / */
/* /___/ \ / */
/* \ \ \/ */
/* \ \ Copyright (c) 2003-2013 Xilinx, Inc. */
/* / / All Right Reserved. */
/* /---/ /\ */
/* \ \ / \ */
/* \___\/\___\ */
/**********************************************************************/


/* NOTE: DO NOT EDIT. AUTOMATICALLY GENERATED FILE. CHANGES WILL BE LOST. */

#ifndef DPI_H
#define DPI_H
#ifdef __cplusplus
#define DPI_LINKER_DECL extern "C"
#else
#define DPI_LINKER_DECL
#endif

#include "svdpi.h"

 

/* Imported (by SV) function */
DPI_LINKER_DECL DPI_DLLESPEC
void srand_0_32(
int in0);


#endif

0 Kudos
Xilinx Employee
Xilinx Employee
9,383 Views
Registered: ‎09-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution

Okay, so you are using 2014.4 and in 2014.4, we had an issue which has been fixed and will be available in 2015.1.

 

For the time being you can generate header file on each file basis and at the end, can club them in a single dpi.h file.

 

--dhiRAj

 

0 Kudos
Visitor yang0345
Visitor
9,378 Views
Registered: ‎08-13-2014

Re: Vivado 2014.4 Simulation with DPI fails in vivado simulator.

Jump to solution
OK, I see.
Anyway, thanks for the information, I need to move on for some other workarounds.
0 Kudos