Edalize is expecting that the xrun_options is a list. But the xrun_options defined in the TOOL_OPTIONS is using the str type:
|
"xrun_options": {"type": "str", "desc": "Additional run options for xrun"}, |
Unfortunately the mapping is limited on the FuseSoC side:
https://github.com/olofk/fusesoc/blob/f15e1c8a76815c4f391231dd0e743e2b683c6b45/fusesoc/edalizer.py#L478
Generally this is a common problem for all tools.
Proposition is to add a new small utility function:
import shlex
from typing import Any
from collections.abc import Iterable
def to_args(value: Any) -> list[str]:
"""Convert any provided value to list of strings."""
if not value:
return []
if isinstance(value, str):
return shlex.parse(value)
if isinstance(value, Iterable):
return [str(item) for item in value]
return to_args(str(value))
Then it could be used like this:
args += to_args(self.tool_options.get("xrun_options"))
Edalize is expecting that the
xrun_optionsis a list. But thexrun_optionsdefined in theTOOL_OPTIONSis using thestrtype:edalize/edalize/tools/xcelium.py
Line 22 in e33ebfb
Unfortunately the mapping is limited on the FuseSoC side:
https://github.com/olofk/fusesoc/blob/f15e1c8a76815c4f391231dd0e743e2b683c6b45/fusesoc/edalizer.py#L478
Generally this is a common problem for all tools.
Proposition is to add a new small utility function:
Then it could be used like this: