summaryrefslogtreecommitdiff
path: root/translate
diff options
context:
space:
mode:
Diffstat (limited to 'translate')
-rwxr-xr-xtranslate/gcc/dist.sh20
-rw-r--r--translate/ghdldrv/ghdl_gcc.adb2
-rw-r--r--translate/ghdldrv/ghdl_mcode.adb2
-rw-r--r--translate/ghdldrv/ghdldrv.adb14
-rw-r--r--translate/ghdldrv/ghdlmain.adb14
-rw-r--r--translate/grt/Makefile.inc35
-rw-r--r--translate/grt/grt-vcd.adb57
-rw-r--r--translate/grt/grt-vcdz.adb2
8 files changed, 83 insertions, 63 deletions
diff --git a/translate/gcc/dist.sh b/translate/gcc/dist.sh
index c2cd8f1..ace5e82 100755
--- a/translate/gcc/dist.sh
+++ b/translate/gcc/dist.sh
@@ -47,6 +47,10 @@ tarfile=$distdir.tar
GCCVERSION=4.0.2
DISTDIR=/home/gingold/dist
+GTKWAVE_VERSION=1.3.72
+
+GTKWAVE_BASE=$HOME/devel/gtkwave-$GTKWAVE_VERSION
+
GCCDIST=$DISTDIR/gcc-$GCCVERSION
GCCDISTOBJ=$GCCDIST-objs
PREFIX=/usr/local
@@ -530,6 +534,20 @@ do_dist_phase2 ()
echo "dist_phase2 success"
}
+# Create gtkwave patch
+do_gtkwave_patch ()
+{
+# rm -rf gtkwave-patch
+ mkdir gtkwave-patch
+ diff -rc -x Makefile.in $GTKWAVE_BASE.orig $GTKWAVE_BASE | \
+ sed -e "/^Only in/d" \
+ > gtkwave-patch/gtkwave-$GTKWAVE_VERSION.diffs
+ cp ../grt/ghwlib.c ../grt/ghwlib.h $GTKWAVE_BASE/src/ghw.c gtkwave-patch
+ sed -e "s/VERSION/$GTKWAVE_VERSION/g" < README.gtkwave > gtkwave-patch/README
+ tar zcvf ../../website/gtkwave-patch.tgz gtkwave-patch
+ rm -rf gtkwave-patch
+}
+
# Update the index.html
# Update the doc
do_website ()
@@ -633,6 +651,8 @@ else
do_dist_phase1;;
dist_phase2)
do_dist_phase2;;
+ gtkwave_patch)
+ do_gtkwave_patch;;
*)
echo "usage: $0 clean|Makefile|files|all"
exit 1 ;;
diff --git a/translate/ghdldrv/ghdl_gcc.adb b/translate/ghdldrv/ghdl_gcc.adb
index 5edb6bf..a93579b 100644
--- a/translate/ghdldrv/ghdl_gcc.adb
+++ b/translate/ghdldrv/ghdl_gcc.adb
@@ -24,7 +24,7 @@ procedure Ghdl_Gcc is
begin
-- Manual elaboration so that the order is known (because it is the order
-- used to display help).
- Ghdlmain.Version_String := new String'("(Use the GCC back-end.)");
+ Ghdlmain.Version_String := new String'("GCC back-end code generator");
Ghdldrv.Register_Commands;
Ghdllocal.Register_Commands;
Ghdlprint.Register_Commands;
diff --git a/translate/ghdldrv/ghdl_mcode.adb b/translate/ghdldrv/ghdl_mcode.adb
index 3506856..56b2342 100644
--- a/translate/ghdldrv/ghdl_mcode.adb
+++ b/translate/ghdldrv/ghdl_mcode.adb
@@ -24,7 +24,7 @@ procedure Ghdl_Mcode is
begin
-- Manual elaboration so that the order is known (because it is the order
-- used to display help).
- Ghdlmain.Version_String := new String'("(Use the mcode code generator.)");
+ Ghdlmain.Version_String := new String'("mcode code generator");
Ghdlrun.Register_Commands;
Ghdllocal.Register_Commands;
Ghdlprint.Register_Commands;
diff --git a/translate/ghdldrv/ghdldrv.adb b/translate/ghdldrv/ghdldrv.adb
index d863f61..6612fb3 100644
--- a/translate/ghdldrv/ghdldrv.adb
+++ b/translate/ghdldrv/ghdldrv.adb
@@ -637,12 +637,6 @@ package body Ghdldrv is
Add_Argument (Compiler_Args, Str);
Add_Argument (Linker_Args, Str);
Res := Option_Ok;
- elsif Option'Length >= 2
- and then (Option (2) = 'O' or Option (2) = 'f')
- then
- -- Optimization option.
- Add_Argument (Compiler_Args, new String'(Option));
- Res := Option_Ok;
elsif Option = "-Q" then
Flag_Not_Quiet := True;
Res := Option_Ok;
@@ -653,6 +647,14 @@ package body Ghdldrv is
elsif Flags.Parse_Option (Option) then
Add_Argument (Compiler_Args, new String'(Option));
Res := Option_Ok;
+ elsif Option'Length >= 2
+ and then (Option (2) = 'O' or Option (2) = 'f')
+ then
+ -- Optimization option.
+ -- This is put after Flags.Parse_Option, since it may catch -fxxx
+ -- options.
+ Add_Argument (Compiler_Args, new String'(Option));
+ Res := Option_Ok;
else
Decode_Option (Command_Lib (Cmd), Option, Arg, Res);
end if;
diff --git a/translate/ghdldrv/ghdlmain.adb b/translate/ghdldrv/ghdlmain.adb
index bd2462f..717e4fc 100644
--- a/translate/ghdldrv/ghdlmain.adb
+++ b/translate/ghdldrv/ghdlmain.adb
@@ -216,16 +216,20 @@ package body Ghdlmain is
use Ada.Text_IO;
begin
Put_Line (Version.Ghdl_Version);
+ Put_Line (" Compiled with " & Bug.Get_Gnat_Version);
if Version_String /= null then
- Put_Line (Version_String.all);
+ Put (" ");
+ Put (Version_String.all);
end if;
+ New_Line;
Put_Line ("Written by Tristan Gingold.");
New_Line;
+ -- Display copyright. Assume 80 cols terminal.
Put_Line ("Copyright (C) 2003, 2004, 2005 Tristan Gingold.");
- Put_Line ("This is free software; see the source for copying conditions."
- & " There is NO");
- Put_Line ("warranty; not even for MERCHANTABILITY or FITNESS FOR A "
- & "PARTICULAR PURPOSE.");
+ Put_Line ("GHDL is free software, covered by the "
+ & "GNU General Public License. There is NO");
+ Put_Line ("warranty; not even for MERCHANTABILITY or"
+ & " FITNESS FOR A PARTICULAR PURPOSE.");
if Args'Length /= 0 then
Error ("warning: command '--version' does not accept any argument");
end if;
diff --git a/translate/grt/Makefile.inc b/translate/grt/Makefile.inc
index 9300770..55a45e9 100644
--- a/translate/grt/Makefile.inc
+++ b/translate/grt/Makefile.inc
@@ -53,34 +53,14 @@ ifndef GRT_TARGET_OBJS
GRT_EXTRA_LIB=-lpthread
endif
+# Additionnal object files (C or asm files).
GRT_ADD_OBJS=$(GRT_TARGET_OBJS) grt-cbinding.o grt-cvpi.o
+# Configuration pragmas.
GRT_PRAGMA_FLAG=-gnatec$(GRTSRCDIR)/grt.adc
-GRT_OBJS_FILES=\
-grt.o \
-grt-disp.o \
-grt-main.o \
-grt-stacks.o \
-grt-errors.o \
-grt-options.o \
-grt-stdio.o \
-grt-files.o \
-grt-processes.o \
-grt-typedesc.o \
-grt-hierarchy.o \
-grt-shadow_ieee.o \
-grt-types.o \
-grt-images.o \
-grt-signals.o \
-grt-vcd.o \
-grt-vpi.o \
-grt-lib.o \
-grt-sdf.o \
-grt-stack2.o \
-grt-names.o
-
-GRT_ADACOMPILE=$(ADAC) -c $(GRT_FLAGS) -o $@ $<
+# Rule to compile an Ada file.
+GRT_ADACOMPILE=$(ADAC) -c $(GRT_FLAGS) $(GRT_PRAGMA_FLAG) -o $@ $<
grt-all: libgrt.a grt.lst
@@ -137,9 +117,12 @@ grt-files: run-bind.adb
# Remove local files (they are now in the libgrt library).
# Also, remove the -shared option, in order not to build a shared library
-# instead of an executable.
+# instead of an executable.
+# Also remove -lgnat and its associated -L flags. This appears to be required
+# with GNAT GPL 2005.
grt-files.in: grt-files
- sed -e "\!^./!d" -e "/-shared/d" < $< > $@
+ sed -e "\!^./!d" -e "/-shared/d" -e "/-static/d" -e "/-lgnat/d" \
+ -e "\X-L/Xd" < $< > $@
grt.lst: grt-files.in
echo "@/libgrt.a" > $@
diff --git a/translate/grt/grt-vcd.adb b/translate/grt/grt-vcd.adb
index f9fd174..e2419cd 100644
--- a/translate/grt/grt-vcd.adb
+++ b/translate/grt/grt-vcd.adb
@@ -33,6 +33,10 @@ with Grt.Rtis_Types; use Grt.Rtis_Types;
with Grt.Vstrings;
package body Grt.Vcd is
+ -- If TRUE, put $date in vcd file.
+ -- Can be set to FALSE to make vcd comparaison easier.
+ Flag_Vcd_Date : Boolean := True;
+
type Vcd_IO_Simple is new Vcd_IO_Handler with record
Stream : FILEs;
end record;
@@ -79,6 +83,10 @@ package body Grt.Vcd is
if Opt'Length < 5 or else Opt (F .. F + 4) /= "--vcd" then
return False;
end if;
+ if Opt'Length = 12 and then Opt (F + 5 .. F + 11) = "-nodate" then
+ Flag_Vcd_Date := False;
+ return True;
+ end if;
if Opt'Length > 6 and then Opt (F + 5) = '=' then
if H /= null then
Error ("--vcd: file already set");
@@ -112,6 +120,7 @@ package body Grt.Vcd is
procedure Vcd_Help is
begin
Put_Line (" --vcd=FILENAME dump signal values into a VCD file");
+ Put_Line (" --vcd-nodate do not write date in VCD file");
end Vcd_Help;
procedure Vcd_Put (Str : String) is
@@ -194,29 +203,31 @@ package body Grt.Vcd is
if H = null then
return;
end if;
- Vcd_Putline ("$date");
- Vcd_Put (" ");
- declare
- type time_t is new Interfaces.Integer_64;
- Cur_Time : time_t;
-
- function time (Addr : Address) return time_t;
- pragma Import (C, time);
-
- function ctime (Timep: Address) return Ghdl_C_String;
- pragma Import (C, ctime);
-
- Ct : Ghdl_C_String;
- begin
- Cur_Time := time (Null_Address);
- Ct := ctime (Cur_Time'Address);
- for I in Positive loop
- exit when Ct (I) = NUL;
- Vcd_Putc (Ct (I));
- end loop;
- -- Note: ctime already append a LF.
- end;
- Vcd_Put_End;
+ if Flag_Vcd_Date then
+ Vcd_Putline ("$date");
+ Vcd_Put (" ");
+ declare
+ type time_t is new Interfaces.Integer_64;
+ Cur_Time : time_t;
+
+ function time (Addr : Address) return time_t;
+ pragma Import (C, time);
+
+ function ctime (Timep: Address) return Ghdl_C_String;
+ pragma Import (C, ctime);
+
+ Ct : Ghdl_C_String;
+ begin
+ Cur_Time := time (Null_Address);
+ Ct := ctime (Cur_Time'Address);
+ for I in Positive loop
+ exit when Ct (I) = NUL;
+ Vcd_Putc (Ct (I));
+ end loop;
+ -- Note: ctime already append a LF.
+ end;
+ Vcd_Put_End;
+ end if;
Vcd_Putline ("$version");
Vcd_Putline (" GHDL v0");
Vcd_Put_End;
diff --git a/translate/grt/grt-vcdz.adb b/translate/grt/grt-vcdz.adb
index 7b5144e..a6ba718 100644
--- a/translate/grt/grt-vcdz.adb
+++ b/translate/grt/grt-vcdz.adb
@@ -68,7 +68,7 @@ package body Grt.Vcdz is
end if;
if Opt'Length > 7 and then Opt (F + 7) = '=' then
if H /= null then
- Error ("--vcdz: file already set");
+ Error ("--vcdgz: file already set");
return True;
end if;