Skip to content

Read flat router .route file #2343

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

Merged
merged 8 commits into from
Jun 30, 2023
Merged

Read flat router .route file #2343

merged 8 commits into from
Jun 30, 2023

Conversation

saaramahmoudi
Copy link
Contributor

@saaramahmoudi saaramahmoudi commented Jun 26, 2023

Description

Once we used flat router to route the design, newly generated .route file couldn't be read by VPR anymore. We couldn't load any .route file generated by flat router. This PR address this issue and add support for reading any .route file regardless of how it is generated (normal or flat routing).

NOTE: you still need to pass flat_routing true as command-line option if you generated .route file using flat router.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@saaramahmoudi
Copy link
Contributor Author

@vaughnbetz @amin1377 please review the changes.

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Jun 26, 2023
@vaughnbetz
Copy link
Contributor

The code looks good.

  1. Please also make a regtest for this.
  2. What happens if you try to read a flat routing file when flat routing isn't specified or vice versa? Please try it out, and if at all possible, give a good error message (instead of a seg fault or baffling assert).

@saaramahmoudi
Copy link
Contributor Author

@vaughnbetz It wouldn't be seg-fault, it will be out with an assertion which tell the user that rr-graph node in the .route file doesn't exist.

@vaughnbetz
Copy link
Contributor

We should replace the assert with an error message that gives them an idea of what went wrong (rr-node does not exist. Running without flat routing; if this file was created with flat routing, re-run vpr with the --flat_routing option
(not sure of the exact option so please check that).

@amin1377 : It doesn't seem the flat routing option is documented in the vpr command line options. Can you add it?

@amin1377
Copy link
Contributor

We should replace the assert with an error message that gives them an idea of what went wrong (rr-node does not exist. Running without flat routing; if this file was created with flat routing, re-run vpr with the --flat_routing option (not sure of the exact option so please check that).

@amin1377 : It doesn't seem the flat routing option is documented in the vpr command line options. Can you add it?

There is a brief description available if you run vpr -h. You can find the corresponding code here. However, if you are referring to the online documentation, you are right. I haven't included any information about the flat-router there yet. I will make sure to add it as soon as possible.

@vaughnbetz
Copy link
Contributor

Thanks. Yes, we should put it in the online documentation too.

@saaramahmoudi
Copy link
Contributor Author

@vaughnbetz Three places can give us error if we read .route file that is generated with flat router, I added message for all three that maybe the user should try --flat_routing true option.
Can we please merge this one and I will make another PR for regtest if that is possible.

@saaramahmoudi
Copy link
Contributor Author

@vaughnbetz can you please merge this?

@vaughnbetz vaughnbetz merged commit d62ad56 into master Jun 30, 2023
@vaughnbetz vaughnbetz deleted the read_flat_router branch June 30, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants