diff options
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 26 | ||||
-rw-r--r-- | src/synth/netlists-dump.adb | 8 | ||||
-rw-r--r-- | src/synth/netlists-dump.ads | 3 |
3 files changed, 31 insertions, 6 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index fc0610d7f..55df0639e 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -18,7 +18,7 @@ with Ghdllocal; use Ghdllocal; with Ghdlcomp; -with Ghdlmain; +with Ghdlmain; use Ghdlmain; with Ghdlsimul; with Libraries; @@ -32,11 +32,16 @@ with Netlists.Dump; package body Ghdlsynth is -- Command --synth - type Command_Synth is new Command_Lib with null record; + type Command_Synth is new Command_Lib with record + Disp_Inline : Boolean := True; + end record; function Decode_Command (Cmd : Command_Synth; Name : String) return Boolean; function Get_Short_Help (Cmd : Command_Synth) return String; - + procedure Decode_Option (Cmd : in out Command_Synth; + Option : String; + Arg : String; + Res : out Option_Res); procedure Perform_Action (Cmd : Command_Synth; Args : Argument_List); @@ -55,6 +60,19 @@ package body Ghdlsynth is return "--synth [FILES... -e] UNIT [ARCH] Synthesis from UNIT"; end Get_Short_Help; + procedure Decode_Option (Cmd : in out Command_Synth; + Option : String; + Arg : String; + Res : out Option_Res) is + begin + if Option = "--disp-noinline" then + Cmd.Disp_Inline := False; + Res := Option_Ok; + else + Decode_Option (Command_Lib (Cmd), Option, Arg, Res); + end if; + end Decode_Option; + function Ghdl_Synth (Args : Argument_List) return Netlists.Module is E_Opt : Integer; @@ -104,10 +122,10 @@ package body Ghdlsynth is procedure Perform_Action (Cmd : Command_Synth; Args : Argument_List) is - pragma Unreferenced (Cmd); Res : Netlists.Module; begin Res := Ghdl_Synth (Args); + Netlists.Dump.Flag_Disp_Inline := Cmd.Disp_Inline; Netlists.Dump.Disp_Module (Res); end Perform_Action; diff --git a/src/synth/netlists-dump.adb b/src/synth/netlists-dump.adb index 16818bada..76438a6e1 100644 --- a/src/synth/netlists-dump.adb +++ b/src/synth/netlists-dump.adb @@ -305,8 +305,6 @@ package body Netlists.Dump is end if; end Dump_Net_Name_And_Width; - Flag_Disp_Inline : constant Boolean := True; - function Can_Inline (Inst : Instance) return Boolean is begin case Get_Id (Inst) is @@ -411,6 +409,12 @@ package body Netlists.Dump is Dump_Name (Get_Name (Inst)); end if; + if True then + Put ('['); + Put_Trim (Instance'Image (Inst)); + Put (']'); + end if; + if Get_Nbr_Inputs (M) > 0 then declare First : Boolean; diff --git a/src/synth/netlists-dump.ads b/src/synth/netlists-dump.ads index 7cca85400..b2855111c 100644 --- a/src/synth/netlists-dump.ads +++ b/src/synth/netlists-dump.ads @@ -19,6 +19,9 @@ -- MA 02110-1301, USA. package Netlists.Dump is + -- If set, compact print. + Flag_Disp_Inline : Boolean := True; + procedure Dump_Net_Name (N : Net; With_Id : Boolean := False); procedure Disp_Driver (Drv : Net); procedure Disp_Instance (Inst : Instance; With_Name : Boolean); |