# Layer Switch Count

### Description

**Layer Switch Count** finds the number of times there is a layer switch in a trace path between two pins

**Passing Criteria:** \
This check passes if the number of vias on the path between a bypass capacitor and its associated pin is below a specified threshold.

**Reporting Units:** \
COUNT

### **Examples**

**Passing Message:**&#x20;

{% hint style="success" %}
Layer switch count of 0 within acceptable range (0 to 1)
{% endhint %}

**Failing Message:**&#x20;

{% hint style="danger" %}
Layer switch count of 2 outside acceptable range (0 to 1)
{% endhint %}

### Physics Justification

Layer switches on trace paths between pins introduce **parasitic inductance**, which:&#x20;

* **Reduces Filtering Effectiveness**&#x20;

  Parasitic inductance degrades the ability to respond to high-frequency noise.&#x20;
* **Increases Impedance**&#x20;

  Vias add impedance to the path, disrupting the low-impedance connection needed for proper **decoupling** in the case of bypass capacitors.&#x20;
* **Affects Power Stability**&#x20;

  Higher impedance and slower response times can cause voltage fluctuations at the pin, impacting the power integrity of the connected component.

#### Helpful Definitions

* **Parasitic Inductance**\
  The unintended inductance that arises from the magnetic field created by current flow and opposes changes in current, especially at high frequencies. It can degrade circuit performance by slowing responses and causing noise.
* **Decoupling**\
  The use of capacitors placed near pins to stabilize voltage and filter out noise on the power supply.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quilter.ai/physics-rule-checks-prcs/layer-switch-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
