Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
print.h
#include <stdio.h>
extern "C" {
void c_print();
}
print.cc
#include "print.h"
void c_print(){
printf("c_print\n");
}
top.sv
module top;
import "DPI-C" function void c_print();
initial
begin
$display("sv_print.");
c_print();
end
endmodule
I just want to know how to add...
here is the wrong message.
- - - Updated - - -
the method you provide can solve the problem.
but when i have too many cc file, this way do not a good solution.
can you find out another way that can include cc file in filelist. thanks.
my fold contain these files:
top.sv
dpi.h
dpi.cc
I do vcs command like this :
vcs -sverilog top.sv dpi.c -R
The result is ok.
But when use file list options like this:
vcs -sverilog -f filelist -R
$cat filelist
top.sv
dpi.h
dpi.cc
the result is wrong.
can any body help me about this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.