Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Make Github ignore the designs folder when determining repo language
flow/designs/src/* linguist-vendored
flow/scripts/variables.json linguist-generated=true
17 changes: 12 additions & 5 deletions .github/workflows/github-actions-yaml-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,29 @@ jobs:
fetch-depth: 1
sparse-checkout: |
flow/scripts/generate-variables-docs.py
flow/scripts/yaml_to_json.py
Comment thread
oksaumya marked this conversation as resolved.
flow/scripts/variables.yaml
flow/scripts/variables.json
docs/user/FlowVariables.md
yamlfix.toml
- name: Install dependencies
run: |
python3 -m venv venv
venv/bin/pip install --quiet pyyaml yamlfix==1.19.1
- name: Run generate-variables-docs.py
run: |
python3 flow/scripts/generate-variables-docs.py
venv/bin/python3 flow/scripts/generate-variables-docs.py
- name: Check if FlowVariables.md is up to date
run: |
git diff --exit-code docs/user/FlowVariables.md
- name: Install dependencies
- name: Check variables.json is up to date
run: |
python3 -m venv venv
venv/bin/pip install --quiet yamlfix==1.17.0
venv/bin/python3 flow/scripts/yaml_to_json.py
git diff --exit-code flow/scripts/variables.json
Comment thread
oksaumya marked this conversation as resolved.
- name: Run yamlfix check
run: |
source venv/bin/activate
yamlfix --version
set -x
yamlfix -c yamlfix.toml flow/scripts/variables.yaml
git diff flow/scripts/variables.yaml
git diff --exit-code flow/scripts/variables.yaml
2 changes: 1 addition & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ configuration file.
| <a name="SYNTH_OPERATIONS_ARGS"></a>SYNTH_OPERATIONS_ARGS| Extra arguments appended to the Yosys synth command operations list. When set, replaces the default Kogge-Stone adder extra-map.| |
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| |
| <a name="SYNTH_REPEATABLE_BUILD"></a>SYNTH_REPEATABLE_BUILD| License to prune anything that makes builds less repeatable, typically used with Bazel to ensure that builds are bit-for-bit identical so that caching works optimally. Removes debug information that encodes paths, timestamps, etc.| 0|
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| *This is an experimental option and may cause adverse effects.* *No effort has been made to check if the retimed RTL is logically equivalent to the non-retimed RTL.* List of modules to apply automatic retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. The main use case is to quickly identify if performance can be improved by manually retiming the input RTL. Retiming will treat module ports like register endpoints/startpoints. The objective function of retiming isn't informed by SDC, even the clock period is ignored. As such, retiming will optimize for best delay at potentially high register number cost. Automatic retiming can produce suboptimal results as its timing model is crude and it doesn't find the optimal distribution of registers on long pipelines. See OR discussion #8080.| |
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| *This is an experimental option and may cause adverse effects.* *No effort has been made to check if the retimed RTL is logically equivalent to the non-retimed RTL.* List of modules to apply automatic retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. The main use case is to quickly identify if performance can be improved by manually retiming the input RTL. Retiming will treat module ports like register endpoints/startpoints. The objective function of retiming isn't informed by SDC, even the clock period is ignored. As such, retiming will optimize for best delay at potentially high register number cost. Automatic retiming can produce suboptimal results as its timing model is crude and it doesn't find the optimal distribution of registers on long pipelines. See OR discussion # 8080.| |
| <a name="SYNTH_SLANG_ARGS"></a>SYNTH_SLANG_ARGS| Additional arguments passed to the slang frontend during synthesis.| |
| <a name="SYNTH_WRAPPED_ADDERS"></a>SYNTH_WRAPPED_ADDERS| Specify the adder modules that can be used for synthesis, separated by commas. The default adder module is determined by the first element of this variable.| |
| <a name="SYNTH_WRAPPED_MULTIPLIERS"></a>SYNTH_WRAPPED_MULTIPLIERS| Specify the multiplier modules that can be used for synthesis, separated by commas. The default multiplier module is determined by the first element of this variable.| |
Expand Down
1 change: 1 addition & 0 deletions flow/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports_files(

# files shared between scripts/synth.sh and scripts/flow.sh steps
MAKEFILE_SHARED = [
"scripts/variables.json",
"scripts/*.py",
"scripts/*.sh",
"scripts/*.yaml",
Expand Down
8 changes: 4 additions & 4 deletions flow/scripts/defaults.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python3

import json
import os
import yaml

dir_path = os.path.dirname(os.path.realpath(__file__))

yaml_path = os.path.join(dir_path, "variables.yaml")
with open(yaml_path, "r") as file:
data = yaml.safe_load(file)
json_path = os.path.join(dir_path, "variables.json")
with open(json_path, "r") as file:
data = json.load(file)

for key, value in data.items():
if value.get("default", None) is None:
Expand Down
8 changes: 4 additions & 4 deletions flow/scripts/non_stage_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#
# This script generates a list of variables known
# not to be in the current stage.
import json
import os
import sys
import yaml

dir_path = os.path.dirname(os.path.realpath(__file__))

yaml_path = os.path.join(dir_path, "variables.yaml")
with open(yaml_path, "r") as file:
data = yaml.safe_load(file)
json_path = os.path.join(dir_path, "variables.json")
with open(json_path, "r") as file:
data = json.load(file)

for key, value in data.items():
if "stages" not in value:
Expand Down
Loading