Skip to main content

Stitching via visualization and manual forced neckdowns for KiCad

Project description

Breakneck: Via Stitching and Manual Neckdown for KiCad Layouts

Introduction

Via Stitching

Ground via stitching is a common technique to reduce EMI and improve signal integrity in PCB designs. It involves placing GND vias next to signal vias to provide a return signal path between reference ground planes and to minimize the loop area. This is important for any signal with a high edge rate; nowadays basically every digital signal in a design.

Breakneck visualizes stitching via requirements by drawing lines between signal vias and their closest GND vias if the nearest GND via is further away than a specified distance. The user can then manually place the GND vias to meet the requirements. The lines are drawn on the User.Eco2 layer which should not be used for any other purpose (any existing content on this layer will be overwritten).

The screenshot below shows a design with routed signals lacking stitching vias. The yellow lines indicate the signal vias missing a GND via within a distance of 2mm.

Stitching Vias

Manual Neckdown

NB: This kicad-python bug prevents manual neckdown from being properly used at the moment.

Neckdown, or its inverse, fanout, refers to narrowing down of PCB tracks and their clearances when routing tracks to fine-pitch components such as BGAs or QFNs. KiCad does not provide a built-in feature to automatically neckdown tracks, and while the KiCad Custom Rules are powerful, they do not support neckdowns. It is possible to define rules for tracks intersecting footprint courtyards, but the rule applies to the entire length of the track segment, not just the part that intersects the courtyard.

Breakneck is a Python script that communicates with KiCad and cuts tracks at a specified distance from the intersection with a footprint courtyard. After these track cuts, custom rules apply to the expected track segments. The layout isn't otherwise modified. Automatic re-healing of broken tracks is prevented by nudging the track widths by one nanometer, making adjacent tracks different widths.

Installation

As a prerequisite, install uv.

To run breakneck without actually installing it:

uvx breakneck <command> [options...]

This actually works really fast and the only downside is that you have to type uvx every time. If you want to install breakneck, run:

uv tool install breakneck

KiCad Configuration

The new KiCad IPC API lets you connect to an existing KiCad instance using Inter-Process Communication (IPC). The API is not enabled by default. To enable it, open the KiCad preferences and navigate to "Plugins" and check the "Enable KiCad API" checkbox.

Usage

NOTE: If you are running breakneck with uvx, prepend all breakneck commands below with uvx.

Run breakneck -h to see the available options.

breakneck gndvia draws stitching via lines on the User.Eco2 layer. The default distance is 2mm, but it can be changed with the --distance option.

It is possible to run breakneck gndvia repeatedly using watch to provide semi-real time updates while placing the GND vias:

watch -n 1 breakneck gndvia

NOTE: It turns out, every execution will bump the undo buffer, so until breakneck is made a bit smarter, it will become very difficult to undo any actual changes.

Breakneck has basic support for filtering the affected tracks and components by layer, netclass or selection.

Limitations

  • Component classes are not supported due to API limitations.
  • Grouped tracks and footprints are ignored due to API limitations. It is possible to enter a group and run breakneck --selection to process the group members.
  • Multiple ground layers are not supported in gndvia. If you have isolated board sections, you will have a lot of bogus lines to the closest regular GND via.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

breakneck-0.3.0.tar.gz (633.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

breakneck-0.3.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file breakneck-0.3.0.tar.gz.

File metadata

  • Download URL: breakneck-0.3.0.tar.gz
  • Upload date:
  • Size: 633.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.16

File hashes

Hashes for breakneck-0.3.0.tar.gz
Algorithm Hash digest
SHA256 208b8a380a34f479df1e42f4b13c7131d994cbba7b3a6ac1096f13760f39ea4d
MD5 cf4516f606159be4f5eda27d182f46c7
BLAKE2b-256 195c650d96ce625e0ce90b4275602c92a9640861279d529178abe1a3382b8a0c

See more details on using hashes here.

File details

Details for the file breakneck-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: breakneck-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.16

File hashes

Hashes for breakneck-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5ce9711f36cbc0a6968089be9351680718a7f8b7171a2011b86a06f460a38b
MD5 b5cd1868cac04fe5003cb4f50a76fd05
BLAKE2b-256 4b7b9726e9acdb5f3a974ee9f9d968d68d2ff80e50f5215b339d98c4487bdb62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page