aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-canon.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-28 19:28:14 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-29 22:02:31 +0200
commitf247d3eaa1d2dda3eb26e038efe52b0c6cbfd754 (patch)
treecb505ed3a66b4ea583bad2ba714279bc25f4635f /src/vhdl/vhdl-canon.adb
parent5b614ffd0bac865999dd537848115d1f67e170c8 (diff)
downloadghdl-f247d3eaa1d2dda3eb26e038efe52b0c6cbfd754.tar.gz
ghdl-f247d3eaa1d2dda3eb26e038efe52b0c6cbfd754.tar.bz2
ghdl-f247d3eaa1d2dda3eb26e038efe52b0c6cbfd754.zip
vhdl-canon: extract guard for signal assignment sensitivity
Diffstat (limited to 'src/vhdl/vhdl-canon.adb')
-rw-r--r--src/vhdl/vhdl-canon.adb16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb
index edddfc721..1cad2b147 100644
--- a/src/vhdl/vhdl-canon.adb
+++ b/src/vhdl/vhdl-canon.adb
@@ -369,8 +369,22 @@ package body Vhdl.Canon is
end Canon_Extract_Sensitivity_Waveform;
procedure Canon_Extract_Sensitivity_Signal_Assignment_Common
- (Stmt : Iir; List : Iir_List) is
+ (Stmt : Iir; List : Iir_List)
+ is
+ Guard : Iir;
begin
+ case Get_Kind (Stmt) is
+ when Iir_Kind_Concurrent_Conditional_Signal_Assignment
+ | Iir_Kind_Concurrent_Selected_Signal_Assignment
+ | Iir_Kind_Concurrent_Simple_Signal_Assignment =>
+ Guard := Get_Guard (Stmt);
+ if Guard /= Null_Iir then
+ Add_Element (List, Guard);
+ end if;
+ when others =>
+ null;
+ end case;
+
Canon_Extract_Sensitivity_Expression (Get_Target (Stmt), List, True);
Canon_Extract_Sensitivity_If_Not_Null
(Get_Reject_Time_Expression (Stmt), List);