diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-04-16 18:14:35 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-04-16 18:14:35 +0200 |
commit | 334fe4177c5363d1a9c4571a596343dd17987fc1 (patch) | |
tree | 664d2fbebe149a6a306b2bf276a1aa2b923b90b7 /src/synth/synth-environment.adb | |
parent | 595f04c35ceacb40edfed4cf0c443be166cb8b91 (diff) | |
download | ghdl-334fe4177c5363d1a9c4571a596343dd17987fc1.tar.gz ghdl-334fe4177c5363d1a9c4571a596343dd17987fc1.tar.bz2 ghdl-334fe4177c5363d1a9c4571a596343dd17987fc1.zip |
is_tribuf_net: refine
Diffstat (limited to 'src/synth/synth-environment.adb')
-rw-r--r-- | src/synth/synth-environment.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb index d6b48ec88..bd68aa39f 100644 --- a/src/synth/synth-environment.adb +++ b/src/synth/synth-environment.adb @@ -770,12 +770,19 @@ package body Synth.Environment is function Is_Tribuf_Net (N : Net) return Boolean is use Netlists.Gates; + Inst : constant Instance := Get_Net_Parent (N); begin - case Get_Id (Get_Net_Parent (N)) is + case Get_Id (Inst) is when Id_Tri - | Id_Resolver - | Id_Port => + | Id_Resolver + | Id_Const_Z => + return True; + when Id_Port => + -- We don't know, so assume yes. return True; + when Id_Signal + | Id_Isignal => + return Is_Tribuf_Net (Get_Input_Net (Inst, 0)); when others => return False; end case; |