diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:33:31 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:33:31 +0100 |
commit | 118f482ae2c27c6910b418835c3b9588edc6e2f9 (patch) | |
tree | 13d82977b5255b4169bb7664614113a64081fdf6 | |
parent | d2eebab82cb4d142eee0f6be2c22425f30a87878 (diff) | |
download | ghdl-118f482ae2c27c6910b418835c3b9588edc6e2f9.tar.gz ghdl-118f482ae2c27c6910b418835c3b9588edc6e2f9.tar.bz2 ghdl-118f482ae2c27c6910b418835c3b9588edc6e2f9.zip |
netlists-dump: adjust can_inline after cleanup of
-rw-r--r-- | src/synth/netlists-dump.adb | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/synth/netlists-dump.adb b/src/synth/netlists-dump.adb index 520210ff0..b3effff05 100644 --- a/src/synth/netlists-dump.adb +++ b/src/synth/netlists-dump.adb @@ -365,7 +365,10 @@ package body Netlists.Dump is procedure Disp_Instance_Assign (Inst : Instance; Indent : Natural := 0); - function Can_Inline (Inst : Instance) return Boolean is + function Can_Inline (Inst : Instance) return Boolean + is + O : Net; + Inp : Input; begin case Get_Id (Inst) is when Id_Signal @@ -375,9 +378,22 @@ package body Netlists.Dump is when others => null; end case; - return not Is_Self_Instance (Inst) - and then Get_Nbr_Outputs (Inst) = 1 - and then Has_One_Connection (Get_Output (Inst, 0)); + if Is_Self_Instance (Inst) then + return False; + end if; + if Get_Nbr_Outputs (Inst) /= 1 then + return False; + end if; + O := Get_Output (Inst, 0); + Inp := Get_First_Sink (O); + if Inp = No_Input or else Get_Next_Sink (Inp) /= No_Input then + return False; + end if; + if Is_Self_Instance (Get_Input_Parent (Inp)) then + return False; + end if; + + return True; end Can_Inline; procedure Disp_Driver (Drv : Net; Indent : Natural) |