← Back to team overview

kicad-developers team mailing list archive

PNS diferential pair netnames update

 

A few years ago, I've made some projects with netnames ended with -MINUS/-PLUS,
so now I've made some patch, which expands namespace of differential pairs PNS
router, to enjoy new feature on redesign old projects.
Please apply, if you like.
--
Best Regards,
LordBlick
--- pcbnew/router/pns_meander_skew_placer.cpp.orig	2015-06-27 17:39:47.000000000 +0200
+++ pcbnew/router/pns_meander_skew_placer.cpp	2015-06-27 23:59:13.626185366 +0200
@@ -74,7 +74,7 @@
     {
         Router()->SetFailureReason( _( "Unable to find complementary differential pair "
                                        "net for skew tuning. Make sure the names of the nets belonging "
-                                       "to a differential pair end with either _N/_P or +/-." ) );
+                                       "to a differential pair end with either _N/_P or +/- or -MINUS/-PLUS." ) );
         return false;
     }
 
--- pcbnew/router/pns_diff_pair_placer.cpp.orig	2015-06-27 17:39:47.000000000 +0200
+++ pcbnew/router/pns_diff_pair_placer.cpp	2015-06-27 23:59:13.626185366 +0200
@@ -422,6 +422,11 @@
         aComplementNet = "_N";
         rv = 1;
     }
+    else if( aNetName.EndsWith( "-PLUS" ) )
+    {
+        aComplementNet = "-MINUS";
+        rv = 1;
+    }
     else if( aNetName.EndsWith( "-" ) )
     {
         aComplementNet = "+";
@@ -432,6 +437,11 @@
         aComplementNet = "_P";
         rv = -1;
     }
+    else if( aNetName.EndsWith( "-MINUS" ) )
+    {
+        aComplementNet = "-PLUS";
+        rv = -1;
+    }
 
     if( rv != 0 )
     {
--- pcbnew/router/pns_dp_meander_placer.cpp.orig	2015-06-27 17:39:47.000000000 +0200
+++ pcbnew/router/pns_dp_meander_placer.cpp	2015-06-27 23:59:13.626185366 +0200
@@ -94,7 +94,7 @@
     {
         Router()->SetFailureReason( _( "Unable to find complementary differential pair "
                                        "net for length tuning. Make sure the names of the nets belonging "
-                                       "to a differential pair end with either _N/_P or +/-." ) );
+                                       "to a differential pair end with either _N/_P or +/- or -MINUS/-PLUS." ) );
         return false;
     }
 
--- pcbnew/router/pns_topology.cpp.orig	2015-06-27 17:39:47.000000000 +0200
+++ pcbnew/router/pns_topology.cpp	2015-06-27 23:59:13.629518635 +0200
@@ -266,6 +266,10 @@
         aComplementNet = "_N";
         rv = 1;
     }
+    else if( aNetName.EndsWith( "-PLUS" ) )
+    {
+        aComplementNet = "-MINUS";
+        rv = 1;
     else if( aNetName.EndsWith( "-" ) )
     {
         aComplementNet = "+";
@@ -276,6 +280,11 @@
         aComplementNet = "_P";
         rv = -1;
     }
+    else if( aNetName.EndsWith( "-MINUS" ) )
+    {
+        aComplementNet = "-PLUS";
+        rv = -1;
+    }
 
     if( rv != 0 )
     {

Follow ups