From 5e3156f249145f7384f0a4fe25486791efd0e10a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 22 Apr 2020 19:03:49 +0200 Subject: synth: support -v option. --- src/ghdldrv/ghdlsynth.adb | 6 ++++++ src/synth/synth-flags.ads | 2 ++ src/synth/synth-insts.adb | 5 +++++ 3 files changed, 13 insertions(+) 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); -- cgit v1.2.3