summaryrefslogtreecommitdiff
path: root/translate
diff options
context:
space:
mode:
Diffstat (limited to 'translate')
-rw-r--r--translate/ghdldrv/ghdllocal.adb5
-rw-r--r--translate/ghdldrv/ghdlmain.adb11
-rw-r--r--translate/grt/grt-waves.adb2
-rw-r--r--translate/translation.adb53
4 files changed, 39 insertions, 32 deletions
diff --git a/translate/ghdldrv/ghdllocal.adb b/translate/ghdldrv/ghdllocal.adb
index 4a9f62f..9eccdcf 100644
--- a/translate/ghdldrv/ghdllocal.adb
+++ b/translate/ghdldrv/ghdllocal.adb
@@ -149,16 +149,15 @@ package body Ghdllocal is
use Ada.Text_IO;
procedure P (Str : String) renames Put_Line;
begin
- P ("Options:");
+ P ("Main options (try --options-help for details):");
P (" --std=XX Use XX as VHDL standard (87,93c,93,00 or 02)");
P (" --work=NAME Set the name of the WORK library");
P (" -PDIR Add DIR in the library search path");
P (" --workdir=DIR Specify the directory of the WORK library");
P (" --PREFIX=DIR Specify installation prefix");
-
P (" --ieee=NAME Use NAME as ieee library, where name is:");
P (" standard: standard version (default)");
- P (" synopsys, mentor: vendor version (bad)");
+ P (" synopsys, mentor: vendor version (not advised)");
P (" none: do not use a predefined ieee library");
end Disp_Long_Help;
diff --git a/translate/ghdldrv/ghdlmain.adb b/translate/ghdldrv/ghdlmain.adb
index a2eab98..8875279 100644
--- a/translate/ghdldrv/ghdlmain.adb
+++ b/translate/ghdldrv/ghdlmain.adb
@@ -132,9 +132,10 @@ package body Ghdlmain is
C := C.Next;
end loop;
New_Line;
- Put_Line
- ("To display the options of a GHDL program, run your program");
- Put_Line (" with the --help option.");
+ Put_Line ("To display the options of a GHDL program,");
+ Put_Line (" run your programm with the --help option.");
+ Put_Line ("Also see --options-help for analyzer options.");
+ New_Line;
Put_Line ("Please, refer to the GHDL manual for more information.");
Put_Line ("Report bugs on http://gna.org/projects/ghdl");
elsif Args'Length = 1 then
@@ -171,7 +172,7 @@ package body Ghdlmain is
is
pragma Unreferenced (Cmd);
begin
- return "--options-help Disp help for compiler options";
+ return "--options-help Disp help for analyzer options";
end Get_Short_Help;
procedure Perform_Action (Cmd : in out Command_Option_Help;
@@ -352,8 +353,8 @@ package body Ghdlmain is
procedure Register_Commands is
begin
Register_Command (new Command_Help);
- Register_Command (new Command_Option_Help);
Register_Command (new Command_Version);
+ Register_Command (new Command_Option_Help);
end Register_Commands;
end Ghdlmain;
diff --git a/translate/grt/grt-waves.adb b/translate/grt/grt-waves.adb
index bfe4cec..fed4086 100644
--- a/translate/grt/grt-waves.adb
+++ b/translate/grt/grt-waves.adb
@@ -305,7 +305,7 @@ package body Grt.Waves is
-- Called before elaboration.
procedure Wave_Init
is
- Mode : constant String := "wt" & NUL;
+ Mode : constant String := "wb" & NUL;
begin
if Wave_Filename = null then
Wave_Stream := NULL_Stream;
diff --git a/translate/translation.adb b/translate/translation.adb
index 051adc7..330f4a6 100644
--- a/translate/translation.adb
+++ b/translate/translation.adb
@@ -4598,30 +4598,30 @@ package body Translation is
Tinfo : Type_Info_Acc;
begin
Info := Get_Info (Inter);
- if Info.Interface_Field = O_Fnode_Null then
- case Get_Kind (Inter) is
- when Iir_Kind_Constant_Interface_Declaration
- | Iir_Kind_Variable_Interface_Declaration
- | Iir_Kind_File_Interface_Declaration =>
- Mode := Mode_Value;
- when Iir_Kind_Signal_Interface_Declaration =>
- Mode := Mode_Signal;
- when others =>
- Error_Kind ("translate_interface_type", Inter);
- end case;
- Tinfo := Get_Info (Get_Type (Inter));
- case Tinfo.Type_Mode is
- when Type_Mode_Unknown =>
- raise Internal_Error;
- when Type_Mode_By_Value =>
- return Tinfo.Ortho_Type (Mode);
- when Type_Mode_By_Copy
- | Type_Mode_By_Ref =>
- return Tinfo.Ortho_Ptr_Type (Mode);
- end case;
- else
+ if Info.Interface_Field /= O_Fnode_Null then
return O_Tnode_Null;
end if;
+
+ case Get_Kind (Inter) is
+ when Iir_Kind_Constant_Interface_Declaration
+ | Iir_Kind_Variable_Interface_Declaration
+ | Iir_Kind_File_Interface_Declaration =>
+ Mode := Mode_Value;
+ when Iir_Kind_Signal_Interface_Declaration =>
+ Mode := Mode_Signal;
+ when others =>
+ Error_Kind ("translate_interface_type", Inter);
+ end case;
+ Tinfo := Get_Info (Get_Type (Inter));
+ case Tinfo.Type_Mode is
+ when Type_Mode_Unknown =>
+ raise Internal_Error;
+ when Type_Mode_By_Value =>
+ return Tinfo.Ortho_Type (Mode);
+ when Type_Mode_By_Copy
+ | Type_Mode_By_Ref =>
+ return Tinfo.Ortho_Ptr_Type (Mode);
+ end case;
end Translate_Interface_Type;
procedure Translate_Subprogram_Declaration (Spec : Iir)
@@ -4709,8 +4709,12 @@ package body Translation is
if Get_Kind (Inter) = Iir_Kind_Variable_Interface_Declaration
and then Get_Mode (Inter) in Iir_Out_Modes
and then Tinfo.Type_Mode not in Type_Mode_By_Ref
+ and then Tinfo.Type_Mode /= Type_Mode_File
then
-- This interface is done via the result record.
+ -- Note: file passed through variables are vhdl87 files,
+ -- which are initialized at elaboration and thus
+ -- behave like an IN parameter.
if not Has_Result_Record then
-- Create the record.
Start_Record_Type (El_List);
@@ -19117,7 +19121,10 @@ package body Translation is
raise Internal_Error;
end if;
Params (Pos) := Stabilize (Param);
- if In_Conv /= Null_Iir or else Out_Conv = Null_Iir then
+ if In_Conv /= Null_Iir
+ or else Get_Mode (Formal) = Iir_Inout_Mode
+ -- or else Out_Conv = Null_Iir
+ then
-- Arguments may be assigned if there is an in conversion,
-- or no out conversion.
-- We try to assign even OUT argument, to avoid