Skip to content

Commit 402bd1e

Browse files
pib88umarcor
authored andcommitted
Update rivierapro.py
Special string parameters like tb_path and output_path should be in quotes when used in verilog
1 parent 5d4fc21 commit 402bd1e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

vunit/sim_if/rivierapro.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ def _create_load_function(self, test_suite_name, config, output_path): # pylint
279279
Create the vunit_load TCL function that runs the vsim command and loads the design
280280
"""
281281
set_generic_str = " ".join(
282-
(f"-g/{config.entity_name!s}/{name!s}={format_generic(value)!s}" for name, value in config.generics.items())
282+
f"-g/{config.entity_name!s}/{name!s}={format_generic(name, value)!s}"
283+
for name, value in config.generics.items()
283284
)
284285
pli_str = " ".join(f'-pli "{fix_path(name)}"' for name in config.sim_options.get("pli", []))
285286

@@ -424,12 +425,13 @@ def merge_coverage(self, file_name, args=None):
424425
print("Done merging coverage files")
425426

426427

427-
def format_generic(value):
428+
def format_generic(name, value):
428429
"""
429430
Generic values with space in them need to be quoted
431+
We know that tb_path and output_path are strings - they also need to be in quote
430432
"""
431433
value_str = str(value)
432-
return f'"{value_str!s}"' if " " in value_str else value_str
434+
return f'"{value_str!s}"' if " " in value_str or name == "output_path" or name == "tb_path" else value_str
433435

434436

435437
class VersionConsumer(object):

0 commit comments

Comments
 (0)