aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-29 20:22:37 +0200
committerTristan Gingold <tgingold@free.fr>2020-03-29 20:22:37 +0200
commitc44197a646adae880e0a8e0382dcde64b7aeec35 (patch)
treef43f2ee087efa1de57074adce281c1608451b1cc /src/synth/netlists-utils.adb
parent49858bd37724c2e1f8aba208fbc7b92a54cbe46a (diff)
downloadghdl-c44197a646adae880e0a8e0382dcde64b7aeec35.tar.gz
ghdl-c44197a646adae880e0a8e0382dcde64b7aeec35.tar.bz2
ghdl-c44197a646adae880e0a8e0382dcde64b7aeec35.zip
synth: add helper to support inout ports in yosys plugin. For #1166
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 f1dd42f73..a0d69d0cf 100644
--- a/src/synth/netlists-utils.adb
+++ b/src/synth/netlists-utils.adb
@@ -98,6 +98,11 @@ package body Netlists.Utils is
return Get_Output_Desc (M, I).W;
end Get_Output_Width;
+ function Get_Inout_Flag (M : Module; I : Port_Idx) return Boolean is
+ begin
+ return Get_Output_Desc (M, I).Is_Inout;
+ end Get_Inout_Flag;
+
function Get_Input_Net (Inst : Instance; Idx : Port_Idx) return Net is
begin
return Get_Driver (Get_Input (Inst, Idx));