Repository: The-OpenROAD-Project/OpenROAD
Pull request #7232: tap: improve error message for autoselection of cells with more than one option
Author: login: eder-matheus
Created: 2025-04-28T18:01:52Z | Merged: 2025-04-29T17:51:58Z



Diff:
diff --git a/src/tap/include/tap/tapcell.h b/src/tap/include/tap/tapcell.h
index bdb2c8d6dfc..3de27b3ffcb 100644
--- a/src/tap/include/tap/tapcell.h
+++ b/src/tap/include/tap/tapcell.h
@@ -78,6 +78,7 @@ struct EndcapCellOptions
   odb::dbMaster* right_edge = nullptr;
 
   std::string prefix = "PHY_";
+  bool tapcell_cmd = false;
 };
 
 class Tapcell
@@ -219,7 +220,8 @@ class Tapcell
 
   EndcapCellOptions correctEndcapOptions(const Options& options) const;
 
-  odb::dbMaster* getMasterByType(const odb::dbMasterType& type) const;
+  odb::dbMaster* getMasterByType(const odb::dbMasterType& type,
+                                 const std::string& option_name) const;
   std::set<odb::dbMaster*> findMasterByType(
       const odb::dbMasterType& type) const;
   odb::dbBlock* getBlock() const;
diff --git a/src/tap/src/tapcell.cpp b/src/tap/src/tapcell.cpp
index 19a085f1cf5..39b8f8eedc4 100644
--- a/src/tap/src/tapcell.cpp
+++ b/src/tap/src/tapcell.cpp
@@ -1307,12 +1307,13 @@ EndcapCellOptions Tapcell::correctEndcapOptions(
 {
   EndcapCellOptions bopts = options;
 
-  auto set_single_master
-      = [this](odb::dbMaster*& master, const odb::dbMasterType& type) {
-          if (master == nullptr) {
-            master = getMasterByType(type);
-          }
-        };
+  auto set_single_master = [this](odb::dbMaster*& master,
+                                  const odb::dbMasterType& type,
+                                  const std::string& option_name) {
+    if (master == nullptr) {
+      master = getMasterByType(type, option_name);
+    }
+  };
 
   auto set_multiple_master = [this](std::vector<odb::dbMaster*>& masters,
                                     const odb::dbMasterType& type) {
@@ -1347,28 +1348,41 @@ EndcapCellOptions Tapcell::correctEndcapOptions(
     }
   };
 
+  const bool tapcell_cmd = options.tapcell_cmd;
+  set_single_master(bopts.left_edge,
+                    odb::dbMasterType::ENDCAP_LEF58_LEFTEDGE,
+                    tapcell_cmd ? "endcap_master" : "left_edge/-endcap");
+  set_single_master(bopts.right_edge,
+                    odb::dbMasterType::ENDCAP_LEF58_RIGHTEDGE,
+                    tapcell_cmd ? "endcap_master" : "right_edge/-endcap");
+  set_multiple_master(bopts.top_edge, odb::dbMasterType::ENDCAP_LEF58_TOPEDGE);
+  set_multiple_master(bopts.bottom_edge,
+                      odb::dbMasterType::ENDCAP_LEF58_BOTTOMEDGE);
   set_single_master(bopts.right_top_corner,
-                    odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPCORNER);
+                    odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPCORNER,
+                    tapcell_cmd ? "cnrcap_nwout_master" : "right_top_corner");
   set_single_master(bopts.left_top_corner,
-                    odb::dbMasterType::ENDCAP_LEF58_LEFTTOPCORNER);
+                    odb::dbMasterType::ENDCAP_LEF58_LEFTTOPCORNER,
+                    tapcell_cmd ? "cnrcap_nwout_master" : "left_top_corner");
   set_single_master(bopts.right_bottom_corner,
-                    odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMCORNER);
+                    odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMCORNER,
+                    tapcell_cmd ? "cnrcap_nwin_master" : "right_bottom_corner");
   set_single_master(bopts.left_bottom_corner,
-                    odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMCORNER);
+                    odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMCORNER,
+                    tapcell_cmd ? "cnrcap_nwin_master" : "left_bottom_corner");
   set_single_master(bopts.right_top_edge,
-                    odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPEDGE);
+                    odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPEDGE,
+                    tapcell_cmd ? "incnrcap_nwin_master" : "right_top_edge");
   set_single_master(bopts.left_top_edge,
-                    odb::dbMasterType::ENDCAP_LEF58_LEFTTOPEDGE);
-  set_single_master(bopts.right_bottom_edge,
-                    odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMEDGE);
+                    odb::dbMasterType::ENDCAP_LEF58_LEFTTOPEDGE,
+                    tapcell_cmd ? "incnrcap_nwin_master" : "left_top_edge");
+  set_single_master(
+      bopts.right_bottom_edge,
+      odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMEDGE,
+      tapcell_cmd ? "incnrcap_nwout_master" : "right_bottom_edge");
   set_single_master(bopts.left_bottom_edge,
-                    odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMEDGE);
-  set_single_master(bopts.left_edge, odb::dbMasterType::ENDCAP_LEF58_LEFTEDGE);
-  set_single_master(bopts.right_edge,
-                    odb::dbMasterType::ENDCAP_LEF58_RIGHTEDGE);
-  set_multiple_master(bopts.top_edge, odb::dbMasterType::ENDCAP_LEF58_TOPEDGE);
-  set_multiple_master(bopts.bottom_edge,
-                      odb::dbMasterType::ENDCAP_LEF58_BOTTOMEDGE);
+                    odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMEDGE,
+                    tapcell_cmd ? "incnrcap_nwout_master" : "left_bottom_edge");
 
   set_corner_master(bopts.right_top_corner,
                     bopts.left_top_corner,
@@ -1395,15 +1409,23 @@ EndcapCellOptions Tapcell::correctEndcapOptions(
   return bopts;
 }
 
-odb::dbMaster* Tapcell::getMasterByType(const odb::dbMasterType& type) const
+odb::dbMaster* Tapcell::getMasterByType(const odb::dbMasterType& type,
+                                        const std::string& option_name) const
 {
   const std::set<odb::dbMaster*> masters = findMasterByType(type);
 
   if (masters.size() > 1) {
+    std::string masters_names;
+    for (odb::dbMaster* master : masters) {
+      masters_names += " " + master->getName();
+    }
     logger_->error(utl::TAP,
                    104,
-                   "Unable to find a single master for {}",
-                   type.getString());
+                   "Found multiple masters for {}. Use -{} "
+                   "to specify one of the following cells: {}",
+                   type.getString(),
+                   option_name,
+                   masters_names);
   }
   if (masters.empty()) {
     return nullptr;
@@ -1461,6 +1483,7 @@ EndcapCellOptions Tapcell::correctEndcapOptions(const Options& options) const
   bopts.left_bottom_edge = options.incnrcap_nwout_master;
   bopts.right_top_edge = options.incnrcap_nwin_master;
   bopts.right_bottom_edge = options.incnrcap_nwout_master;
+  bopts.tapcell_cmd = true;
 
   return bopts;
 }
diff --git a/src/tap/src/tapcell.i b/src/tap/src/tapcell.i
index b21b3ff2d96..810dc6e2ce2 100644
--- a/src/tap/src/tapcell.i
+++ b/src/tap/src/tapcell.i
@@ -138,6 +138,7 @@
     options.left_edge = left_edge;
     options.right_edge = right_edge;
     options.prefix = prefix;
+    options.tapcell_cmd = false;
 
     getTapcell()->placeEndcaps(options);
   }
diff --git a/src/tap/test/CMakeLists.txt b/src/tap/test/CMakeLists.txt
index 242776db8a5..bc8f05452a2 100644
--- a/src/tap/test/CMakeLists.txt
+++ b/src/tap/test/CMakeLists.txt
@@ -13,6 +13,10 @@ or_integration_tests(
     cut_rows_with_endcaps
     disallow_one_site_gaps
     disallow_one_site_gaps2
+    endcap_autoselection_error1
+    endcap_autoselection_error2
+    endcap_autoselection_error3
+    endcap_autoselection_error4
     gcd_asap7
     gcd_fakeram
     gcd_nangate45
diff --git a/src/tap/test/endcap_autoselection_error1.ok b/src/tap/test/endcap_autoselection_error1.ok
new file mode 100644
index 00000000000..51134c2f998
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error1.ok
@@ -0,0 +1,10 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[INFO ODB-0303] The initial 479 rows (2081802 sites) were cut with 5 shapes for a total of 699 rows (2014702 sites).
+[ERROR TAP-0104] Found multiple masters for ENDCAP RIGHTEDGE. Use -endcap_master to specify one of the following cells:  ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE
+TAP-0104
diff --git a/src/tap/test/endcap_autoselection_error1.tcl b/src/tap/test/endcap_autoselection_error1.tcl
new file mode 100644
index 00000000000..5d2bcc81b89
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error1.tcl
@@ -0,0 +1,24 @@
+source "helpers.tcl"
+read_lef Nangate45/Nangate45_tech.lef
+read_lef Nangate45/Nangate45_stdcell.lef
+read_lef Nangate45_data/endcaps.lef
+read_lef Nangate45_data/endcaps_symmetric.lef
+read_lef Nangate45/fakeram45_64x7.lef
+read_def Nangate45_data/macros.def
+
+set def_file [make_result_file boundary_macros_tapcell.def]
+
+catch {tapcell -distance "20" \
+       -tapcell_master "TAPCELL_X1" \
+       -tap_nwin2_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwin3_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwout2_master "ENDCAP_X1_BOTTOMEDGE" \
+       -tap_nwout3_master "ENDCAP_X1_BOTTOMEDGE" \
+       -tap_nwintie_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwouttie_master "ENDCAP_X1_BOTTOMEDGE" \
+       -cnrcap_nwin_master "ENDCAP_X4_LEFTBOTTOMCORNER_Y" \
+       -cnrcap_nwout_master "ENDCAP_X4_LEFTTOPCORNER_Y" \
+       -incnrcap_nwin_master "ENDCAP_X4_LEFTTOPEDGE_Y" \
+       -incnrcap_nwout_master "ENDCAP_X4_LEFTBOTTOMEDGE_Y"} error
+
+puts $error
\ No newline at end of file
diff --git a/src/tap/test/endcap_autoselection_error2.ok b/src/tap/test/endcap_autoselection_error2.ok
new file mode 100644
index 00000000000..58122d340e6
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error2.ok
@@ -0,0 +1,9 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[ERROR TAP-0104] Found multiple masters for ENDCAP RIGHTEDGE. Use -right_edge/-endcap to specify one of the following cells:  ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE
+TAP-0104
diff --git a/src/tap/test/endcap_autoselection_error2.tcl b/src/tap/test/endcap_autoselection_error2.tcl
new file mode 100644
index 00000000000..02a85483bde
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error2.tcl
@@ -0,0 +1,13 @@
+source "helpers.tcl"
+read_lef Nangate45/Nangate45_tech.lef
+read_lef Nangate45/Nangate45_stdcell.lef
+read_lef Nangate45_data/endcaps.lef
+read_lef Nangate45_data/endcaps_symmetric.lef
+read_lef Nangate45/fakeram45_64x7.lef
+read_def Nangate45_data/macros.def
+
+set def_file [make_result_file boundary_macros_tapcell.def]
+
+catch {place_endcaps} error
+
+puts $error
\ No newline at end of file
diff --git a/src/tap/test/endcap_autoselection_error3.ok b/src/tap/test/endcap_autoselection_error3.ok
new file mode 100644
index 00000000000..0f0300046f0
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error3.ok
@@ -0,0 +1,9 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[ERROR TAP-0104] Found multiple masters for ENDCAP LEFTTOPCORNER. Use -left_top_corner to specify one of the following cells:  ENDCAP_X4_LEFTTOPCORNER_Y ENDCAP_X4_LEFTTOPCORNER
+TAP-0104
diff --git a/src/tap/test/endcap_autoselection_error3.tcl b/src/tap/test/endcap_autoselection_error3.tcl
new file mode 100644
index 00000000000..eac893e7367
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error3.tcl
@@ -0,0 +1,13 @@
+source "helpers.tcl"
+read_lef Nangate45/Nangate45_tech.lef
+read_lef Nangate45/Nangate45_stdcell.lef
+read_lef Nangate45_data/endcaps.lef
+read_lef Nangate45_data/endcaps_symmetric.lef
+read_lef Nangate45/fakeram45_64x7.lef
+read_def Nangate45_data/macros.def
+
+set def_file [make_result_file boundary_macros_tapcell.def]
+
+catch {place_endcaps -endcap "ENDCAP_X4_RIGHTEDGE_Y"} error
+
+puts $error
\ No newline at end of file
diff --git a/src/tap/test/endcap_autoselection_error4.ok b/src/tap/test/endcap_autoselection_error4.ok
new file mode 100644
index 00000000000..f8bd5279034
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error4.ok
@@ -0,0 +1,10 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[INFO ODB-0303] The initial 479 rows (2081802 sites) were cut with 5 shapes for a total of 699 rows (2014702 sites).
+[ERROR TAP-0104] Found multiple masters for ENDCAP LEFTTOPCORNER. Use -cnrcap_nwout_master to specify one of the following cells:  ENDCAP_X4_LEFTTOPCORNER_Y ENDCAP_X4_LEFTTOPCORNER
+TAP-0104
diff --git a/src/tap/test/endcap_autoselection_error4.tcl b/src/tap/test/endcap_autoselection_error4.tcl
new file mode 100644
index 00000000000..126d9dad0ed
--- /dev/null
+++ b/src/tap/test/endcap_autoselection_error4.tcl
@@ -0,0 +1,21 @@
+source "helpers.tcl"
+read_lef Nangate45/Nangate45_tech.lef
+read_lef Nangate45/Nangate45_stdcell.lef
+read_lef Nangate45_data/endcaps.lef
+read_lef Nangate45_data/endcaps_symmetric.lef
+read_lef Nangate45/fakeram45_64x7.lef
+read_def Nangate45_data/macros.def
+
+set def_file [make_result_file boundary_macros_tapcell.def]
+
+catch {tapcell -distance "20" \
+       -tapcell_master "TAPCELL_X1" \
+       -endcap_master "ENDCAP_X4_RIGHTEDGE_Y" \
+       -tap_nwin2_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwin3_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwout2_master "ENDCAP_X1_BOTTOMEDGE" \
+       -tap_nwout3_master "ENDCAP_X1_BOTTOMEDGE" \
+       -tap_nwintie_master "ENDCAP_X1_TOPEDGE" \
+       -tap_nwouttie_master "ENDCAP_X1_BOTTOMEDGE"} error
+
+puts $error
\ No newline at end of file


Reviews:
user: login: eder-matheus
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T18:02:46Z
user: login: jeffng-or
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T18:11:39Z
user: login: eder-matheus
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T18:55:42Z
user: login: eder-matheus
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-28T19:25:03Z
user: login: github-actions[bot]
body: clang-tidy made some suggestions
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T19:27:29Z
user: login: precisionmoon
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-29T17:51:49Z

Review comments:
diff_hunk: @@ -0,0 +1,10 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[INFO ODB-0303] The initial 479 rows (2081802 sites) were cut with 5 shapes for a total of 699 rows (2014702 sites).
+[ERROR TAP-0104] Unable to find a single master for ENDCAP RIGHTEDGE. Choose one between the following cells: ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE.
path: src/tap/test/endcap_autoselection_error1.ok
user: login: eder-matheus
body: @jeffng-or This is an example of how the new error message would look. Do you have any comments/suggestions/requests regarding this message?
created_at: 2025-04-28T18:02:46Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,10 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[INFO ODB-0303] The initial 479 rows (2081802 sites) were cut with 5 shapes for a total of 699 rows (2014702 sites).
+[ERROR TAP-0104] Unable to find a single master for ENDCAP RIGHTEDGE. Choose one between the following cells: ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE.
path: src/tap/test/endcap_autoselection_error1.ok
user: login: jeffng-or
body: How about "Found multiple masters for ENDCAP RIGHTEDGE. Use -whatever_the_option_is to specify one of the following cells: ..."?

That way, the message more accurately describes the situation and we are directing the user on how to fix it. The only issue might be that the check is in a central spot and we might not know which of the two commands was used (e.g. tapcell or place_endcaps)
created_at: 2025-04-28T18:11:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,10 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[INFO ODB-0303] The initial 479 rows (2081802 sites) were cut with 5 shapes for a total of 699 rows (2014702 sites).
+[ERROR TAP-0104] Unable to find a single master for ENDCAP RIGHTEDGE. Choose one between the following cells: ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE.
path: src/tap/test/endcap_autoselection_error1.ok
user: login: eder-matheus
body: I found that detecting which of the two commands was used is not the only issue. Which option inside each command is hard too, because the option names don't match between `tapcell` and `place_endcaps`.

Making them match is a project itself, since it would require changes in both OR and ORFS.
created_at: 2025-04-28T18:55:42Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,9 @@
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_tech.lef, created 22 layers, 27 vias
+[INFO ODB-0227] LEF file: Nangate45/Nangate45_stdcell.lef, created 135 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps.lef, created 13 library cells
+[INFO ODB-0227] LEF file: Nangate45_data/endcaps_symmetric.lef, created 5 library cells
+[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
+[INFO ODB-0128] Design: gcd
+[INFO ODB-0131]     Created 5 components and 160 component-terminals.
+[ERROR TAP-0104] Found multiple masters for ENDCAP RIGHTEDGE. Use -right_edge/-endcap to specify one of the following cells:  ENDCAP_X4_RIGHTEDGE_Y ENDCAP_X4_RIGHTEDGE
path: src/tap/test/endcap_autoselection_error2.ok
user: login: eder-matheus
body: @jeffng-or I was able to implement a solution to add the command and the option in the message.
created_at: 2025-04-28T19:25:02Z
author_association: MEMBER
diff_hunk: @@ -1307,12 +1307,13 @@ EndcapCellOptions Tapcell::correctEndcapOptions(
 {
   EndcapCellOptions bopts = options;
 
-  auto set_single_master
-      = [this](odb::dbMaster*& master, const odb::dbMasterType& type) {
-          if (master == nullptr) {
-            master = getMasterByType(type);
-          }
-        };
+  auto set_single_master = [this](odb::dbMaster*& master,
+                                  const odb::dbMasterType& type,
+                                  const std::string option_name) {
path: src/tap/src/tapcell.cpp
user: login: github-actions[bot]
body: warning: the const qualified parameter 'option_name' is copied for each invocation; consider making it a reference [[performance-unnecessary-value-param](https://clang.llvm.org/extra/clang-tidy/checks/performance/unnecessary-value-param.html)]

```suggestion
                                  const std::string& option_name) {
```

created_at: 2025-04-28T19:27:29Z
author_association: CONTRIBUTOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-04-28T18:07:07Z
body: clang-tidy review says "All clean, LGTM! :+1:"
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-04-28T19:39:51Z
body: clang-tidy review says "All clean, LGTM! :+1:"
author_association: CONTRIBUTOR