aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-environment.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-16 08:07:01 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-16 08:07:01 +0200
commit23bb49eb1f24c65effe07377d8748687e5a668bf (patch)
treeafb4fde1a931fbe560bd5cd2949afeba6f55cc48 /src/synth/synth-environment.adb
parentb9fc9fbf389a24201d05d649daeac782c864404e (diff)
downloadghdl-23bb49eb1f24c65effe07377d8748687e5a668bf.tar.gz
ghdl-23bb49eb1f24c65effe07377d8748687e5a668bf.tar.bz2
ghdl-23bb49eb1f24c65effe07377d8748687e5a668bf.zip
synth: handle inout ports with default values. For #1312
Diffstat (limited to 'src/synth/synth-environment.adb')
-rw-r--r--src/synth/synth-environment.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb
index 4e789ef05..db76e286a 100644
--- a/src/synth/synth-environment.adb
+++ b/src/synth/synth-environment.adb
@@ -848,7 +848,11 @@ package body Synth.Environment is
then
Warning_Msg_Synth
(+Wire_Rec.Decl, "no assignment for %n", +Wire_Rec.Decl);
- Value := Build_Const_Z (Ctxt, Get_Width (Wire_Rec.Gate));
+ if Get_Id (Gate_Inst) = Gates.Id_Iinout then
+ Value := Get_Input_Net (Gate_Inst, 1);
+ else
+ Value := Build_Const_Z (Ctxt, Get_Width (Wire_Rec.Gate));
+ end if;
else
return;
end if;