-
Notifications
You must be signed in to change notification settings - Fork 415
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
Vpr constraints fixes #1602
Conversation
|
||
auto atom_name_regex = std::regex(atom_name); | ||
|
||
std::vector<AtomBlockId> clear_atoms; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use atoms_.clear() instead
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment here
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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
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.