diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-12 10:25:30 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-12 10:25:30 +0200 |
commit | e3a7d25b24cc8e883eff4fe0fd8df4b48269b89d (patch) | |
tree | 74685efec2650c843f72991e200325c8b615c958 /src | |
parent | a5a8b0cfe7d754a424f79ab82310db73e98d14fd (diff) | |
download | ghdl-e3a7d25b24cc8e883eff4fe0fd8df4b48269b89d.tar.gz ghdl-e3a7d25b24cc8e883eff4fe0fd8df4b48269b89d.tar.bz2 ghdl-e3a7d25b24cc8e883eff4fe0fd8df4b48269b89d.zip |
netlists-infreence: simplify condition. Fix #1211
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-inference.adb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/synth/netlists-inference.adb b/src/synth/netlists-inference.adb index e7e027078..66aabf2bc 100644 --- a/src/synth/netlists-inference.adb +++ b/src/synth/netlists-inference.adb @@ -517,7 +517,6 @@ package body Netlists.Inference is Rst_Val := No_Net; Rst := No_Net; declare - Done : Boolean; Mux : Instance; Sel : Net; Last_Out : Net; @@ -534,9 +533,7 @@ package body Netlists.Inference is -- Initially, the final output is not connected. So walk from the -- clocked mux until reaching the final output. - Done := Last_Out = Val; - - while not Done loop + while Last_Out /= Val loop if not Has_One_Connection (Last_Out) and then not Is_Const_Net (Last_Out) then @@ -572,9 +569,9 @@ package body Netlists.Inference is Disconnect (Get_Mux2_I1 (Mux)); Disconnect (Get_Mux2_Sel (Mux)); + -- Next net to be handled. Last_Mux := Mux; Last_Out := Get_Output (Mux, 0); - Done := not Is_Connected (Last_Out); if Is_Prev_FF_Value (Mux_Rst_Val, Prev_Val, Off) then -- The mux is like an enable. Like in this example, q2 is not |