aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-01 18:50:22 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-01 18:50:22 +0100
commit2b79f468513b6bc81d0d9b2f482ba8c74f7fac96 (patch)
treee75d102ae16563540f6f5fcb9642a008e95d9084 /src
parentadf0f9100859e0a07b554e0554c5271a36db5d4b (diff)
downloadghdl-2b79f468513b6bc81d0d9b2f482ba8c74f7fac96.tar.gz
ghdl-2b79f468513b6bc81d0d9b2f482ba8c74f7fac96.tar.bz2
ghdl-2b79f468513b6bc81d0d9b2f482ba8c74f7fac96.zip
synth: add support for inout variable interfaces.
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-expr.adb1
-rw-r--r--src/synth/synth-stmts.adb6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index e58cfce74..628f1d589 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -815,6 +815,7 @@ package body Synth.Expr is
return Synth_Name (Syn_Inst, Get_Named_Entity (Name));
when Iir_Kind_Interface_Signal_Declaration
| Iir_Kind_Variable_Declaration
+ | Iir_Kind_Interface_Variable_Declaration
| Iir_Kind_Signal_Declaration
| Iir_Kind_Anonymous_Signal_Declaration
| Iir_Kind_Interface_Constant_Declaration
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index cd4ef9a97..cf873b053 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -137,6 +137,7 @@ package body Synth.Stmts is
Dest_Voff, Dest_Rdwd, Dest_Type);
when Iir_Kind_Interface_Signal_Declaration
| Iir_Kind_Variable_Declaration
+ | Iir_Kind_Interface_Variable_Declaration
| Iir_Kind_Signal_Declaration
| Iir_Kind_Anonymous_Signal_Declaration
| Iir_Kind_Interface_Constant_Declaration
@@ -1272,9 +1273,8 @@ package body Synth.Stmts is
-- Pass by reference.
Create_Object (Subprg_Inst, Inter, Val);
when Iir_Kind_Interface_Variable_Declaration =>
- -- FIXME: Arguments are passed by copy.
- Create_Object (Subprg_Inst, Inter, Val);
- raise Internal_Error;
+ -- Arguments are passed by copy.
+ Create_Object (Subprg_Inst, Inter, Unshare (Val, Current_Pool));
when Iir_Kind_Interface_Signal_Declaration =>
Create_Object (Subprg_Inst, Inter, Val);
when Iir_Kind_Interface_File_Declaration =>