Lets try again this time without the compile script.
Regards,
Hans.
www.ht-lab.com
-----Original Message-----
From: hans@ht-lab
Sent: Thursday, February 17, 2011 6:18 PM
To: vhdl-200x@eda.org
Subject: [vhdl-200x] {Filename?} DPI example
Warning: This message has had one or more attachments removed
Warning: (simple_dpi_test.zip, run.bat).
Warning: Please read the "EDA-Attachment-Warning.txt" attachment(s) for more
information.
Hi All,
As mentioned during the meeting I have attached a simple 2 way DPI example.
If you look at tb.sv you will see that in line 53 a simple C function is
called. The only thing you need to do to make this work is to "import" the
function which is done in line 20.
Then in the my_function.c code the C function calls a SV function which is
defined in the tb.sv file. To call a SV from C you need to "export" the
function which is done in line 25 of the tb.sv code.
A simple struct (packet) is passed from SV to C and back to SV again.
Would this be possible with the VHPI?
Regards,
Hans.
www.ht-lab.com
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
This archive was generated by hypermail 2.1.8 : Thu Feb 17 2011 - 10:26:32 PST