aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-17 02:16:28 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-17 02:16:28 +0200
commitb3a28203e95f68bd1007c4c11b44187ecabbf593 (patch)
tree114e02aa47dae4a5776692b81daeed24d25df97d /src/synth/netlists-utils.adb
parent2ab83662516b7466e1870548cb8906e0842bb3ca (diff)
downloadghdl-b3a28203e95f68bd1007c4c11b44187ecabbf593.tar.gz
ghdl-b3a28203e95f68bd1007c4c11b44187ecabbf593.tar.bz2
ghdl-b3a28203e95f68bd1007c4c11b44187ecabbf593.zip
synth: fold addition on constant nets.
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r--src/synth/netlists-utils.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb
index 20aca706a..ab7c1824a 100644
--- a/src/synth/netlists-utils.adb
+++ b/src/synth/netlists-utils.adb
@@ -113,6 +113,11 @@ package body Netlists.Utils is
end case;
end Is_Const_Module;
+ function Is_Const_Net (N : Net) return Boolean is
+ begin
+ return Is_Const_Module (Get_Id (Get_Net_Parent (N)));
+ end Is_Const_Net;
+
function Is_Connected (O : Net) return Boolean is
begin
return Get_First_Sink (O) /= No_Input;