[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA: using vpi help
[ Ales here, I'm reposting this since majordomo didn't recognize the
e-mail as being subscribed to the geda-dev mailinglist. Some of these
are a few weeks old, since they got misplaced. Sorry. ]
-- Cut here --
Could some body tell what I am doing wrong? I am trying to create a
simple vpi program.
the procedure I use is as follows
1)make
2)cp hello.vpi /usr/lib/ivl/
3)chmod a-x /usr/lib/ivl/hello.vpi // did this to have same permissions
as system.vpi
4)iverilog -mhello hello_test.v
5)./a.out
/home/stephen/geda2/hello.vpi/hello: Unable to link module
$hello: This task not defined by any modules. I cannot compile it.
./a.out: Program not runnable, 1 errors.
Is there some way to tell iverlog to look in the current directory for
modules ?
***********************************
/* User app source file hello.c */
#include <stdio.h>
#include <vpi_user.h>
int hello(){
vpi_printf("Hello from new VPI task\n");
}
*************************************
MakeFile
****************
0 = hello.o
CFLAG = -0
hello.vpi: $O
$(CC) -shared -o $@ $0
%.o: %.c
$(CC) $(CFLAGS) -fpic -c $<
************************************
test program
/**********************************************************************
*********************************************************************/
`timescale 1ns / 1ns
module test;
initial
begin
$hello;
$display ("this is a test \n");
#10
$finish;
end
endmodule
/**********************************************************************/