# Crystal Oscillators

This constraint is designed to position oscillators near their drivers, minimizing phase noise and startup problems.

### Automatic Detection

Crystal oscillators are automatically detected if they meet the following criteria:

* A crystal oscillator component with a reference designator begins with an `X` or `Y`&#x20;
* Both pins of the crystal oscillator are directly connected to the same parent component or driver.

{% hint style="warning" %}
**Load-limiting Resistors**\
This constraint currently does not detect or function on crystals with load-limiting resistors
{% endhint %}

### Constraint Details

<figure><img src="/files/4gMpainRI15Hrc71RCkt" alt=""><figcaption></figcaption></figure>

Set up crystal oscillator constraints in the "Crystal Oscillators" section of Circuit Comprehension.&#x20;

To add a crystal oscillator constraint, enter the following information:

* Crystal (reference designator)
* Parent component
* Parent pin 1
* Parent pin 2

If Quilter did not automatically detect your Crystal Oscillator, you can add it manually by pressing the `Add` button.&#x20;

### Physics Rule Checks

The PRCs that validate this constraint after compile are:

**Pin Distance** calculates the Euclidian distance between the closest edges of two pins.

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

**Trace Path Length** calculates the trace length between two pins of interest.

**Ground Plane Overlap** determines if the ground plane below net traces overlaps at all relevant points.


---

# 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-constraints/crystal-oscillators.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.
