aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-annotations.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-19 21:02:24 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-20 04:13:12 +0200
commitfcd68928a4366c35748f488f949d5eada82998dd (patch)
tree1293db893401181d17da9a3fb92a61401e09c882 /src/vhdl/vhdl-annotations.adb
parent008d54327842b999f3ea442de5d9e312ab94b5f1 (diff)
downloadghdl-fcd68928a4366c35748f488f949d5eada82998dd.tar.gz
ghdl-fcd68928a4366c35748f488f949d5eada82998dd.tar.bz2
ghdl-fcd68928a4366c35748f488f949d5eada82998dd.zip
synth: handle verification units.
Diffstat (limited to 'src/vhdl/vhdl-annotations.adb')
-rw-r--r--src/vhdl/vhdl-annotations.adb30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb
index 7e2d19a58..d3d959da6 100644
--- a/src/vhdl/vhdl-annotations.adb
+++ b/src/vhdl/vhdl-annotations.adb
@@ -1108,7 +1108,7 @@ package body Vhdl.Annotations is
end loop;
end Annotate_Concurrent_Statements_List;
- procedure Annotate_Entity (Decl: Iir_Entity_Declaration)
+ procedure Annotate_Entity (Decl : Iir_Entity_Declaration)
is
Entity_Info: Sim_Info_Acc;
begin
@@ -1148,6 +1148,32 @@ package body Vhdl.Annotations is
Set_Info (Decl, Arch_Info);
end Annotate_Architecture;
+ procedure Annotate_Vunit_Declaration (Decl : Iir)
+ is
+ Vunit_Info : Sim_Info_Acc;
+ Item : Iir;
+ begin
+ Vunit_Info := new Sim_Info_Type'(Kind => Kind_Block,
+ Ref => Decl,
+ Inst_Slot => Invalid_Instance_Slot,
+ Nbr_Objects => 0,
+ Nbr_Instances => 0);
+ Set_Info (Decl, Vunit_Info);
+
+ Item := Get_Vunit_Item_Chain (Decl);
+ while Item /= Null_Iir loop
+ case Get_Kind (Item) is
+ when Iir_Kind_Psl_Default_Clock =>
+ null;
+ when Iir_Kind_Psl_Assert_Directive =>
+ null;
+ when others =>
+ Error_Kind ("annotate_vunit_declaration", Item);
+ end case;
+ Item := Get_Chain (Item);
+ end loop;
+ end Annotate_Vunit_Declaration;
+
procedure Annotate_Component_Configuration
(Conf : Iir_Component_Configuration)
is
@@ -1259,6 +1285,8 @@ package body Vhdl.Annotations is
Annotate_Package_Declaration (Global_Info, El);
when Iir_Kind_Context_Declaration =>
null;
+ when Iir_Kind_Vunit_Declaration =>
+ Annotate_Vunit_Declaration (El);
when others =>
Error_Kind ("annotate2", El);
end case;