[core] fixed a bug in repacker to avoid routing constrained nets
This commit is contained in:
parent
758cc7a089
commit
cab7e04901
|
@ -69,6 +69,17 @@ std::string RepackDesignConstraints::find_constrained_pin_net(
|
|||
return constrained_net_name;
|
||||
}
|
||||
|
||||
openfpga::BasicPort RepackDesignConstraints::net_pin(const std::string& net) const {
|
||||
openfpga::BasicPort constrained_pin;
|
||||
for (const RepackDesignConstraintId& design_constraint : design_constraints()) {
|
||||
if (net == repack_design_constraint_nets_[design_constraint]) {
|
||||
constrained_pin = pin(design_constraint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return constrained_pin;
|
||||
}
|
||||
|
||||
bool RepackDesignConstraints::empty() const {
|
||||
return 0 == repack_design_constraint_ids_.size();
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ class RepackDesignConstraints {
|
|||
/* Find a constrained net */
|
||||
std::string find_constrained_pin_net(const std::string& pb_type,
|
||||
const openfpga::BasicPort& pin) const;
|
||||
/* Find the port to which a net is constrained to */
|
||||
openfpga::BasicPort net_pin(const std::string& net) const;
|
||||
|
||||
/* Check if there are any design constraints */
|
||||
bool empty() const;
|
||||
|
|
|
@ -614,8 +614,8 @@ static void add_lb_router_nets(
|
|||
} else if (design_constraints.unconstrained_net(constrained_net_name)) {
|
||||
constrained_atom_net_id = atom_net_id;
|
||||
/* Skip for the net which has been constrained on other pins */
|
||||
if (atom_net_id && !design_constraints.unconstrained_net(
|
||||
atom_ctx.nlist.net_name(atom_net_id))) {
|
||||
if (atom_net_id && design_constraints.net_pin(
|
||||
atom_ctx.nlist.net_name(atom_net_id)).is_valid()) {
|
||||
VTR_LOGV(verbose,
|
||||
"Skip net '%s' on pin '%s[%d]' during repacking since it has "
|
||||
"been constrained to another pin\n",
|
||||
|
|
Loading…
Reference in New Issue