Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Let a lint, CDC or RDC config pass several FuseSoC arguments

未关闭
#259 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 内容生成。

描述

enhancement

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_arguments to LintCfg, declared as []; CdcCfg and RdcCfg inherit 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lowRISC/dvsim 的其他 Issue

查看 lowRISC/dvsim 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。