Skip to content

generate variables.json to avoid yaml dependency in Python scripts - #556

Closed
oharboe wants to merge 4409 commits into
masterfrom
variables-json
Closed

oharboe wants to merge 4409 commits into
masterfrom
variables-json

Conversation

@oharboe

@oharboe oharboe commented Feb 27, 2026

Copy link
Copy Markdown

Summary

  • generate-variables-docs.py now outputs variables.json alongside FlowVariables.md documentation, converting variables.yaml to JSON format
  • defaults.py reads from variables.json using built-in json module instead of variables.yaml with yaml module
  • non_stage_variables.py reads from variables.json using built-in json module instead of variables.yaml with yaml module
  • tools/AutoTuner/src/autotuner/utils.py parse_tunable_variables() reads from variables.json using built-in json module, removing the import yaml dependency

Motivation

The yaml module is an external dependency. Python's built-in json module is sufficient for downstream consumers of variables.yaml. By having generate-variables-docs.py also emit variables.json, all other scripts can drop the yaml import.

Test plan

  • Run generate-variables-docs.py — produces variables.json and updates FlowVariables.md
  • Run defaults.py — outputs correct export VAR?=default lines
  • Run non_stage_variables.py synth — outputs correct list of non-synth variables

🤖 Generated with Claude Code

precisionmoon and others added 30 commits January 26, 2026 00:30
Signed-off-by: Cho Moon <cmoon@precisioninno.com>
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
Signed-off-by: Cho Moon <cmoon@precisioninno.com>
Signed-off-by: Cho Moon <cmoon@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
…t-staging/support-diff-make-output

support different output from make
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
…t-staging/rapidus-design-tuning

rapidus design tuning for PDK 0.3
Signed-off-by: Jack Luar <jluar@precisioninno.com>
- don't use cd
- use CMake to build
- don't touch submodules

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
…tom-sdc-fr

Autotuner: enable custom sdc/fr files for sweep mode
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
…how-physical

Show all physical instances other than filler cells
…t-staging/unit-test-refactor

rapidus param test re-factoring
Signed-off-by: Cho Moon <cmoon@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…t-staging/rapidus-corner-metrics

Metrics update for PDK 0.3 corner cell change
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
Resolve all conflicts in favor of this branch.  Will be tested on the
next build.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…t-staging/pdk-0.3-6T-tuning

Tuning designs for PDK 0.3 using 6T library
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
maliberty and others added 27 commits February 24, 2026 22:33
…ec-default-on-2

LEC: default on for ORFS test scripts
The fakeram45_256x48 instance in bsg_mem_1rw_sync_width_p48_els_p256
had its w_mask_in port left unconnected, causing ORD-2041 sanity check
failure. Tie w_mask_in to 0 (active-low) to enable whole-word writes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
This allows to specify arguments to the detailed_placement call during placement.

Refer to issue The-OpenROAD-Project#3920 for background.

Signed-off-by: Christian Gelinek <cgelinek@gar.radnet.com.au>
…-var-DETAIL_PLACEMENT_ARGS

Added variable DETAIL_PLACEMENT_ARGS
Signed-off-by: nanocoh <noam.chn1@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…single-commit

reduce info logging for LEC check
…t-staging/secure-est_via_res

update metrics for est_via_res update
Signed-off-by: nanocoh <noam.chn1@gmail.com>
…single-commit

liberty parsing fix in LEC check
Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…t-staging/exclude-lec-elapsed-time

exclude lec check log from elapsed time extraction
…t-staging/secure-fix-bp-quad-rtl

Fix unconnected w_mask_in on cce_inst_ram in bp_quad
Signed-off-by: Martin Povišer <povik@cutebit.org>
| Metric                                        | Old      | New      | Type     |
| ------                                        | ---      | ---      | ----     |
| cts__timing__setup__tns                       |   -452.0 |   -693.0 | Failing  |
| globalroute__timing__setup__tns               |  -5600.0 |  -1700.0 | Tighten  |
| finish__timing__setup__tns                    |  -4360.0 | -12300.0 | Failing  |

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
designs/rapidus2hp/cva6/rules-base.json updates:
| Metric                                        | Old      | New      | Type     |
| ------                                        | ---      | ---      | ----     |
| cts__timing__setup__tns                       |   -317.0 |   -287.0 | Tighten  |
| globalroute__timing__setup__tns               |   -526.0 |   -680.0 | Failing  |
| finish__timing__setup__tns                    |   -526.0 |   -680.0 | Failing  |

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…t-staging/metrics-a7-mock-sram

designs/asap7/riscv32i-mock-sram/rules-base.json updates:
…t-staging/priv-metrics-lec

Disable LEC for gf12 ariane & tinyRocket and update rap/cva6 metrics
…t-staging/reenable-sta-threads

Lift forcing of STA to single-threaded
generate-variables-docs.py now also outputs variables.json alongside
the FlowVariables.md documentation. This allows defaults.py,
non_stage_variables.py, and AutoTuner/utils.py to use the built-in
json module instead of depending on the external yaml module.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oharboe oharboe closed this Feb 27, 2026
@oharboe
oharboe deleted the variables-json branch February 27, 2026 07:07
@oharboe
oharboe restored the variables-json branch February 27, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.