Skip to content

Commit 056a4fc

Browse files
committed
Added -g short flag for --gui. Made 'load' the default in modelsim interface when using -g/--gui
1 parent fc34397 commit 056a4fc

5 files changed

Lines changed: 40 additions & 26 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def find_all_files(directory, endings=None):
3030

3131
setup(
3232
name='vunit_hdl',
33-
version='0.43.0',
33+
version='0.44.0',
3434
packages=['vunit',
3535
'vunit.com',
3636
'vunit.test',

user_guide.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ cases.
3636

3737
```console
3838
> python run.py -h
39+
/repo/vunit (master)$ PYTHONPATH=. python examples/vhdl/user_guide/run.py -h
3940
usage: run.py [-h] [-l] [--compile] [--elaborate] [--clean] [-o OUTPUT_PATH]
40-
[-x XUNIT_XML] [-v] [--no-color] [--gui {load,run}]
41-
[--log-level {info,error,warning,debug}]
42-
[--gui {load,run}] [--new-vsim]
41+
[-x XUNIT_XML] [--exit-0] [-v] [--no-color]
42+
[--log-level {info,error,warning,debug}] [-p NUM_THREADS]
43+
[--use-debug-codecs] [-g [{load,run}]] [--new-vsim]
44+
[--coverage [COVERAGE]]
4345
[tests [tests ...]]
4446

4547
VUnit command line tool.
@@ -63,25 +65,44 @@ optional arguments:
6365
-v, --verbose Print test output immediately and not only when
6466
failure
6567
--no-color Do not color output
66-
--gui {load,run} Open test case(s) in simulator gui. 'load' only loads
67-
the test case and gives the user control. 'run' loads
68-
and runs the test case while recursively logging all
69-
variables and signals
7068
--log-level {info,error,warning,debug}
7169
-p NUM_THREADS, --num-threads NUM_THREADS
7270
Number of tests to run in parallel. Test output is not
7371
continuously written in verbose mode with p > 1
7472

73+
com:
74+
Flags specific to the com message passing package
75+
76+
--use-debug-codecs Run with debug features enabled
77+
78+
modelsim:
79+
ModelSim specific flags
80+
81+
-g [{load,run}], --gui [{load,run}]
82+
Open test case(s) in simulator gui. 'load' only loads
83+
the test case and gives the user control (default).
84+
'run' loads and runs the test case while recursively
85+
logging all variables and signals.
86+
--new-vsim Do not re-use the same vsim process for running
87+
different test cases (slower)
88+
--coverage [COVERAGE]
89+
Enable code coverage. Choose any combination of
90+
"bcestf". When the flag is given with no argument
91+
everthing is enabled. Remember to run --clean when
92+
chaning this as re-compilation is not triggered.
93+
Experimental feature not supported by VUnit main
94+
developers.
95+
7596
activehdl:
7697
Aldec Active HDL specific flags
7798

78-
--gui Open test case(s) in simulator gui with top level pre
99+
-g, --gui Open test case(s) in simulator gui with top level pre
79100
loaded
80101

81102
rivierapro:
82103
Aldec Riviera Pro specific flags
83104

84-
--gui Open test case(s) in simulator gui with top level pre
105+
-g, --gui Open test case(s) in simulator gui with top level pre
85106
loaded
86107

87108
ghdl:
@@ -91,15 +112,6 @@ ghdl:
91112
--gtkwave-args GTKWAVE_ARGS
92113
Arguments to pass to gtkwave
93114

94-
modelsim:
95-
ModelSim specific flags
96-
97-
--gui {load,run} Open test case(s) in simulator gui. 'load' only loads
98-
the test case and gives the user control. 'run' loads
99-
and runs the test case while recursively logging all
100-
variables and signals
101-
--new-vsim Do not re-use the same vsim process for running
102-
different test cases (slower)
103115
```
104116

105117
## VHDL Test Benches
@@ -242,7 +254,7 @@ When interfacing with pre-compiled libraries such as `unisim` from Xilinx the `a
242254
## Running a test case in the ModelSim GUI
243255
Sometimes the textual error messages and logs are not enough to pinpoint the error and a test case needs to be opened in the GUI for visual debugging using single stepping, breakpoints and wave form viewing. VUnit makes it easy to open a test case in the GUI by having a `--gui={load,run}` command line flag:
244256
```console
245-
> python run.py --gui=load my_test_case
257+
> python run.py --gui my_test_case
246258
```
247259
This launches a GUI window for each test case with specific functions pre-loaded printing the following help:
248260
```tcl
@@ -264,7 +276,7 @@ vunit_run
264276

265277
It is also possible to automatically run the test case in the gui while logging all signals and variables recursively using the `--gui=run` flag.
266278
After simulation the user can manually add objects of interest to the waveform viewer without re-running since everything has been logged.
267-
When running large designs this mode can be quite slow and it might be better to just do `--gui=load` and manually add a few signals of interest.
279+
When running large designs this mode can be quite slow and it might be better to just do `--gui` and manually add a few signals of interest.
268280

269281
## GHDL - Viewing signals in GTKWave
270282
Signals can be viewed in GTKWave when using the GHDL simulator and GTKWave executable is found in the `PATH` environment variable.

vunit/activehdl_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def add_arguments(parser):
4444
group = parser.add_argument_group("activehdl",
4545
description="Aldec Active HDL specific flags")
4646

47-
group.add_argument('--gui',
47+
group.add_argument('-g', '--gui',
4848
action="store_true",
4949
default=False,
5050
help=("Open test case(s) in simulator gui with top level pre loaded"))

vunit/modelsim_interface.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ def add_arguments(parser):
4646
"""
4747
group = parser.add_argument_group("modelsim",
4848
description="ModelSim specific flags")
49-
group.add_argument('--gui', choices=["load", "run"],
49+
group.add_argument('-g', '--gui', choices=["load", "run"],
5050
default=None,
51+
nargs="?",
52+
const="load",
5153
help=("Open test case(s) in simulator gui. "
52-
"'load' only loads the test case and gives the user control. "
54+
"'load' only loads the test case and gives the user control (default). "
5355
"'run' loads and runs the test case while recursively "
54-
"logging all variables and signals"))
56+
"logging all variables and signals."))
5557
group.add_argument("--new-vsim",
5658
action="store_true",
5759
default=False,

vunit/rivierapro_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def add_arguments(parser):
4545
group = parser.add_argument_group("rivierapro",
4646
description="Aldec Riviera Pro specific flags")
4747

48-
group.add_argument('--gui',
48+
group.add_argument('-g', '--gui',
4949
action="store_true",
5050
default=False,
5151
help=("Open test case(s) in simulator gui with top level pre loaded"))

0 commit comments

Comments
 (0)