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¶
- Starting code: JITX Project – Created from the Organize a schematic tutorial
- Final tutorial code – The JITX Project for Autoroute and layout
- Board View UI Documentation
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.
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.
1.3 Board-Level Pours 1:45¶
Create power and ground planes using copper pours:
-
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-)
-
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
-
isolate
sets clearance from other copper. rank
determines pour priority (higher numbers override lower).- Pours can be placed on any layer.
- 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)¶
- Select pads that need vias.
- 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¶
- Select pads you want to fan out.
- Open Command (press
`
) and type:
auto-via 180 0.1
- Vias appear with the specified offset/angle.
3.3 Differential Pairs¶
- Select related pads.
- Press Shift + i to add insertion points.
- Creates transition points from single-ended to differential pairs.
- These transition points also move with the component.
- Helps maintain correct differential pair spacing.
4. Routing 5:16¶
4.1 Auto-routing¶
- 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¶
- Shift + q: Enter manual routing mode to draw/edit segments.
- Path Redraw:
- Click an existing route to begin redrawing.
- Sketch the desired path.
- Reconnect to the original route.
- The route automatically updates.
- 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.
4.3 Route Adjustments¶
- Select a route to modify:
- Adjust trace width (see
)
- Change clearance
- Reassign layers
- Convert to adaptive traces for power routing
- Adjust trace width (see
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
5.2 Layer-specific Features¶
-
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
-
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
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.
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.
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¶
- Place major components first.
- Add fanout for complex parts (like BGAs).
- Route critical signals (high-speed or sensitive lines).
- Complete power and ground connections.
- 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.