aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-06-28 18:31:10 +0200
committerTristan Gingold <tgingold@free.fr>2019-06-28 18:31:10 +0200
commit40c7b033a8e005503a5719901ac420bd39145a7b (patch)
tree5bd7c5b077516d4c4b17a8603c989219f9b49655 /src/synth/netlists-utils.adb
parent1054c3731f64d58ff9eddc75b536c4a3d7e68057 (diff)
downloadghdl-40c7b033a8e005503a5719901ac420bd39145a7b.tar.gz
ghdl-40c7b033a8e005503a5719901ac420bd39145a7b.tar.bz2
ghdl-40c7b033a8e005503a5719901ac420bd39145a7b.zip
synth: Move get_input_net to netlists.utils.
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 abd754d2d..0f33002d3 100644
--- a/src/synth/netlists-utils.adb
+++ b/src/synth/netlists-utils.adb
@@ -69,6 +69,11 @@ package body Netlists.Utils is
return Get_Output_Desc (M, I).Name;
end Get_Output_Name;
+ function Get_Input_Net (Inst : Instance; Idx : Port_Idx) return Net is
+ begin
+ return Get_Driver (Get_Input (Inst, Idx));
+ end Get_Input_Net;
+
function Is_Connected (O : Net) return Boolean is
begin
return Get_First_Sink (O) /= No_Input;