aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-flags.ads23
-rw-r--r--src/synth/synth-inference.adb6
2 files changed, 28 insertions, 1 deletions
diff --git a/src/synth/synth-flags.ads b/src/synth/synth-flags.ads
new file mode 100644
index 000000000..c5d11f83c
--- /dev/null
+++ b/src/synth/synth-flags.ads
@@ -0,0 +1,23 @@
+-- Flags for synthesis.
+-- Copyright (C) 2019 Tristan Gingold
+--
+-- This file is part of GHDL.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+-- MA 02110-1301, USA.
+
+package Synth.Flags is
+ Flag_Debug_Noinference : Boolean := False;
+end Synth.Flags;
diff --git a/src/synth/synth-inference.adb b/src/synth/synth-inference.adb
index 5017a2726..56f1fca3d 100644
--- a/src/synth/synth-inference.adb
+++ b/src/synth/synth-inference.adb
@@ -22,6 +22,8 @@ with Netlists.Utils; use Netlists.Utils;
with Netlists.Gates; use Netlists.Gates;
with Netlists.Gates_Ports; use Netlists.Gates_Ports;
+with Synth.Flags;
+
package body Synth.Inference is
-- DFF inference.
-- As an initial implementation, the following 'styles' must be
@@ -352,7 +354,9 @@ package body Synth.Inference is
Enable : Net;
begin
Find_Longest_Loop (Val, Prev_Val, Last_Mux, Len);
- if Len <= 0 then
+ if Len <= 0
+ or else Flags.Flag_Debug_Noinference
+ then
-- No logical loop or self assignment.
Add_Conc_Assign (Wid, Val, Off, Stmt);
else