aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-utils.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r--src/synth/netlists-utils.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb
index 74df5908c..8463da355 100644
--- a/src/synth/netlists-utils.adb
+++ b/src/synth/netlists-utils.adb
@@ -289,6 +289,19 @@ package body Netlists.Utils is
end;
end Same_Net;
+ function Same_Clock (L, R : Net) return Boolean
+ is
+ Linst : constant Instance := Get_Net_Parent (L);
+ Rinst : constant Instance := Get_Net_Parent (R);
+ begin
+ if Get_Id (Linst) /= Get_Id (Rinst) then
+ return False;
+ end if;
+ pragma Assert (Get_Id (Linst) in Edge_Module_Id);
+ return Same_Net (Get_Input_Net (Linst, 0),
+ Get_Input_Net (Rinst, 0));
+ end Same_Clock;
+
procedure Copy_Attributes (Dest : Instance; Src : Instance)
is
Attr : Attribute;