Skip to content

JITX Quickstart 4: Autoroute and Layout

Before Starting

You should have built the design from Tutorial: Build circuits with code.

You can follow along with this tutorial in the video above. Below is a transcript to make the code and text easier to read.

Introduction

This guide covers the basic functions for layout and routing in JITX. You’ll learn how to set up board constraints, place components, and create efficient routing strategies for your PCB design. Topics include:

  • Adding mechanical constraints
  • Adding copper pours
  • Fanning out components
  • Using an autorouter and modifying autorouted traces

Resources


1. Board Setup

1.1 Mechanical Constraints

The board shape defines your PCB outline and can be modified to match mechanical requirements.

val board-shape = RoundedRectangle(30.0, 18.5, 0.25)
val board-shape = RoundedRectangle(100.0, 70.0, 3.0)
  • The first two parameters set width and height (in millimeters).
  • The last parameter sets the corner radius.
  • You can use any valid shape, including imported mechanical constraints from CAD via IDF EMN.

Shapes Reference

1.2 Component Placement Constraints 1:00

Make the usb-if instance public so it can be accessed from other modules:

inst usb-if : connectors/components/USB/USBTypeC/USBC-HighSpeed-Iface()
public inst usb-if : connectors/components/USB/USBTypeC/USBC-HighSpeed-Iface()

Place usb-if.USBC.J in the top-level module:

pcb-module top-level :
  inst core : communications-core
pcb-module top-level :
  inst core : communications-core
  place(core.usb-if.USBC.J) at loc(10.0, -30.5) on Top
  • Use place to fix component locations.
  • Components with placement constraints cannot be moved in the UI.
  • Useful for aligning to mechanical features.
  • Access component names by selecting and pressing e.

Place Statement

1.3 Board-Level Pours 1:45

Create power and ground planes using copper pours:

  1. Make power/ground nets public:

    ; Under pcb-module communications-core
    net VBUS (ctl.VDD-USB.V+)
    net P3V3 (ctl.rail-3v3.V+)
    net GND (ctl.rail-3v3.V-)
    
    ; Under pcb-module communications-core
    net VBUS (ctl.VDD-USB.V+)
    public net P3V3 (ctl.rail-3v3.V+)
    public net GND (ctl.rail-3v3.V-)
    
  2. Add copper pours with a geom statement:

    pcb-module top-level :
      inst core : communications-core
      place(core.usb-if.USBC.J) at loc(10.0, -30.5) on Top
    
    pcb-module top-level :
      inst core : communications-core
      place(core.usb-if.USBC.J) at loc(10.0, -30.5) on Top
      geom(core.GND):
        copper-pour(LayerIndex(1), isolate = 0.125, rank = 1) = board-shape
        copper-pour(LayerIndex(2), isolate = 0.125, rank = 1) = board-shape
      geom(core.P3V3) :
        copper-pour(LayerIndex(3), isolate = 0.125, rank = 1) = board-shape
    
  3. isolate sets clearance from other copper.

  4. rank determines pour priority (higher numbers override lower).
  5. Pours can be placed on any layer.
  6. Shapes can match the board outline or be custom-defined.

geom Statement

2. Selection and Movement Tools 3:34

Pop Out the Board View

Press the pop-out button on the Board View Toolbar to open the board view in a stand-alone window.

2.1 Basic Selection Commands

  • a: Select all pads on the same net
    • Useful for identifying connected components
    • Can be combined with other selection tools
  • r: Rotate counter-clockwise
  • Shift + r: Rotate clockwise
  • f: Flip to the opposite side of the board
  • u: Select parent module
    • Press multiple times to climb up hierarchical groups
    • Moves larger functional blocks together

2.2 Advanced Selection

  • Shift + drag: Add to selection
  • Ctrl + drag: Subtract from selection
  • Ctrl + Shift + drag: Intersect selection
    • Useful for refining large selections
    • Example: Select all ground pads, then intersect to isolate FTDI ground pads

2.3 Select from schematic

  • Double click a symbol: Symbol is selected on the board
  • Shift + Double click multiple symbols: All symbols are also selected on the board

Selecting Board Elements
Transforms


3. Component Fanout

3.1 Quick Auto Via (Shift + V)

  1. Select pads that need vias.
  2. Press Shift + V to auto-create vias.
    • Automatically connects pads to specified layers.
    • Vias move with their parent components.
    • Great for connecting ground pads to planes.

3.2 Command-Based Via Fanout

  1. Select pads you want to fan out.
  2. Open Command (press `) and type:
    auto-via 180 0.1
    
  3. Vias appear with the specified offset/angle.

3.3 Differential Pairs

  1. Select related pads.
  2. Press Shift + i to add insertion points.
  3. Creates transition points from single-ended to differential pairs.
  4. These transition points also move with the component.
  5. Helps maintain correct differential pair spacing.

Auto Pair Insertion


4. Routing 5:16

4.1 Auto-routing

  1. Press q: Autoroute selected pads or insertion points.
    • Automatically generates routing paths.
    • Routes recalculate when components move.
    • Respects DFM, electrical, and SI constraints.

4.2 Manual Routing and Editing

  1. Shift + q: Enter manual routing mode to draw/edit segments.
  2. Path Redraw:
    • Click an existing route to begin redrawing.
    • Sketch the desired path.
    • Reconnect to the original route.
    • The route automatically updates.
  3. Add Control Points:
    • While routing, hold 2 + click a route to add a pivot (control) point.
    • Forces the route to pass through that point.
    • Useful for shaping trace exits or custom angles.

Control Point Mode

4.3 Route Adjustments

  • Select a route to modify:
    • Adjust trace width (see TraceWidthIcon)
    • Change clearance
    • Reassign layers
    • Convert to adaptive traces for power routing

Edit Bar
Trace Width and Clearance


5. Layer Management 9:54

By default, you can only select objects on the active layer. Click a layer in the layer stack to activate it; the active layer is highlighted. You can create or modify routes only on the active layer.

5.1 Layer Navigation

- **w**: Move up the layer stack
- **s**: Move down the layer stack
- **Shift + w**: Jump to top copper layer
- **Shift + s**: Jump to bottom copper layer
- Click a layer in the stack to activate it
- You can show/hide multiple layers

Layer Table UI

5.2 Layer-specific Features

  1. Copper Layers:

    • Only the active layer is selectable
    • Routing is restricted to the active layer
    • Layer visibility can be toggled
    • Per-layer rules are possible
  2. Silkscreen and Labels:

    • Shift + l: Auto-place reference labels
    • Select the silkscreen layer to move reference designators
    • Adjust label sizes, fonts, or styles in the code

6. Component Organization

6.1 Alignment Tools

Use a custom command for alignment:

align first

  • Aligns subsequent selections to the first selected object
  • Useful for consistent spacing

Bind this to a hotkey:

bind b align first
align

6.2 Distribute Tools

Distribute is available from the edit bar, and will equally space components along the axis that produces the largest separation of center points.

distribute


7. Short Trace Guidance

The teal rat lines show which bypass capacitors or resistors connect to which pins. Move your bypass capacitors so that these lines are as short as possible.

Read more on short-trace


8. Practical Tips

8.1 Use Multiple Windows

  • Keep schematic and board views open in separate windows.
  • Use cross-probing to select a part in the schematic and locate it on the board.
  • Arrange windows to see both simultaneously.

8.2 Organized Workflow

  1. Place major components first.
  2. Add fanout for complex parts (like BGAs).
  3. Route critical signals (high-speed or sensitive lines).
  4. Complete power and ground connections.
  5. Fine-tune trace widths and clearances.

9. Common Operations Reference

Operation Command Description
Auto Via Shift + v Create connected vias automatically
Auto Route q Route selected objects with the auto-router
Manual Route Shift + q Enter manual routing mode for custom paths
Layer Up w Move up one layer in the stack
Layer Down s Move down one layer in the stack
Flip f Flip component to the opposite side
Select All on Net a Select all pads on the same net
Parent Select u Select parent module (repeatable)
Auto Label Shift + l Automatically place reference labels
Select in Other View Shift + Double-Click Cross-select in schematic or board
Toggle Ratsnest o Show/hide ratsnest
Command Menu ` Open command interface for custom commands
Help Menu ? or / View all available commands

Help Menu (?)

All commands can be remapped to fit your workflow. Press ? or / to see additional shortcuts and documentation.