Skip to content

Commit 5381f1d

Browse files
committed
ant: return violations when the function is used only for checking
Signed-off-by: luis201420 <[email protected]>
1 parent bd230ae commit 5381f1d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ant/src/AntennaChecker.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,9 @@ int AntennaChecker::checkGates(odb::dbNet* db_net,
884884
excess_ratio = std::max(violation_info.excess_ratio_PAR,
885885
violation_info.excess_ratio_PSR);
886886
}
887+
bool to_repair = (diode_mterm != nullptr);
887888
// while it has violation, increase iterm_diff_area
888-
if (diode_mterm) {
889+
if (to_repair) {
889890
while (par_violation || psr_violation) {
890891
// increasing iterm_diff_area and count
891892
violation_info.iterm_diff_area += diode_diff_area * gates.size();
@@ -934,8 +935,10 @@ int AntennaChecker::checkGates(odb::dbNet* db_net,
934935
diode_count_per_gate
935936
= std::max(0, diode_count_per_gate - num_diodes_added[gate]);
936937
num_diodes_added[gate] += diode_count_per_gate;
937-
// save antenna violation
938-
if (violated && diode_count_per_gate > 0) {
938+
// save antenna violation when there is violation and
939+
// if number of diodes is greater than 0 or
940+
// the function is not called to repair antennas
941+
if (violated && (diode_count_per_gate > 0 || !to_repair)) {
939942
antenna_violations.push_back({layer->getRoutingLevel(),
940943
gates_for_diode_insertion,
941944
diode_count_per_gate,

0 commit comments

Comments
 (0)