From 5a31efbb82ef8ef34f5052c9c7a43dea97794718 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 16 Apr 2019 19:03:15 +0200 Subject: synth: add --disp-noinline --- src/ghdldrv/ghdlsynth.adb | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/ghdldrv') 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; -- cgit v1.2.3