diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-04-13 21:19:46 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-04-13 21:19:46 +0200 |
commit | 4f8c339981dc50e7e896a12df8b9cef9705c26af (patch) | |
tree | d5c4dfaed288d1fd397c2b34f5913cdaf0f81e43 /src | |
parent | 057fcd45c357f6933de646a7086a44b190efee6f (diff) | |
download | ghdl-4f8c339981dc50e7e896a12df8b9cef9705c26af.tar.gz ghdl-4f8c339981dc50e7e896a12df8b9cef9705c26af.tar.bz2 ghdl-4f8c339981dc50e7e896a12df8b9cef9705c26af.zip |
synth: handle type declarations in vunit. Fix #2034
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/elab-vhdl_insts.adb | 4 | ||||
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 26 | ||||
-rw-r--r-- | src/vhdl/vhdl-annotations.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 1 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_psl.adb | 1 |
5 files changed, 23 insertions, 13 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index a16b0cdf2..3816cb9a4 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -412,7 +412,9 @@ package body Elab.Vhdl_Insts is | Iir_Kind_Attribute_Specification | Iir_Kind_Object_Alias_Declaration | Iir_Kind_Non_Object_Alias_Declaration - | Iir_Kind_Subtype_Declaration => + | Iir_Kind_Subtype_Declaration + | Iir_Kind_Type_Declaration + | Iir_Kind_Anonymous_Type_Declaration => Elab_Declaration (Unit_Inst, Item, Last_Type); when Iir_Kinds_Concurrent_Signal_Assignment | Iir_Kinds_Process_Statement diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 93748d952..e949d56d4 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -3798,16 +3798,18 @@ package body Synth.Vhdl_Stmts is when Iir_Kind_Psl_Cover_Directive => Synth_Psl_Cover_Directive (Syn_Inst, Item); when Iir_Kind_Signal_Declaration - | Iir_Kind_Constant_Declaration - | Iir_Kind_Function_Declaration - | Iir_Kind_Procedure_Declaration - | Iir_Kind_Function_Body - | Iir_Kind_Procedure_Body - | Iir_Kind_Attribute_Declaration - | Iir_Kind_Attribute_Specification - | Iir_Kind_Object_Alias_Declaration - | Iir_Kind_Non_Object_Alias_Declaration - | Iir_Kind_Subtype_Declaration => + | Iir_Kind_Constant_Declaration + | Iir_Kind_Function_Declaration + | Iir_Kind_Procedure_Declaration + | Iir_Kind_Function_Body + | Iir_Kind_Procedure_Body + | Iir_Kind_Attribute_Declaration + | Iir_Kind_Attribute_Specification + | Iir_Kind_Object_Alias_Declaration + | Iir_Kind_Non_Object_Alias_Declaration + | Iir_Kind_Subtype_Declaration + | Iir_Kind_Type_Declaration + | Iir_Kind_Anonymous_Type_Declaration => Synth_Concurrent_Declaration (Syn_Inst, Item); when Iir_Kinds_Concurrent_Signal_Assignment | Iir_Kinds_Process_Statement @@ -3853,7 +3855,9 @@ package body Synth.Vhdl_Stmts is | Iir_Kind_Attribute_Specification | Iir_Kind_Object_Alias_Declaration | Iir_Kind_Non_Object_Alias_Declaration - | Iir_Kind_Subtype_Declaration => + | Iir_Kind_Subtype_Declaration + | Iir_Kind_Type_Declaration + | Iir_Kind_Anonymous_Type_Declaration => Finalize_Declaration (Syn_Inst, Item, False); when others => Error_Kind ("synth_verification_unit(2)", Item); diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb index 6ac0e982b..6b645b8b4 100644 --- a/src/vhdl/vhdl-annotations.adb +++ b/src/vhdl/vhdl-annotations.adb @@ -1213,7 +1213,9 @@ package body Vhdl.Annotations is | Iir_Kind_Attribute_Specification | Iir_Kind_Object_Alias_Declaration | Iir_Kind_Non_Object_Alias_Declaration - | Iir_Kind_Subtype_Declaration => + | Iir_Kind_Subtype_Declaration + | Iir_Kind_Type_Declaration + | Iir_Kind_Anonymous_Type_Declaration => Annotate_Declaration (Vunit_Info, Item); when Iir_Kinds_Concurrent_Signal_Assignment | Iir_Kinds_Process_Statement diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index 8d0c08bc3..2b43f6368 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -3429,6 +3429,7 @@ package body Vhdl.Canon is | Iir_Kind_Constant_Declaration | Iir_Kind_Type_Declaration | Iir_Kind_Subtype_Declaration + | Iir_Kind_Anonymous_Type_Declaration | Iir_Kind_Function_Declaration | Iir_Kind_Procedure_Declaration | Iir_Kind_Function_Body diff --git a/src/vhdl/vhdl-sem_psl.adb b/src/vhdl/vhdl-sem_psl.adb index 55a4d7257..f17c49791 100644 --- a/src/vhdl/vhdl-sem_psl.adb +++ b/src/vhdl/vhdl-sem_psl.adb @@ -1234,6 +1234,7 @@ package body Vhdl.Sem_Psl is | Iir_Kind_Constant_Declaration | Iir_Kind_Type_Declaration | Iir_Kind_Subtype_Declaration + | Iir_Kind_Anonymous_Type_Declaration | Iir_Kind_Function_Declaration | Iir_Kind_Procedure_Declaration | Iir_Kind_Function_Body |