diff options
author | gingold | 2008-09-06 03:24:23 +0000 |
---|---|---|
committer | gingold | 2008-09-06 03:24:23 +0000 |
commit | db0dacf3b4a07f26c317d7cda0c6f8882e511f88 (patch) | |
tree | 5a4e45f543f458deba660baed7d0aacfe2751322 /translate | |
parent | b42e36e23f23a0d27e7b08d6cb4461237720de3b (diff) | |
download | ghdl-db0dacf3b4a07f26c317d7cda0c6f8882e511f88.tar.gz ghdl-db0dacf3b4a07f26c317d7cda0c6f8882e511f88.tar.bz2 ghdl-db0dacf3b4a07f26c317d7cda0c6f8882e511f88.zip |
New feature: all-sensitized processes (for vhdl 2008)
Diffstat (limited to 'translate')
-rw-r--r-- | translate/ghdldrv/Makefile | 23 | ||||
-rw-r--r-- | translate/ghdldrv/ghdllocal.adb | 2 | ||||
-rw-r--r-- | translate/grt/grt-options.ads | 2 | ||||
-rw-r--r-- | translate/translation.adb | 18 |
4 files changed, 25 insertions, 20 deletions
diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile index 0d76bc5..66e0abd 100644 --- a/translate/ghdldrv/Makefile +++ b/translate/ghdldrv/Makefile @@ -81,39 +81,38 @@ bootstrap.old: force $(MAKE) -C ../../libraries EXT=obj \ ANALYSE="$(PWD)/ghdl -a -g" std-obj93.cf -LIB93_DIR:=../lib/v93 LIB87_DIR:=../lib/v87 +LIB93_DIR:=../lib/v93 +LIB08_DIR:=../lib/v08 + LIBSRC_DIR:=../../libraries REL_DIR:=../.. ANALYZE:=../../../ghdldrv/ghdl -a $(LIB_CFLAGS) LN=ln -s CP=cp -$(LIB87_DIR): +$(LIB87_DIR) $(LIB93_DIR) $(LIB08_DIR): [ -d ../lib ] || mkdir ../lib - [ -d $(LIB87_DIR) ] || mkdir $(LIB87_DIR) - -$(LIB93_DIR): - [ -d ../lib ] || mkdir ../lib - [ -d $(LIB93_DIR) ] || mkdir $(LIB93_DIR) + [ -d $@ ] || mkdir $@ include ../../libraries/Makefile.inc GHDL1=../ghdl1-gcc -$(LIB87_DIR)/std/std_standard.o: $(GHDL1) - $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -o std_standard.s \ +$(LIB93_DIR)/std/std_standard.o: $(GHDL1) + $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -o std_standard.s \ --compile-standard $(CC) -c -o $@ std_standard.s $(RM) std_standard.s -$(LIB93_DIR)/std/std_standard.o: $(GHDL1) - $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -o std_standard.s \ +$(LIB87_DIR)/std/std_standard.o: $(GHDL1) + $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -o std_standard.s \ --compile-standard $(CC) -c -o $@ std_standard.s $(RM) std_standard.s install.v93: std.v93 ieee.v93 synopsys.v93 mentor.v93 install.v87: std.v87 ieee.v87 synopsys.v87 +install.v08: std.v08 install.standard: $(LIB93_DIR)/std/std_standard.o \ $(LIB87_DIR)/std/std_standard.o @@ -122,7 +121,7 @@ grt.links: cd ../lib; ln -sf $(GRTSRCDIR)/grt.lst .; ln -sf $(GRTSRCDIR)/libgrt.a .; ln -sf $(GRTSRCDIR)/grt.ver . install.all: install.v87 install.v93 install.standard -install.mcode: install.v87 install.v93 +install.mcode: install.v87 install.v93 install.v08 clean: force $(RM) -f *.o *.ali ghdl_gcc ghdl_mcode diff --git a/translate/ghdldrv/ghdllocal.adb b/translate/ghdldrv/ghdllocal.adb index 310dabb..5cd97b4 100644 --- a/translate/ghdldrv/ghdllocal.adb +++ b/translate/ghdldrv/ghdllocal.adb @@ -174,6 +174,8 @@ package body Ghdllocal is | Vhdl_00 | Vhdl_02 => return "v93"; + when Vhdl_08 => + return "v08"; end case; end Get_Version_Path; diff --git a/translate/grt/grt-options.ads b/translate/grt/grt-options.ads index c71abac..3057fc8 100644 --- a/translate/grt/grt-options.ads +++ b/translate/grt/grt-options.ads @@ -41,7 +41,7 @@ package Grt.Options is -- Consistent flags used for analysis. -- Format is "VVitr", where: - -- 'VV' is the version (87 or 93). + -- 'VV' is the version (87, 93 or 08). -- 'i' is the integer size ('i' for 32 bits, 'I' for 64 bits). -- 't' is the time size ('t' for 32 bits, 'T' for 64 bits). -- 'r' is the resolution ('?' for to be set by the user, '-' for any). diff --git a/translate/translation.adb b/translate/translation.adb index 24fdc76..1e56581 100644 --- a/translate/translation.adb +++ b/translate/translation.adb @@ -21370,6 +21370,7 @@ package body Translation is Constr : O_Assoc_List; Info : Proc_Info_Acc; List : Iir_List; + List_Orig : Iir_List; Final : Boolean; begin New_Debug_Line_Stmt (Get_Line_Number (Proc)); @@ -21407,16 +21408,11 @@ package body Translation is New_Lit (New_Subprogram_Address (Info.Process_Subprg, Ghdl_Ptr_Type))); Rtis.Associate_Rti_Context (Constr, Proc); --- New_Association --- (Constr, --- New_Address (New_Selected_Element --- (Get_Instance_Ref (Info.Process_Decls_Type), --- Info.Process_Name), --- Ghdl_Instance_Name_Acc)); New_Procedure_Call (Constr); -- First elaborate declarations since a driver may depend on -- an alias declaration. + -- Also, with vhdl 08 a sensitivity element may depend on an alias. Chap4.Elab_Declaration_Chain (Proc, Final); -- Register drivers. @@ -21462,9 +21458,17 @@ package body Translation is end if; if Is_Sensitized then - List := Get_Sensitivity_List (Proc); + List_Orig := Get_Sensitivity_List (Proc); + if List_Orig = Iir_List_All then + List := Canon.Canon_Extract_Process_Sensitivity (Proc); + else + List := List_Orig; + end if; Destroy_Types_In_List (List); Register_Signal_List (List, Ghdl_Process_Add_Sensitivity); + if List_Orig = Iir_List_All then + Destroy_Iir_List (List); + end if; end if; Pop_Scope (Info.Process_Decls_Type); |