diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-04-16 19:03:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-04-16 19:03:15 +0200 |
commit | 5a31efbb82ef8ef34f5052c9c7a43dea97794718 (patch) | |
tree | c51adbe64e14faab0906b63776c61760d1cc7286 /src/ghdldrv | |
parent | 1a7a8ac61228917e81d1a27222f8faa0b35385c0 (diff) | |
download | ghdl-5a31efbb82ef8ef34f5052c9c7a43dea97794718.tar.gz ghdl-5a31efbb82ef8ef34f5052c9c7a43dea97794718.tar.bz2 ghdl-5a31efbb82ef8ef34f5052c9c7a43dea97794718.zip |
synth: add --disp-noinline
Diffstat (limited to 'src/ghdldrv')
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 26 |
1 files changed, 22 insertions, 4 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; |