Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add synth_design_options override for vivado #602

wants to merge 3 commits into from


Copy link

@slan slan commented Mar 22, 2021

Apparently the only way to pass options for synthesis in Vivado non-project mode is to add the arguments to the synth_design tcl command directly.

This PR adds an override to the

One use case is to inspect the synthesized design in Vivado with the following overrides in

        synth_design_options="-flatten_hierarchy none -keep_equivalent_registers -no_lc",
        script_after_synth="write_checkpoint -force top.dcp",

There might be a more elegant/generic way of doing this for other workflows/platforms (environment variables?).

Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #602 (b510261) into master (c84d4af) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head b510261 differs from pull request most recent head 64d596d. Consider uploading reports for the commit 64d596d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #602   +/-   ##
  Coverage   81.50%   81.51%           
  Files          49       49           
  Lines        6461     6463    +2     
  Branches     1287     1287           
+ Hits         5266     5268    +2     
- Misses       1007     1008    +1     
+ Partials      188      187    -1     
Impacted Files Coverage Δ
nmigen/lib/ 94.14% <100.00%> (+0.05%) ⬆️
nmigen/build/ 22.05% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c84d4af...64d596d. Read the comment docs.

Copy link

@whitequark whitequark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept looks reasonable, but this will not be merged until #563 is, so you might want to hold up updating this PR until that happens. I'll try to do that soon.

@@ -108,7 +108,7 @@ def _part(self):
read_xdc {{file|tcl_escape}}
{% endfor %}
{{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
synth_design -top {{name}}
synth_design -top {{name}} {{get_override("synth_design_options")|default("# (synth_design_options placeholder)")}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere we use opts, so this should be called synth_design_opts.

Copy link

slan commented Apr 9, 2021

Re-opening with proper branch name so I can merge locally. Sorry for the hassle

@slan slan closed this Apr 9, 2021
@slan slan mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants