Skip to content

Commit

Permalink
[dv] Fix ibex_cmd.py
Browse files Browse the repository at this point in the history
With the latest versions of all python packages in
python-requirements.txt ibex_cmd.py was seeing a run-time type error.
Data from a YAML file that had previously always been a string could now
be an int as well. This alters the code to allow the int to work.
  • Loading branch information
GregAC committed Oct 3, 2023
1 parent dccad9e commit a51daf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dv/uvm/core_ibex/scripts/ibex_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def filter_tests_by_config(cfg: ibex_config.Config,
param_dict = test['rtl_params']
assert isinstance(param_dict, dict)
for p, p_val in param_dict.items():
# Parameters are strings or lists of strings. Coerce to the
# latter to make the code below simpler.
if isinstance(p_val, str):
# Parameters are strings or ints, or lists of those two. Coerce
# to the latter to make the code below simpler.
if isinstance(p_val, str) or isinstance(p_val, int):
p_val = [p_val]

config_val = cfg.params.get(p, None)
Expand Down

0 comments on commit a51daf6

Please sign in to comment.