diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-17 02:13:23 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-17 02:13:23 +0200 |
commit | 2ab83662516b7466e1870548cb8906e0842bb3ca (patch) | |
tree | d21e0381315f132bb1813a76635c5963bf44625a /src | |
parent | a4754febc694fd9836fd73050016175c4de92860 (diff) | |
download | ghdl-2ab83662516b7466e1870548cb8906e0842bb3ca.tar.gz ghdl-2ab83662516b7466e1870548cb8906e0842bb3ca.tar.bz2 ghdl-2ab83662516b7466e1870548cb8906e0842bb3ca.zip |
synth: add synth-flags, add debug option -di.
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 4 | ||||
-rw-r--r-- | src/synth/synth-flags.ads | 23 | ||||
-rw-r--r-- | src/synth/synth-inference.adb | 6 |
3 files changed, 32 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index 0f566ad6b..f6539d2c4 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -45,6 +45,7 @@ with Netlists.Disp_Vhdl; with Synthesis; with Synth.Disp_Vhdl; with Synth.Context; use Synth.Context; +with Synth.Flags; use Synth.Flags; package body Ghdlsynth is type Out_Format is (Format_Raw, Format_Vhdl); @@ -93,6 +94,9 @@ package body Ghdlsynth is elsif Option = "--out=vhdl" then Cmd.Oformat := Format_Vhdl; Res := Option_Ok; + elsif Option = "-di" then + Flag_Debug_Noinference := True; + Res := Option_Ok; else Decode_Option (Command_Lib (Cmd), Option, Arg, Res); end if; 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 |