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

Fix clock placement in devices with limited grid #1523

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

rw1nkler
Copy link
Contributor

@rw1nkler rw1nkler commented Jun 9, 2020

This commit adds the ability to verify if the clock location is available in the FPGA grid before placement. It uses architecture XML for the verification.

Resolves #1517

@probot-autolabeler probot-autolabeler bot added lang-python Issue uses (or requires) Python language. type-utils Issues is related to the scripts inside the repo. labels Jun 9, 2020
@mithro mithro requested a review from tcal-x June 9, 2020 15:57
@mithro
Copy link
Contributor

mithro commented Jun 9, 2020

PTAL - @tcal-x

@tcal-x
Copy link
Contributor

tcal-x commented Jun 9, 2020

PTAL - @tcal-x

I will try the script on the test where I had to add the workaround LOC constraints. I need to rebuild rr_graph in my sandbox though so it will be a few hours before I have an update.

@tcal-x
Copy link
Contributor

tcal-x commented Jun 10, 2020

This fix may be unrelated to the issue I'm seeing. In any case, I see exactly the same error using the new version of the script, just the line numbers are different. In my case, the script has difficulty placing the PLLE2_ADV if it is not constrained. I'm targeting the full 100T chip.

This is the error (line numbers are using the new version from this PR):

Traceback (most recent call last):
  File "/home/tcal/2nd-tcal-x/symbiflow-arch-defs/xc/common/utils/prjxray_create_place_constraints.py", line 734, in <module>
    main()
  File "/home/tcal/2nd-tcal-x/symbiflow-arch-defs/xc/common/utils/prjxray_create_place_constraints.py", line 722, in main
    vpr_grid, loc_in_use, block_locs, blocks, grid_capacities):
  File "/home/tcal/2nd-tcal-x/symbiflow-arch-defs/xc/common/utils/prjxray_create_place_constraints.py", line 519, in place_clocks
    for potential_loc in sorted(available_placements[key]):
KeyError: ('PLLE2_ADV', 5)

@rw1nkler rw1nkler changed the title [DNM] Fix clock placement in devices with limited grid Fix clock placement in devices with limited grid Jun 16, 2020
@rw1nkler rw1nkler force-pushed the fix_clock_placement branch 3 times, most recently from 9e3f055 to 86a97ec Compare June 22, 2020 08:18
@rw1nkler
Copy link
Contributor Author

I have changed the script to use limited device grid. Additionally, now it is possible to use only top/bottom half of the device.

The script does not check if the used resource is available in the given clock domain. (This bug was present before) Because of that, after limiting the device grid, sometimes it tries to place i.e. PLLE2_ADV instance in the clock domain that, does not have it. I fixed the problem by excluding almost empty clock domains from the basys-bottom device definition when the problem occurs.

A universal solution requires rearranging the constraint problem and adding proper checks of variable domains to clocking resources like i.e. PLLs.

@rw1nkler rw1nkler requested a review from litghost June 23, 2020 12:08
Copy link
Contributor

@litghost litghost left a comment

Choose a reason for hiding this comment

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

Small change requested

Copy link
Contributor

@litghost litghost left a comment

Choose a reason for hiding this comment

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

LGTM, merge if green

This commit adds the ability to verify if the clock
location is available in the FPGA grid before placement.
It uses the grid_limit parameter added to the building system.

Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
@litghost litghost merged commit 825b7cd into f4pga:master Jul 9, 2020
@rw1nkler rw1nkler mentioned this pull request Jul 28, 2020
@umarcor umarcor deleted the fix_clock_placement branch March 22, 2022 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-artix7 lang-python Issue uses (or requires) Python language. type-utils Issues is related to the scripts inside the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Place constraints script ignores ROI
5 participants