Hello,

 

I am a new
at GHDL too.

 

About the
example published in Linux Mag of Mai 2010.

I did this

 

$ gcc -c ext_fonction.c 

 

$ ghdl -a
ext_c.vhdl include_function.vhdl 

 

$ ghdl -e
-Wl,ext_fonction.o inclfunc 

c:\outils\Ghdl\Bin\ghdl.exe: unknown option '-Wl,ext_fonction.o'
for command '-e' »

 

Could you
explain me why I have this error.

I use
Cygwin for windows.

Version :

GCC : 3.4.4

 
Benoit Gasch



Sources
Code

 

/* fichier : ext_fontion.c */

 

#include
<stdio.h>

 

int
print_int(int a){

  printf("%d\n",a);

  return a++;

}

 

 

-- fichier VHDL : ext_c.vhdl

 

package
ext_c is 

 function print_int(a:integer) return integer;

 attribute foreign of print_int :

   function is "VHPIDIRECT
print_int";

end ext_c;

 

package
body ext_c is

  function print_int(a:integer) return integer
is

    begin

      assert false severity failure;

    end print_int;

end ext_c;

 

 

-- fichier
: include_function.vhdl

 

entity
inclfunc is

end
inclfunc;

 

use
work.ext_c.all;

 

architecture
behav of inclfunc is

 

begin  -- behav

  process

    variable a : integer := 42;

  begin 
-- process

    loop

      a := print_int(a);

      exit when a > 46;

    end loop;

   wait;

  end process;

end behav;

                                          
_________________________________________________________________
Exclu : Téléchargez la nouvelle version de Messenger !
http://clk.atdmt.com/FRM/go/244627952/direct/01/
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to