aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-06 20:22:27 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-06 20:22:27 +0100
commit59ddac0209695d4f54c88f77e7a954feb5ab1aec (patch)
tree6447eab96df5c2e538a01347b54dec8216890e6a
parent7f899ec4bc94c15f71be4a654bddc50d350e22bb (diff)
downloadghdl-59ddac0209695d4f54c88f77e7a954feb5ab1aec.tar.gz
ghdl-59ddac0209695d4f54c88f77e7a954feb5ab1aec.tar.bz2
ghdl-59ddac0209695d4f54c88f77e7a954feb5ab1aec.zip
Rewrite README.
-rw-r--r--Makefile.in8
-rw-r--r--README126
2 files changed, 72 insertions, 62 deletions
diff --git a/Makefile.in b/Makefile.in
index a3e58d433..64353db82 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -62,11 +62,13 @@ all: Makefile all.$(backend)
install: install.$(backend)
-all.mcode: ghdl.mcode libs.vhdl.mcode
+check: check.$(backend)
Makefile: $(srcdir)/Makefile.in
./config.status
+all.mcode: ghdl.mcode libs.vhdl.mcode
+
GRTSRCDIR=$(srcdir)/src/grt
include $(GRTSRCDIR)/Makefile.inc
@@ -208,7 +210,7 @@ install.vhdl.srcs:
done
install.vhdl.mcode: install.dirs #libs.vhdl.mcode
-# Create library dirs
+# Copy libraries and relocate source files.
for d in v08/ieee v08/std v87/ieee v87/std v87/synopsys \
v93/ieee v93/mentor v93/std v93/synopsys; do \
$(MKDIR) -p $(DESTDIR)$(VHDL_LIB_DIR)/$$d; \
@@ -221,7 +223,7 @@ install.vhdl.mcode: install.dirs #libs.vhdl.mcode
done
install.program: install.dirs ghdl.mcode
- $(INSTALL_PROGRAM) ghdl $(bindir)
+ $(INSTALL_PROGRAM) ghdl $(DESTDIR)$(bindir)
install.mcode: install.program install.vhdl.srcs install.vhdl.mcode
diff --git a/README b/README
index ab3fff6bd..e2627193d 100644
--- a/README
+++ b/README
@@ -1,67 +1,75 @@
This directory contains the sources of GHDL, the VHDL simulator.
+GHDL fully supports IEEE 1076-1987, IEEE 1076-1993, IEE 1076-2002 and
+partially the 1076-2008 version of VHDL.
+
GHDL is free software. See the file COPYING for copying permission.
The manuals, and some of the runtime libraries, are under different
terms; see the individual source files for details.
-### Creating a source tar. ###
-##############################
-
-GHDL requires GCC to be compiled. The exact version of GCC is defined in
-./translate/gcc/dist.sh, in the GCCVERSION= line. Do not try to change the
-version, this may not compile or create a buggy compiler.
-
-The GHDL sources provided on http://ghdl.free.fr do not exactly match the
-files hierarchy here. The later are used to directly build a compiler and
-follow what GCC expect, while the former are used to do development and
-are more logically organized.
-
-Use the ./translate/gcc/dist.sh script to create sources to be included in GCC:
-$ cd translate/gcc
-$ ./dist.sh sources
-# This generates a ghdl-VERSION.tar.bz2 file.
-
-
-### Compiling for development. ###
-###################################
-
-These steps can make GHDL development hard. You can avoid to compile GCC
-everytime. To do this, edit ortho/gcc/Makefile and set two variables:
-AGCC_GCCSRC_DIR is the GCC sources directory, while AGCC_GCCOBJ_DIR is where
-you have compiled GCC+GHDL once. Then, you can compile:
-the GHDL back-end (ghdl1) in ./translate:
- $ make BE=gcc
-the GHDL driver in ./translate/ghdldrv:
- $ make ghdl_gcc
-the VHDL libraries (in ./translate/ghdldrv; you may need to slighly edit
- Makefile to change the compiler):
- $ ln -sf ghdl_gcc ghdl
- $ make install.all
-and the GHDL run-time (GRT) in ./translate/grt:
- $ make
-To use this GRT, you must create two links in translate/lib:
- $ ln -s ../grt/grt.lst .
- $ ln -s ../grt/libgrt.a .
-
-Once this is done, you can use the ghdl_gcc from translate/ghdldrv.
-
-### Compiling and using the debug back-end. ###
-################################################
-
-Debugging GHDL outputs can be very difficuly with the GCC back-end, since you
-don't see the high level code generated by GHDL. To help debugging the
-translator, I have written a debug back-end. This back-end is used instead of
-the GCC back-end and displays pseudo-code (as well as declarations). This
-pseudo-code can be then compiled with a reader.
-To compile it, go to ./translate:
- $ make BE=debug
-This creates a ghdl1-debug. Then go to ./ortho/oread and compile the reader:
- $ make BE=gcc
-You can now use this chain by adding the '--post' option to the ghdl driver:
- $ ghdl_gcc -a --post my_file.vhdl
-This creates an intermediate file my_file.on, which is then compiled by
- oread-gcc.
-
-Tristan.
+Building GHDL (Short instructions)
+**********************************
+
+You need GNAT for x86 (32 bits). See below for instructions
+
+$ ./configure
+$ make
+
+At that place, you can already use the 'ghdl' built in the directory.
+You can also install it:
+$ make install
+
+That's all!
+
+Build GHDL (Long instructions)
+******************************
+
+GHDL supports many backend (code generator), so you first must choose
+the backend you want to use. There are currently 3 supported backends:
+
+* gcc
+* mcode (this is an internal code generator for i386)
+* llvm (experimental)
+
+Here is a short comparaison:
+
+* gcc:
++ generated code is faster (particularly with -O or -O2)
++ generated code can be debugger (with -g)
++ the output is an executable
++ ported to many platforms (x86, x86_64, powerpc, sparc)
+- analyze can takes time (particularly for big units)
+- build is more complex
+
+* mcode
++ easy to build
+- but i386 only
++ very quick analysis time
++ can analyze very big designs
+- simulation is slower
+- no executable created
+
+* llvm
+- still experimental
++ same advantages of gcc (good generated code, debuggable)
++ easier to build than gcc
+
+As GCC is written in Ada, you need to use the GNU Ada compiler (GNAT).
+I recommend to use GNAT GPL from http://libre.adacore.com (free).
+If you build with the mcode backend, you need an i386 version of GNAT.
+
+* Building with mcode backend.
+This is as simple as:
+$ ./configure --prefix=PREFIX
+ where PREFIX is the directory for installation
+$ make
+ This builds the ghdl executable, which can be used as is.
+$ make install
+ To install within PREFIX
+
+* Building with the gcc backend
+TODO
+* Building with the llvm backend
+TODO