Skip to content

klc-check S4.2: Handle regulators, check output placement, add tests

This should resolve a long-standing confusing issue about the S4.2 rule in the KLC (previously more of an unwritten guideline) that regulators have power pins on the side. Previously, the KLC checker went off for any regulator with power inputs on the left.

The S4.2 check is reworked so that it looks at pins based on their electrical type (i.e. power in or out), and then decides if the positive power inputs should be on the left or top, using the heuristic of if there are power outputs, the inputs go on the left.

This works pretty universally for linear regulators. There are some positives in the switching regulator lib, but this is mostly because many symbols don't mark their SW pins as power output, which is the more usual way more recently.

A set of tests both for passes and failures is added too (previously there were no KLC S4.2 rule tests at all).

Edited by John Beard

Merge request reports