Skip to content

[AP] Added Ability to Read The Atom Netlist #2749

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

Conversation

AlexandreSinger
Copy link
Contributor

This method reads the atom netlist and uses the results of the prepacker to generate an APNetlist. It also fixes the block locations based on the user place constraints.

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Sep 26, 2024
if (loc.x == APFixedBlockLoc::UNFIXED_DIM &&
loc.y == APFixedBlockLoc::UNFIXED_DIM &&
loc.sub_tile == APFixedBlockLoc::UNFIXED_DIM &&
loc.layer_num == APFixedBlockLoc::UNFIXED_DIM)
return;

block_locs_[id] = loc;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems a bit odd to allow fixed locations with only some dimensions fixed (not sure how you're going to handle that; it would seem like a strange/limited form of region constraint that isn't worth supporting since we already have more general region support). I suggest you assert that all dimensions are fixed if any are fixed; code can then assume FIXED means truly locked down. You can generalize that later, but I'd do that by going through the partition/region constraints, not by allowing individual dimensions to be -1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually is sufficient to just lock it down in the x-dimension, for example, since solvers tend to solve x independent to y. The layer_num is currently always assumed to be 0; but it was easy to add to this struct in this case (being forward looking).

The sub_tile actually need not be locked down (nor should it). The placement constraints file leaves this optional. This was the main reason UNFIXED_DIM exists.

However, since the generation of the APNetlist from the atoms never allows x, y, and layer to be unspecified, I have added an assert to this method to guard against them being unset. I have purposefully left sub_tile out of this assert.

// fixed? Maybe we want nets to be strongly attracted towards some
// blocks over others.

// TODO: Should we cleanup the blocks? For example if there is no path
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless it makes the matrix ill-conditioned I'd leave them alone. And if it makes the matrix ill-conditioned I'd probably find some way to place some of these in a different way and let the rest of the placement evolve around them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will make the matrix ill-conditioned, but Eigen does not have a problem with this. I do not want to lose the note though (since this may be a problem later if we change libraries). I have added a sentence explaining this.

This method reads the atom netlist and uses the results of the prepacker
to generate an APNetlist. It also fixes the block locations based on the
user place constraints.
@AlexandreSinger AlexandreSinger force-pushed the feature-ap-read-atom-netlist branch from ebf2e84 to 86f8af1 Compare September 26, 2024 15:01
@AlexandreSinger
Copy link
Contributor Author

@vaughnbetz I think this is ready to be merged. Should have no effect on NightlyTests.

@vaughnbetz vaughnbetz merged commit 372f0dc into verilog-to-routing:master Sep 26, 2024
37 of 53 checks passed
@AlexandreSinger AlexandreSinger deleted the feature-ap-read-atom-netlist branch November 27, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants