diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-12-15 08:18:10 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-12-15 08:18:10 +0100 |
commit | 9df3cb21ad765f38561fff0a568ce94359d4d977 (patch) | |
tree | 162232a463e986d01e65fc476c40093596b84e09 /src/synth/elab-vhdl_insts.adb | |
parent | c661e58db492f14b22e2ab59e58a8abde6e74c10 (diff) | |
download | ghdl-9df3cb21ad765f38561fff0a568ce94359d4d977.tar.gz ghdl-9df3cb21ad765f38561fff0a568ce94359d4d977.tar.bz2 ghdl-9df3cb21ad765f38561fff0a568ce94359d4d977.zip |
synth: handle interface type in generics. For #412
Diffstat (limited to 'src/synth/elab-vhdl_insts.adb')
-rw-r--r-- | src/synth/elab-vhdl_insts.adb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index 71adc953d..b8b53517d 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -106,6 +106,15 @@ package body Elab.Vhdl_Insts is Create_Package_Interface (Sub_Inst, Inter, Pkg_Inst); end; + when Iir_Kind_Interface_Type_Declaration => + declare + Act_Typ : Type_Acc; + begin + Act_Typ := Synth_Subtype_Indication + (Syn_Inst, Get_Actual (Assoc)); + Create_Subtype_Object (Sub_Inst, Get_Type (Inter), Act_Typ); + end; + when Iir_Kind_Interface_Variable_Declaration | Iir_Kind_Interface_File_Declaration | Iir_Kind_Interface_Signal_Declaration @@ -113,8 +122,7 @@ package body Elab.Vhdl_Insts is | Iir_Kind_Interface_Terminal_Declaration => raise Internal_Error; - when Iir_Kinds_Interface_Subprogram_Declaration - | Iir_Kind_Interface_Type_Declaration => + when Iir_Kinds_Interface_Subprogram_Declaration => raise Internal_Error; end case; |