Let a lint, CDC or RDC config pass several FuseSoC arguments
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 75/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- build-system
调研方向
从 flow/lint.py 中的 LintCfg、flow/hjson.py:113-151 中的验证,以及 utils/wildcards.py:35-53 中的通配符展开入手;跟踪 build_opts 如何到达 FuseSoC 命令行。添加复数列表处理,同时保留单数键,拒绝同时设置两者的配置,并运行或添加涵盖跨 imports 列表合并、单数行为和冲突情况的测试。
由索引模型根据 Issue 内容生成。
描述
additional_fusesoc_argument holds one argument. LintCfg declares it as a scalar (flow/lint.py:41), and CdcCfg and RdcCfg inherit it. SimCfg, FormalCfg and SynCfg do not have the key; they reach FuseSoC through sv_flist_gen_flags, which dvsim does not declare, so its type comes from the first config that sets it and a list just works. The declaration as "" is what locks these three flows to a single string, and it appears to be the only declared scalar carrying an open-ended list of tool arguments.
Two things follow. A list is rejected outright by set_target_attribute() (flow/hjson.py:113-151), with of unknown type list. And because scalars merge first-non-default-wins and raise on a genuine conflict, a config and one that imports it cannot each contribute an argument:
RuntimeError: '.../common_lint_cfg.hjson': Value for key 'additional_fusesoc_argument' is
'--mapping=lowrisc:prim_generic:all:0.1', but we already had a conflicting value of
'--mapping=lowrisc:systems:top_darjeeling:0.1'.
So every entry needing a mapping has to spell out the mappings of its whole import chain. Lists merge by concatenation, which is the behaviour this key wants.
Independent of #258, which is why the concatenated string cannot even be wrapped today: fixing that makes the string readable, not the imports composable.
Scope
- Add
additional_fusesoc_argumentstoLintCfg, declared as[];CdcCfgandRdcCfginherit it. Little else is needed, as list keys already merge by concatenation and_stringify_wildcard_value()(utils/wildcards.py:35-53) already joins them with spaces on expansion. - Keep the singular key working and expand both wildcards in
build_opts, since every OpenTitan lint config uses the singular form. Deprecating it is a separate decision. - Reject a config setting both: the names differ by one letter and the order would not be predictable from reading the file.
Done when
- A list of two mappings loads and both reach the FuseSoC command line, including when they come from two configs in an import chain.
- The singular key behaves exactly as before, and a config setting both is rejected. Tests cover all three.
- 主要语言
- Python
- 星标
- 16
- 派生
- 22
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lowRISC/dvsim 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
Better log visibility on the license type usage profile可能已有人在做 @AlexJones0 于 26 天前认领。 未关闭
相似的 Issue
-
flaky-watch
难度 2/5 1-3 小时 新手友好度 88/100
btclib-org/btclib#2839 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nion-software/nionswift#2018 ·
维护者通常 1 天内回复
-
Deleting a member fails when another member's share transfer points to them可能已有人在做 @Beerlesklopfer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
FoodCoopX/wirgarten-tapir#1336 ·
维护者通常 3 天内回复
-
pydanty:is-working
难度 2/5 1-3 小时 新手友好度 71/100
pydantic/pydantic-ai#11467 ·
维护者通常 1 天内回复
-
automated issue linkchecker report
难度 2/5 1-3 小时 新手友好度 66/100
QuantEcon/lecture-python.myst#1098 ·
维护者通常 1 天内回复