[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:_gEDA:_using_vpi_help?




[ Ales here, I'm reposting this since majordomo didn't recognize the
  e-mail as being subscribed to the geda-user mailinglist.  I am way late
  on forwarding these list posts (probably useless by now), but that is
  the result if you are oddly subscribed and I go on vacation :-]

-- Cut here -- 

I have solved this problem with this "hello world" vpi and it now makes a 
bit more sense.
If people are interested I will post the real version or I might put on
my web site so that other don't have this problem.
My later problem with handles still exits but I cann't see that mail
at the moment. I might be because I am away from my usual site.
I will check on friday.
> [ 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
> /**********************************************************************/