askvity

How do I set differential pairs in Altium?

Published in Altium Differential Pairs 4 mins read

Setting up differential pairs in Altium involves defining the nets as a differential pair in the schematic and then configuring the routing rules in the PCB editor. Here's a breakdown of the process:

1. Defining Differential Pairs in the Schematic:

  • Net Names: Ensure your positive and negative nets have similar names with a differentiating suffix, typically _P and _N or + and -. For example, D_USB_DP and D_USB_DN. This naming convention helps Altium automatically recognize them as a pair.

  • Using Differential Pair Directives: Altium Designer allows you to explicitly define differential pairs using directives. You can place a DifferentialPair directive on the nets in your schematic. This ensures that Altium recognizes the intended pairing.

2. Configuring Routing Rules in the PCB Editor:

  • Creating a Differential Pair Routing Rule: In the PCB editor, navigate to Design > Rules. Under the Routing category, create a new rule of type Differential Pairs Routing.

  • Rule Scope (Where the rule applies): The most important part of the rule definition is the Where To Apply section. Use a query to target the specific differential pairs. Common queries include:

    • InDifferentialPairClass('YourDifferentialPairClassName') - If you have defined a differential pair class.
    • Net = 'D_USB_DP' Or Net = 'D_USB_DN' - Targeting specific net names (less ideal for multiple pairs).
    • IsDifferentialPair - Targets all nets that are part of a differential pair (requires correct naming conventions or directives).
  • Rule Constraints: In the Constraints section of the rule, define the following key parameters:

    • Width: Specify the trace width for each conductor in the differential pair.

    • Gap: Define the spacing between the positive and negative traces. This gap is crucial for controlling the impedance of the differential pair.

    • Tolerance: Set tolerances for width and gap to allow for manufacturing variations.

    • Min/Max Allowed Impedance: (Optional but highly recommended) Set the target impedance for the differential pair (e.g., 100 Ohms for USB) and the allowable tolerance. Altium will attempt to calculate the required width and gap to achieve the target impedance based on your layer stackup. Note: Altium's impedance calculator is relatively basic; it's always recommended to use more specialized impedance calculation software for critical designs.

  • Layer Stackup: Ensure your layer stackup is defined correctly, as the dielectric constant and trace height influence the impedance of the differential pair.

3. Routing the Differential Pairs:

  • Interactive Differential Pair Routing: Use the interactive routing tool (Route > Interactive Differential Pair Routing). Select one of the nets in the pair, and Altium will route both traces simultaneously, maintaining the defined width and gap.

  • Keep the Pair Together: Strive to keep the differential pair as close as possible throughout the route to maintain signal integrity. Avoid unnecessary stubs or abrupt changes in geometry.

  • Minimize Vias: Vias introduce impedance discontinuities. Minimize the number of vias in the differential pair route. When vias are necessary, use matched vias for both traces in the pair to minimize skew.

4. ECO (Engineering Change Order) Generation:

  • As the provided reference states, the ECO generation tab in the modifications is associated with net changes. This is relevant when you make changes to net names or connections in the schematic, and then push those changes to the PCB layout. An ECO will be generated to update the PCB accordingly, ensuring the differential pair definitions are maintained.

Example Scenario:

Let's say you are routing a USB differential pair named USB_D_P and USB_D_N.

  1. Schematic: Name the nets USB_D_P and USB_D_N. Optionally, place a DifferentialPair directive on them.
  2. PCB Rules: Create a Differential Pairs Routing rule. Set the Where To Apply query to Net = 'USB_D_P' Or Net = 'USB_D_N'.
  3. Rule Constraints: Set the width to 0.15mm, the gap to 0.2mm, and the target impedance to 90 Ohms (adjust based on your specific requirements and layer stackup).
  4. Routing: Use Interactive Differential Pair Routing to route the pair from the USB connector to the USB controller.

By following these steps, you can effectively set up and route differential pairs in Altium, ensuring optimal signal integrity for your high-speed designs.

Related Articles