On Mon, 2014-05-12 at 18:24 +0200, [email protected] wrote: > Hello, > > as I optimise a design, I write two versions of my code, one is RTL, > the other uses vendor-specific "components" for the gates and stuff. > I can't distribute the proprietary library files so I decided to > "rewrite" the components that I use (not a big work, a dozen or so > simple gates). > > Now the question is : how do I create a new library with GHDL ? > I don't see it in the manual, which only mention a few options > but nothing is clear. Say I have a collection of entities in files, > and I want to use them as components by including "library XZY; use > XYZ.all;" > how should I organise the files and run GHDL ? > > Hopefully, the answer(s) may complement the existing manual :-) > > YG
This should be _in_ the existing manual somewhere. You don't (explicitly) create a library - simply compile entities (packages, etc) _into_ it, and it is created. ghdl -a --work=my_custom_lib my_file.vhd as simple as that. Usually you organise library sources and compiled objects into their own directories; the --workdir option is for this, i.e. ghdl -a --work=my_custom_lib --workdir=my_custom_libdir my_custom_lib_srcdir/my_file.vhd ghdl --options-help Main options: --work=LIB use LIB as work library --workdir=DIR use DIR for the file library -PPATH add PATH in the library path list - Brian _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
