aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-22 19:03:49 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-22 21:31:28 +0200
commit5e3156f249145f7384f0a4fe25486791efd0e10a (patch)
treed86da410413ed3f337385a3a8b3ca4177cbd055a
parent9b40ca4a65f7ffbb2186393ed6db5b054ba7a494 (diff)
downloadghdl-5e3156f249145f7384f0a4fe25486791efd0e10a.tar.gz
ghdl-5e3156f249145f7384f0a4fe25486791efd0e10a.tar.bz2
ghdl-5e3156f249145f7384f0a4fe25486791efd0e10a.zip
synth: support -v option.
-rw-r--r--src/ghdldrv/ghdlsynth.adb6
-rw-r--r--src/synth/synth-flags.ads2
-rw-r--r--src/synth/synth-insts.adb5
3 files changed, 13 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index 9fc3a2e98..ad0ea91c6 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -163,6 +163,12 @@ package body Ghdlsynth is
Flag_Trace_Statements := True;
elsif Option = "-i" then
Flag_Debug_Init := True;
+ elsif Option = "-v" then
+ if not Synth.Flags.Flag_Verbose then
+ Synth.Flags.Flag_Verbose := True;
+ else
+ Flags.Verbose := True;
+ end if;
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
index 3fc9303c5..be851f4bd 100644
--- a/src/synth/synth-flags.ads
+++ b/src/synth/synth-flags.ads
@@ -60,4 +60,6 @@ package Synth.Flags is
-- Maximum number of iterations for (while)/loop. 0 means unlimited.
Flag_Max_Loop : Natural := 1000;
+
+ Flag_Verbose : Boolean := False;
end Synth.Flags;
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb
index bdc9f040a..bcd90f2b2 100644
--- a/src/synth/synth-insts.adb
+++ b/src/synth/synth-insts.adb
@@ -53,6 +53,7 @@ with Synth.Expr; use Synth.Expr;
with Synth.Source; use Synth.Source;
with Synth.Debugger;
with Synth.Files_Operations;
+with Synth.Errors;
package body Synth.Insts is
Root_Instance : Synth_Instance_Acc;
@@ -1467,6 +1468,10 @@ package body Synth.Insts is
return;
end if;
+ if Flag_Verbose then
+ Errors.Info_Msg_Synth (+Entity, "synthesizing %n", (1 => +Entity));
+ end if;
+
-- Save the current architecture, so that files can be open using a
-- path relative to the architecture filename.
Synth.Files_Operations.Set_Design_Unit (Arch);