aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-flags.ads2
-rw-r--r--src/synth/synth-insts.adb5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/synth/synth-flags.ads b/src/synth/synth-flags.ads
index c5d11f83c..d87826f4d 100644
--- a/src/synth/synth-flags.ads
+++ b/src/synth/synth-flags.ads
@@ -20,4 +20,6 @@
package Synth.Flags is
Flag_Debug_Noinference : Boolean := False;
+
+ Flag_Debug_Nocleanup : Boolean := False;
end Synth.Flags;
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb
index 5df7d4303..6e04fc2a8 100644
--- a/src/synth/synth-insts.adb
+++ b/src/synth/synth-insts.adb
@@ -32,6 +32,7 @@ with Vhdl.Utils; use Vhdl.Utils;
with Vhdl.Annotations; use Vhdl.Annotations;
with Vhdl.Errors;
+with Synth.Flags;
with Synth.Values; use Synth.Values;
with Synth.Environment; use Synth.Environment;
with Synth.Stmts; use Synth.Stmts;
@@ -805,7 +806,9 @@ package body Synth.Insts is
-- Remove unused gates. This is not only an optimization but also
-- a correctness point: there might be some unsynthesizable gates, like
-- the one created for 'rising_egde (clk) and not rst'.
- Netlists.Utils.Remove_Unused_Instances (Syn_Inst.M);
+ if not Flags.Flag_Debug_Nocleanup then
+ Netlists.Utils.Remove_Unused_Instances (Syn_Inst.M);
+ end if;
end Synth_Instance;
procedure Synth_All_Instances