118118 A list of PLI file names.
119119
120120``ghdl.flags``
121- Extra arguments passed to ``ghdl --elab-run`` command *before* executable specific flags. Must be a list of strings.
121+ Extra arguments passed to ``ghdl --elab-run`` command *before* executable specific flags.
122122 Must be a list of strings.
123123
124124``incisive.irun_sim_flags``
@@ -290,12 +290,16 @@ class VUnit(object): # pylint: disable=too-many-instance-attributes, too-many-p
290290 """
291291
292292 @classmethod
293- def from_argv (cls , argv = None , compile_builtins = True , vhdl_standard = None ):
293+ def from_argv (cls , argv = None , compile_builtins = True , vhdl_standard = None , use_external = None , impls = None ):
294294 """
295295 Create VUnit instance from command line arguments.
296296
297297 :param argv: Use explicit argv instead of actual command line argument
298298 :param compile_builtins: Do not compile builtins. Used for VUnit internal testing.
299+ :param vhdl_standard: The VHDL standard used to compile files into this library,
300+ if None the VUNIT_VHDL_STANDARD environment variable is used
301+ :param use_external: list of a single Boolean, to select whether to enable external models for string.
302+ :param impls: optional list of lists containing alternative implementations for external models
299303 :returns: A :class:`.VUnit` object instance
300304
301305 :example:
@@ -307,10 +311,16 @@ def from_argv(cls, argv=None, compile_builtins=True, vhdl_standard=None):
307311
308312 """
309313 args = VUnitCLI ().parse_args (argv = argv )
310- return cls .from_args (args , compile_builtins = compile_builtins , vhdl_standard = vhdl_standard )
314+ return cls .from_args (
315+ args ,
316+ compile_builtins = compile_builtins ,
317+ vhdl_standard = vhdl_standard ,
318+ use_external = use_external ,
319+ impls = impls
320+ )
311321
312322 @classmethod
313- def from_args (cls , args , compile_builtins = True , vhdl_standard = None ):
323+ def from_args (cls , args , compile_builtins = True , vhdl_standard = None , use_external = None , impls = None ):
314324 """
315325 Create VUnit instance from args namespace.
316326 Intended for users who adds custom command line options.
@@ -319,12 +329,22 @@ def from_args(cls, args, compile_builtins=True, vhdl_standard=None):
319329
320330 :param args: The parsed argument namespace object
321331 :param compile_builtins: Do not compile builtins. Used for VUnit internal testing.
332+ :param vhdl_standard: The VHDL standard used to compile files into this library,
333+ if None the VUNIT_VHDL_STANDARD environment variable is used
334+ :param use_external: list of a single Boolean, to select whether to enable external models for string.
335+ :param impls: optional list of lists containing alternative implementations for external models
322336 :returns: A :class:`.VUnit` object instance
323- """
324337
325- return cls (args , compile_builtins = compile_builtins , vhdl_standard = vhdl_standard )
338+ """
339+ return cls (
340+ args ,
341+ compile_builtins = compile_builtins ,
342+ vhdl_standard = vhdl_standard ,
343+ use_external = use_external ,
344+ impls = impls
345+ )
326346
327- def __init__ (self , args , compile_builtins = True , vhdl_standard = None ):
347+ def __init__ (self , args , compile_builtins = True , vhdl_standard = None , use_external = None , impls = None ):
328348 self ._args = args
329349 self ._configure_logging (args .log_level )
330350 self ._output_path = abspath (args .output_path )
@@ -371,8 +391,9 @@ def test_filter(name, attribute_names):
371391 self ._test_bench_list = TestBenchList (database = database )
372392
373393 self ._builtins = Builtins (self , self ._vhdl_standard , simulator_class )
394+ self ._compile_builtins = compile_builtins
374395 if compile_builtins :
375- self .add_builtins ()
396+ self .add_builtins (use_external = use_external , impls = impls )
376397
377398 def _create_database (self ):
378399 """
@@ -858,7 +879,6 @@ def _main(self, post_run):
858879 """
859880 Base vunit main function without performing exit
860881 """
861-
862882 if self ._args .export_json is not None :
863883 return self ._main_export_json (self ._args .export_json )
864884
@@ -1056,11 +1076,14 @@ def _run_test(self, test_cases, report):
10561076 no_color = self ._args .no_color )
10571077 runner .run (test_cases )
10581078
1059- def add_builtins (self ):
1079+ def add_builtins (self , use_external = None , impls = None ):
10601080 """
10611081 Add vunit VHDL builtin libraries
1082+
1083+ :param use_external: list of a single Boolean, to select whether to enable external models for string.
1084+ :param impls: optional list of lists containing alternative implementations for external models.
10621085 """
1063- self ._builtins .add_vhdl_builtins ()
1086+ self ._builtins .add_vhdl_builtins (use_external = use_external , impls = impls )
10641087
10651088 def add_com (self ):
10661089 """
0 commit comments