Le mer 28/07/10 23:18 , Felipe Balbi a écrit:: >Hi all, >How can I create a library out of a design to be re-used by other >designs ? Is it so that I just have to analyze the design and put >it under /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/vhdl/lib// ?? no :-)
maybe you mistake "package" and "library". VHDL uses "packages". you should know this : http://www.effectgames.com/demos/canvascycle/?sound=0 (i just googled it) you can make VHDL packages ("libraries") very easily and they are often in the same directory. There are more sophisticated possibilities but you can start by compiling your .vhdl file containing the shared code. By default the output goes to the current directory and your architectures can use it with the "work" access path : file mypackage.vhdl : package mypackage is begin .... declarations end mypackage; package body mypackage is begin ... code, etc. end mypackage include the package in another entity : use work.mypackage.all; entity myentity ..... compile with ghdl and run : ghdl -a mypackage.vhdl myentity.vhdl ghdl -e myentity ./myentity this works all the time :-) >Best Regards, >Felipe Balbi yg _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
