diff options
author | Jonas Baggett <jonas17b@gmail.com> | 2016-11-01 19:23:38 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2016-11-01 19:23:38 +0100 |
commit | b869a4acb52358fe8ca5decaac826af056bfdfca (patch) | |
tree | bf9f65e7be9f06ab401e5f23f22194846aa1c389 /src/grt/grt-options.adb | |
parent | dc6a82418653ce5b732d2bc26b393d3259fd93d5 (diff) | |
download | ghdl-b869a4acb52358fe8ca5decaac826af056bfdfca.tar.gz ghdl-b869a4acb52358fe8ca5decaac826af056bfdfca.tar.bz2 ghdl-b869a4acb52358fe8ca5decaac826af056bfdfca.zip |
There is a new --write-opt-file option that will create a wave option file with all the signals of the design. (#179)
The --wave-opt-file option is renamed to --read-opt-file for consistency
Some code cleanup and bug fixes
Diffstat (limited to 'src/grt/grt-options.adb')
-rw-r--r-- | src/grt/grt-options.adb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/grt/grt-options.adb b/src/grt/grt-options.adb index 6c3f333d3..8c045bd7d 100644 --- a/src/grt/grt-options.adb +++ b/src/grt/grt-options.adb @@ -28,7 +28,7 @@ with Grt.Errors; use Grt.Errors; with Grt.Stdio; use Grt.Stdio; with Grt.Astdio; with Grt.Hooks; -with Grt.Wave_Opt_File.Parse; +with Grt.Wave_Opt.File; package body Grt.Options is @@ -165,7 +165,8 @@ package body Grt.Options is P (" --no-run do not simulate, only elaborate"); P (" --unbuffered disable buffering on stdout, stderr and"); P (" files opened in write or append mode (TEXTIO)."); - P (" --wave-opt-file=FILENAME read a wave option file"); + P (" --read-wave-opt=FILENAME read a wave option file."); + P (" --write-wave-opt=FILENAME write a wave option file."); -- P (" --threads=N use N threads for simulation"); P ("Additional features:"); P (" --has-feature=X test presence of feature X"); @@ -486,9 +487,14 @@ package body Grt.Options is Unbuffered_Writes := True; setbuf (stdout, NULL_voids); setbuf (stderr, NULL_voids); - elsif Option'Length >= 16 and then Option (1 .. 16) = "--wave-opt-file=" + elsif Len >= 16 and then Option (1 .. 16) = "--read-wave-opt=" then - Wave_Opt_File.Parse.Start (Option (17 .. Option'Last)); + Wave_Opt.File.Start + (Option (17 .. Option'Last), To_Be_Created => False); + elsif Len >= 17 and then Option (1 .. 17) = "--write-wave-opt=" + then + Wave_Opt.File.Start + (Option (18 .. Option'Last), To_Be_Created => True); elsif not Grt.Hooks.Call_Option_Hooks (Option) then Error_C ("unknown option '"); Error_C (Option); |