diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-18 18:40:01 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-18 18:40:01 +0200 |
commit | bf646039f586db4ef199d6ed466c1f173689d1a8 (patch) | |
tree | cc7ca0c25d9fa7533a09d2cb9a518ec908665835 /src/synth/netlists-utils.adb | |
parent | 7c8f4b6b20d42ba69d889f11c3da1f7aca877792 (diff) | |
download | ghdl-bf646039f586db4ef199d6ed466c1f173689d1a8.tar.gz ghdl-bf646039f586db4ef199d6ed466c1f173689d1a8.tar.bz2 ghdl-bf646039f586db4ef199d6ed466c1f173689d1a8.zip |
netlits: Use Remove_Instance instead of Free_Instance.
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r-- | src/synth/netlists-utils.adb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb index 6a8f1a2bf..145692ef4 100644 --- a/src/synth/netlists-utils.adb +++ b/src/synth/netlists-utils.adb @@ -252,43 +252,6 @@ package body Netlists.Utils is return Disconnect_And_Get (Get_Input (Inst, I)); end Disconnect_And_Get; - procedure Disconnect_And_Free (I : Input) - is - I_Net : constant Net := Get_Driver (I); - Inst : constant Instance := Get_Net_Parent (I_Net); - Nbr_Inputs : Port_Nbr; - Nbr_Outputs : Port_Nbr; - begin - -- First disconnect. - Disconnect (I); - - -- Quick check: is output (of I) still used ? - if Is_Connected (I_Net) then - return; - end if; - - -- Check that all outputs are unused. - Nbr_Outputs := Get_Nbr_Outputs (Inst); - if Nbr_Outputs > 1 then - for K in 0 .. Nbr_Outputs - 1 loop - if Is_Connected (Get_Output (Inst, K)) then - return; - end if; - end loop; - end if; - - -- First disconnect inputs. - Nbr_Inputs := Get_Nbr_Inputs (Inst); - if Nbr_Inputs > 0 then - for K in 0 .. Nbr_Inputs - 1 loop - Disconnect_And_Free (Get_Input (Inst, K)); - end loop; - end if; - - -- Free Inst - Free_Instance (Inst); - end Disconnect_And_Free; - function Same_Net (L, R : Net) return Boolean is begin if L = R then |