Skip to content

Vpr constraints fixes #1602

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 3 commits into from
Dec 8, 2020
Merged

Vpr constraints fixes #1602

merged 3 commits into from
Dec 8, 2020

Conversation

sfkhalid
Copy link
Contributor

@sfkhalid sfkhalid commented Dec 3, 2020

Added a change to the XML Schema so that atoms and regions can be added in any order. Also added ability to provide regular expressions in place of atoms.

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Dec 3, 2020

auto atom_name_regex = std::regex(atom_name);

std::vector<AtomBlockId> clear_atoms;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use atoms_.clear() instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in other places in this file, use this same method

atom_id_ = atom_ctx.nlist.find_block(name_pattern);

if (atom_id_ == AtomBlockId::INVALID()) {
if (atom_id_ != AtomBlockId::INVALID()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

might have a specific name, might have a regex, this code could get slow if you have a lot of wildcards

auto block_name = atom_ctx.nlist.block_name(block_id);

if (std::regex_match(block_name, atom_name_regex)) {
VTR_LOG("Matched block %s with ID %d to regex\n", block_name.c_str(), block_id);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

take this out, debug statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or make it vtr verbose level, can check comments for vtr utils

if (atom_id_ != AtomBlockId::INVALID()) {
constraints_.add_constrained_atom(atom_id_, part_id);
for (unsigned int i = 0; i < atoms_.size(); i++) {
if (atoms_[i] != AtomBlockId::INVALID()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't need if statement because this should never happen, get rid of the if statement. can use vtr assert -> blockid is not invalid. if atom netlist has an obvious check that block id is valid, can use that here. if there is no easy check, don't need to do that

@sfkhalid sfkhalid merged commit d912bdb into master Dec 8, 2020
@sfkhalid sfkhalid deleted the vpr_constraints_fixes branch December 8, 2020 14:52
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.

1 participant