Zigzag routing for differential signals

Hi all I am currently making a design with PCI-e gen 4 in it and it is recommended to do zigzag routing to mitigate the PCB fiber weave, an example can be seen in this TI app note https://www.ti.com/lit/an/spraar7i/spraar7i.pdf.

Is there any way to do this in KiCad?

This will be difficult in KiCad.
KiCad really likes to keep copper tracks horizontal, vertical and other multiples of 45 degrees.
It is possible to route under any angle with: PCB Editor / Route / Interactive Router Settings, and then use: Mode / Highlight collisions and Options / Free angle mode but disabling the interactive router is a big handicap in KiCad, and on top of that there are two other problems. This all angle routing does not work for differential pairs, and if you use the normal shove mode for routing other parts and you bump into some slanted tracks, they will revert into 45 degree mode unless you have locked them first.

In the last 10 minutes or so I experimented a bit with a workaround, and although it’s only a brief test, it does seem to work quite well. The idea is to:

  1. Draw PCB outline and do footprint placement.
  2. Rotate everything 15 degrees clockwise. ( Set PCB Editor / Preferences / Preferences / PCB Editor / Editing Options / Step for rotate commands to 15 degrees.)
  3. Do the routing.
  4. Rotate everything 15 degrees counter clockwise again.

PCB view during routing:

End result with PCB rotated back to “normal”:

KiCad is capable of working with rotated parts on the PCB and slanted lines on Edge.Cuts quite comfortably, and with this 2x rotation trick you can fool KiCad a bit.

A possible problem with this is that I’m not sure what the center of rotation is, and rotating stuff back may use another center of rotation, and doing so multiple times may drift all parts off some grid, It may also introduce rounding errors, especially when done repeatedly.
Therefore it probably is best to never rotate your PCB back to “normal”, except for generating gerber files. (So save PCB before making Gerbers, then make Gerbers, and exit the PCB Editor without saving to get the “original” rotated locations back for further revisions.)

Note that I only did a short test with this, and it would need some further investigation before committing to such a workflow.

2 Likes

First, welcome to the forum @GvaleurAGCO!

Kicad has the ability to route differential pairs with length matching and deskew. I doesn’t handle the zig-zap pattern shown in the app note directly that I am aware of. I have layed out interfaces in the 3 to 5 gigabit range with Kicad successfully. PCI-e gen 4 looks to be 16 gigabits, hence the weave concern.

If I where doing this, I would probably start by trying the following:

  1. Layout a zigzag template pattern of points on the one of the User.x layers.
  2. Route traces on a copper layer to my template points to make a copper zigzag trace template.
  3. Cut and paste this zigzag differential pair pattern across multiple channels
  4. Update the signal netlist names for the traces
  5. Complete the incoming and outgoing differential pair routing to the IC and connectors using the differential routing tool

(Note I have not tired this and others may think of a better way.)

I would also look to specify PCB material to my manufacture that targets very high speed signals in this frequency range.

This is a better idea!

The note for figure 2-1 includes this comment “The PCB manufacturer can effect this rotation without making changes to the PCB layout database.”

If you communicate with your board house your intentions of skewing the traces relative to the fiber weave of the panel, they may be able to rotate your board design the required number of degrees when panelizing your design onto the fabrication panel, or they may be able to offer a fabrication panel that already has the weave rotated. (I don’t know if this exists never having to do purchasing for a PCB fabrication house, but I imagine some manufacturers of the fabrication panel and pre-preg would see this as a value added feature for their products.) If the gerber gets rotated, you may end up paying a little more due to a slightly larger footprint taken up on the fabrication panel, but that should be mentioned in your communication with the board house.

1 Like

Thank you for the ideas, turning the entire PCB worked for me there was only a small amount of cleanup after some rounding errors

FR-4 problem? Are real RF PCB materials too expensive, or is there better FR-4 like PCB materials? Is there cross woven glass fibre PCB material?

Exotic materials really are far more expensive, niche suppliers and few fabs making them available. I suspect that the suppliers could not even make the quantities required if one of the larger motherboard brands wanted to use it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.