aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-31 07:37:34 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-31 07:37:34 +0200
commit3d8cc349b675ddfcd41008ba8f7b17a49da9e184 (patch)
tree6c836a67b2083ff3a473b23057250c4821a3ade5 /src
parentfc1c5b5efd24da74de6bae210b74637599e6f94f (diff)
downloadghdl-3d8cc349b675ddfcd41008ba8f7b17a49da9e184.tar.gz
ghdl-3d8cc349b675ddfcd41008ba8f7b17a49da9e184.tar.bz2
ghdl-3d8cc349b675ddfcd41008ba8f7b17a49da9e184.zip
synth: refine -dm debug option. Add -dm2
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlsynth.adb6
-rw-r--r--src/synth/netlists-inference.adb2
-rw-r--r--src/synth/synth-flags.ads5
-rw-r--r--src/synth/synth-insts.adb2
4 files changed, 11 insertions, 4 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index dd2b40503..08d980581 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -164,7 +164,11 @@ package body Ghdlsynth is
elsif Option = "-dc" then
Flag_Debug_Nocleanup := True;
elsif Option = "-dm" then
- Flag_Debug_Nomemory := True;
+ Flag_Debug_Nomemory1 := True;
+ Flag_Debug_Nomemory2 := True;
+ elsif Option = "-dm2" then
+ -- Reduce muxes, but do not create memories.
+ Flag_Debug_Nomemory2 := True;
elsif Option = "-de" then
Flag_Debug_Noexpand := True;
elsif Option = "-t" then
diff --git a/src/synth/netlists-inference.adb b/src/synth/netlists-inference.adb
index 700cf09ba..a57b50bbb 100644
--- a/src/synth/netlists-inference.adb
+++ b/src/synth/netlists-inference.adb
@@ -453,7 +453,7 @@ package body Netlists.Inference is
Res : Net;
begin
if Off = 0
- and then not Synth.Flags.Flag_Debug_Nomemory
+ and then not Synth.Flags.Flag_Debug_Nomemory1
and then Can_Infere_RAM (Data, Prev_Val)
then
-- Maybe it is a RAM.
diff --git a/src/synth/synth-flags.ads b/src/synth/synth-flags.ads
index 032c2321d..0586ba58c 100644
--- a/src/synth/synth-flags.ads
+++ b/src/synth/synth-flags.ads
@@ -48,7 +48,10 @@ package Synth.Flags is
Flag_Debug_Nocleanup : Boolean := False;
- Flag_Debug_Nomemory : Boolean := False;
+ -- Do not reduce muxes in dyn extract/insert chains.
+ Flag_Debug_Nomemory1 : Boolean := False;
+
+ Flag_Debug_Nomemory2 : Boolean := False;
Flag_Debug_Noexpand : Boolean := False;
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb
index 01af9c63a..da1cc329c 100644
--- a/src/synth/synth-insts.adb
+++ b/src/synth/synth-insts.adb
@@ -1535,7 +1535,7 @@ package body Synth.Insts is
Netlists.Cleanup.Remove_Output_Gates (Inst.M);
end if;
- if not Synth.Flags.Flag_Debug_Nomemory then
+ if not Synth.Flags.Flag_Debug_Nomemory2 then
Netlists.Memories.Extract_Memories2 (Get_Build (Syn_Inst), Inst.M);
-- Remove remaining clock edge gates.
Netlists.Cleanup.Mark_And_Sweep (Inst.M);