aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-11 20:49:18 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-12 20:36:00 +0100
commit638200d3916f77cdba2a04ed3e3606b61f0aa09f (patch)
tree047e813d54c171090c8f4e271b9e6e3cb6358cc5
parenta16e1f8da63c68292703875c3abff7912572d376 (diff)
downloadghdl-638200d3916f77cdba2a04ed3e3606b61f0aa09f.tar.gz
ghdl-638200d3916f77cdba2a04ed3e3606b61f0aa09f.tar.bz2
ghdl-638200d3916f77cdba2a04ed3e3606b61f0aa09f.zip
synth: file support (WIP).
-rw-r--r--src/synth/synth-expr.adb6
-rw-r--r--src/synth/synth-stmts.adb2
-rw-r--r--src/vhdl/vhdl-annotations.adb3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index f3722595f..43109aa84 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -855,7 +855,8 @@ package body Synth.Expr is
when Type_Access =>
return Val;
when Type_File =>
- raise Internal_Error;
+ pragma Assert (Vtype = Dtype);
+ return Val;
end case;
end Synth_Subtype_Conversion;
@@ -873,7 +874,8 @@ package body Synth.Expr is
| Iir_Kind_Interface_Constant_Declaration
| Iir_Kind_Constant_Declaration
| Iir_Kind_Iterator_Declaration
- | Iir_Kind_Object_Alias_Declaration =>
+ | Iir_Kind_Object_Alias_Declaration
+ | Iir_Kind_File_Declaration =>
return Get_Value (Syn_Inst, Name);
when Iir_Kind_Enumeration_Literal =>
return Create_Value_Discrete
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index ea177af30..51472362c 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -1320,7 +1320,7 @@ package body Synth.Stmts is
when Iir_Kind_Interface_Signal_Declaration =>
Create_Object (Subprg_Inst, Inter, Val);
when Iir_Kind_Interface_File_Declaration =>
- raise Internal_Error;
+ Create_Object (Subprg_Inst, Inter, Val);
end case;
end loop;
end Synth_Subprogram_Association;
diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb
index a349a8a07..9cf6d7931 100644
--- a/src/vhdl/vhdl-annotations.adb
+++ b/src/vhdl/vhdl-annotations.adb
@@ -780,7 +780,8 @@ package body Vhdl.Annotations is
when Iir_Kind_Function_Declaration
| Iir_Kind_Procedure_Declaration =>
- if Get_Implicit_Definition (Decl) in Iir_Predefined_Explicit
+ if (Get_Implicit_Definition (Decl)
+ not in Iir_Predefined_Pure_Functions)
and then not Is_Second_Subprogram_Specification (Decl)
then
Annotate_Subprogram_Interfaces_Type (Block_Info, Decl);