aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-22 21:16:41 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-23 18:41:51 +0200
commit98f8cefe74f241a660358f5fdf87a71a7ad29170 (patch)
treeff2915ca02149b88703c5d4650d748a14871e7e6 /src
parenta9228e0cba373e9d96a592d9c1e4680a2f050087 (diff)
downloadghdl-98f8cefe74f241a660358f5fdf87a71a7ad29170.tar.gz
ghdl-98f8cefe74f241a660358f5fdf87a71a7ad29170.tar.bz2
ghdl-98f8cefe74f241a660358f5fdf87a71a7ad29170.zip
vhdl-canon: handle some declarations in vunits.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-canon.adb20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb
index f7778db00..46e982915 100644
--- a/src/vhdl/vhdl-canon.adb
+++ b/src/vhdl/vhdl-canon.adb
@@ -3235,10 +3235,13 @@ package body Vhdl.Canon is
end if;
end Canon_Interface_List;
- procedure Canon_Psl_Verification_Unit (Decl : Iir)
+ procedure Canon_Psl_Verification_Unit (Unit : Iir_Design_Unit)
is
+ Decl : constant Iir := Get_Library_Unit (Unit);
Item : Iir;
+ Prev_Item : Iir;
begin
+ Prev_Item := Null_Iir;
Item := Get_Vunit_Item_Chain (Decl);
while Item /= Null_Iir loop
case Get_Kind (Item) is
@@ -3252,9 +3255,22 @@ package body Vhdl.Canon is
Canon_Psl_Sequence_Directive (Item);
when Iir_Kind_Psl_Cover_Directive =>
Canon_Psl_Cover_Directive (Item);
+ when Iir_Kind_Signal_Declaration
+ | Iir_Kind_Function_Declaration
+ | Iir_Kind_Procedure_Declaration
+ | Iir_Kind_Function_Body
+ | Iir_Kind_Procedure_Body =>
+ Item := Canon_Declaration (Unit, Item, Null_Iir);
when others =>
Error_Kind ("canon_psl_verification_unit", Item);
end case;
+
+ if Prev_Item = Null_Iir then
+ Set_Vunit_Item_Chain (Decl, Item);
+ else
+ Set_Chain (Prev_Item, Item);
+ end if;
+ Prev_Item := Item;
Item := Get_Chain (Item);
end loop;
end Canon_Psl_Verification_Unit;
@@ -3306,7 +3322,7 @@ package body Vhdl.Canon is
when Iir_Kind_Context_Declaration =>
null;
when Iir_Kind_Vunit_Declaration =>
- Canon_Psl_Verification_Unit (El);
+ Canon_Psl_Verification_Unit (Unit);
when Iir_Kind_Vmode_Declaration
| Iir_Kind_Vprop_Declaration =>
null;