← Back to team overview

kicad-developers team mailing list archive

Re: PNS diferential pair netnames update

 

In response to a message written on 28.06.2015, 00:14, from LordBlick:
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.
My nightly mistake, one line was broken, new, tested patch version in attachment.

--
Best Regards,
LordBlick
--- pcbnew/router/pns_meander_skew_placer.cpp.orig	2015-06-28 00:20:07.000000000 +0200
+++ pcbnew/router/pns_meander_skew_placer.cpp	2015-06-28 00:48:15.397799054 +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-28 00:20:07.000000000 +0200
+++ pcbnew/router/pns_diff_pair_placer.cpp	2015-06-28 00:48:15.401132346 +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-28 00:20:07.000000000 +0200
+++ pcbnew/router/pns_dp_meander_placer.cpp	2015-06-28 00:48:15.401132346 +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-28 00:20:07.000000000 +0200
+++ pcbnew/router/pns_topology.cpp	2015-06-28 00:48:15.404465638 +0200
@@ -266,6 +266,11 @@
         aComplementNet = "_N";
         rv = 1;
     }
+    else if( aNetName.EndsWith( "-PLUS" ) )
+    {
+        aComplementNet = "-MINUS";
+        rv = 1;
+    }
     else if( aNetName.EndsWith( "-" ) )
     {
         aComplementNet = "+";
@@ -276,6 +281,11 @@
         aComplementNet = "_P";
         rv = -1;
     }
+    else if( aNetName.EndsWith( "-MINUS" ) )
+    {
+        aComplementNet = "-PLUS";
+        rv = -1;
+    }
 
     if( rv != 0 )
     {

Follow ups

References