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

Let a use_cfgs entry pin its own tool

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
build-system

调研方向

首先沿着 flow/base.py 中的 create_instance 和 _load_child_cfg,跟踪到 flow/factory.py 中的工厂闭包,然后检查 flow/hjson.py 中的 _CMDLINE_FIELDS。添加按子项处理工具的逻辑,同时保留命令行优先级并拒绝其他 override 键;然后添加一个加载回归测试,展示独立的 xcelium 和 vcformal 子项使用各自的工具设置和 scratch 路径。

由索引模型根据 Issue 内容生成。

描述

enhancement

Part of lowRISC/dvplan#129.

Running a simulation regression under Xcelium and a formal regression under VC Formal in one invocation is a requirement for the bundle work, and it cannot be expressed today.

tool is the one key a config cannot set for itself once the command line gives it, by way of _CMDLINE_FIELDS in flow/hjson.py. Scalar merging is first-non-default-wins and raises on a genuine conflict, so a config setting tool: vcformal while importing OpenTitan's common_formal_cfg.hjson, which pins tool: jaspergold, fails to load with a conflicting-value error. The only way to select VC Formal is --tool vcformal on the command line, which applies to every config in the invocation.

Scope

  • Let a use_cfgs entry carry a tool, seeded into that child's initial_values. Because arg_keys is computed from the keys present in initial_values, a seeded value wins over every imported file, which is exactly the mechanism --tool already uses. No changes needed in any OpenTitan or Mocha config.
  • create_instance and _load_child_cfg in flow/base.py take the per-child overrides, and the factory closure in flow/factory.py applies them.
  • --tool on the command line keeps overriding everything, since that is what it is for.
  • Reject an override for a key other than tool for now, so this does not quietly become a general-purpose per-child config channel. That belongs with #36.

Done when

  • A primary config with one child pinned to xcelium and another pinned to vcformal loads, and each child's scratch path and tool config come from its own tool.
  • A test covers the load, since the failure mode today is a RuntimeError from config merging and is easy to reintroduce.
主要语言
Python
星标
15
派生
22
平均合并
4 天 3 小时
30 天内合并 PR
7

环境准备

从这里开始

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

lowRISC/dvsim 的其他 Issue

查看 lowRISC/dvsim 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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