Skip to content

Commit 7972cd7

Browse files
committed
rivierapro: Add VHDL generics support
1 parent d1958bd commit 7972cd7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

edalize/rivierapro.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class Rivierapro(Edatool):
1919

20-
argtypes = ["plusarg", "vlogdefine", "vlogparam"]
20+
argtypes = ["plusarg", "vlogdefine", "vlogparam", "generic"]
2121

2222
@classmethod
2323
def get_doc(cls, api_ver):
@@ -173,6 +173,8 @@ def _write_run_tcl_file(self):
173173
# Top-level parameters
174174
for key, value in self.vlogparam.items():
175175
args += ["-g{}={}".format(key, self._param_value_str(value))]
176+
for key, value in self.generic.items():
177+
args += ["-g{}={}".format(key, self._param_value_str(value))]
176178
tcl_launch.write(" ".join(args) + "\n")
177179
tcl_launch.close()
178180

tests/test_rivierapro.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ def test_rivierapro(make_edalize_test):
1111
}
1212

1313
# FIXME: Add VPI tests
14-
tf = make_edalize_test("rivierapro", tool_options=tool_options)
14+
tf = make_edalize_test(
15+
"rivierapro",
16+
tool_options=tool_options,
17+
param_types=["plusarg", "vlogdefine", "vlogparam", "generic"],
18+
)
1519
tf.backend.configure()
1620

1721
tf.compare_files(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
vsim a few vsim_options top_module +plusarg_bool=1 +plusarg_int=42 +plusarg_str=hello -gvlogparam_bool=1 -gvlogparam_int=42 -gvlogparam_str=hello
1+
vsim a few vsim_options top_module +plusarg_bool=1 +plusarg_int=42 +plusarg_str=hello -gvlogparam_bool=1 -gvlogparam_int=42 -gvlogparam_str=hello -ggeneric_bool=1 -ggeneric_int=42 -ggeneric_str=hello

0 commit comments

Comments
 (0)