Import a PCB from Gerber files and simulate a section of it

A whole board is usually far more than you need to solve. This guide takes a real four-layer board, the Folio power board, from its Gerber and drill files to the differential S-parameters of its USB pair, solving only an 18.5 by 9.4 mm section around the pair.

The cropped section of the board in 3D, with surface current drawn on the top copper: one line of the USB pair glows red from the connector, at ports 1 and 2, to the ESD part at port 3, and the rest of the copper stays dark.
Figure 1. Current on the top copper at 0.48 GHz, driven at the USB-C connector. The pair loses 0.1 dB to 1 GHz and 0.5 dB at 2.4 GHz, and its two lines arrive 4.5 ps apart.

Step by step

Open the workbench in Chrome or Edge 113 or later. You need the board's Gerber files, one per copper layer, its board outline and its Excellon drill file.

  1. Set up the stackup

    Gerber files hold copper shapes but not the stackup, so set the layers first, from your fab's stackup drawing. Choose New, then Blank board, and add copper with Add layer pair on top. Here I opened a project that holds only the Folio stackup.

    1. Seven layers, 0.85 mm in all: four copper layers with 0.2 mm of FR-4 prepreg, a 0.45 mm core, then 0.2 mm of prepreg.
    2. Add layer pair on top adds a dielectric and a copper layer above the top one.
    The project tree's Stackup group: top, prepreg-top, in1, core, in2, prepreg-bottom and bottom, with the board outline below them.
  2. Import each Gerber layer

    Choose Import once per file. Import each copper layer in turn. The console counts what each file brought in: 2,286 shapes on top, 171 on each inner layer and 255 on the bottom.

    1. Import, in the toolbar.
    2. The Gerber file, here the front copper, power-F_Cu.gtl.
    3. The layer it replaces.
    4. Keep the file's coordinates, so the layers line up with each other.
    5. Import. Undo puts the old layer back if you picked the wrong one.
    The Import into this project dialog with power-F_Cu.gtl chosen, Replace set to Copper layer top and Position set to Keep the file's coordinates.
  3. Import the drill file

    Plated holes become vias between the outer layers. This board's drill file has 170 plated holes, and the 4 slots come in as a via at each end.

    1. The Excellon drill file, power-PTH.drl.
    2. Replace: Plated holes (Excellon drill file).
    The Import dialog with power-PTH.drl chosen and Replace set to Plated holes (Excellon drill file).
  4. Check the whole board

    Turn the view with the mouse and look for a layer that landed in the wrong place. A board this size, with its 2,883 copper shapes, would mesh to many times the 8.63 million cells of the section in step 8, which is why the next step cuts it down.

    1. The console, newest first: one line per imported file.
    The imported board in 3D, with the console below listing the imported drill, bottom, inner and top copper files.
  5. Draw the section

    Pick the Section tool and drag a rectangle around the part to keep. This one runs from the USB-C connector to the ESD part.

    1. Section, in the drawing tools. The key is X.
    2. The rectangle being dragged.
    3. The hint: copper and the board outline are cut on every layer, and ports, parts and vias outside are removed.
    4. The pointer's position in mm, so you can start and end on round numbers.
    The whole board from the top with a dashed rectangle being dragged around the USB area near its bottom edge, and the Section tool's hint above the drawing tools.
  6. Check what was kept

    The board is now the section alone, with the connector's pads on the left and the pair running right to the ESD part. Undo brings the whole board back.

    1. The console: 290 shapes kept whole, 14 cut at the edge and 2,579 dropped, with 160 vias removed.
    The 18.5 by 9.4 mm section from the top, and the console line that reports the cut.
  7. Add a port at each end of each line

    Choose Port and click on a line's end, then type the exact position and a name. The tool goes back to Select after each port, so press T before the next one. Each port is a source column from the plane below to the trace, as in the drawing under these steps.

    1. Port, in the drawing tools. The key is T.
    2. dp_j1 and dm_j1, at the connector.
    3. dp_esd and dm_esd, at the ESD part.
    4. The name and the position in mm.
    5. From layer in1, the inner plane under the pair, to the top copper.
    6. 50 Ω per port. The pair is read at 90 Ω differential later.
    The section with four numbered ports, two at the connector and two at the ESD part, and the inspector for port 4 with its name, position, layers and reference impedance.
  8. Solve

    Press Solve. NobuRF drives one port at a time, so four ports take four runs. This section meshed to 8.63 million cells and took 35 minutes on a laptop's GTX 1660 Ti.

    1. Which run, and its time step.
    2. How far the field energy has fallen, against the 30 dB that ends a run, and the time so far.
    3. The mesh size and the number of runs.
    The progress bar during the solve: run 3 of 4 at step 400, and the console line Solving on WebGPU: 426 by 244 by 83 cells, 8.63 million, up to 20,000 steps, 4 runs.
  9. Read the pair

    Open the Differential tab. It proposes a pairing from which ports transmit to which. Choose Use this pairing, then set the differential reference to your interface's, 90 Ω for USB.

    1. The Differential tab.
    2. The pairs: D1 at the connector, D2 at the ESD part.
    3. Differential reference, 90 Ω.
    4. Insertion loss, Sdd21: −0.0, −0.1 and −0.5 dB at 0.48, 1 and 2.4 GHz.
    5. Intra-pair skew: 4.50 ps, with the negative line later.
    6. The differential TDR from each end.
    7. The tab says why it gives no impedance here: its 164 ps rise time is longer than the line's 121 ps one-way delay, so the port connections blur into it.

    The worst differential return loss, Sdd11, is −5.5 dB. On a line this short, much of that is likely the lumped port connections at each end, which a port's "De-embed feed" setting separates out.

    These runs stopped at 30 dB of energy decay. Skew and the TDR lean on the lowest frequencies, so before you sign off on them, set "Stop when energy falls" to 60 dB and solve again.

    The Differential tab: the pairing bar, mixed-mode S-parameter curves, a differential TDR plot and the readouts beside them.
  10. Look at the current

    Back on the Model tab, the field buttons draw the solved field on the board. Current shows where the drive from the connector flows.

    1. No field, Ez, Current or a Cut through the board.
    2. The color scale: 0 dB is the 98th percentile of the current, and the scale reaches 30 dB below it.
    3. The frequency to show.
    The section in 3D with surface current drawn on the top copper, the field buttons above it and the color scale panel below.

What a port is in this stackup

A lumped port is a short column of source between two copper layers. For a trace on top, its return path is the nearest plane below, here in1, through 0.2 mm of prepreg.

Cross-section of the Folio stackup with a lumped port Seven layers from top to bottom: top copper, 0.2 mm prepreg, in1 copper, 0.45 mm core, in2 copper, 0.2 mm prepreg and bottom copper. A trace on the top layer ends at a vertical port column that runs down to the in1 plane. 1 trace on top port 1: from in1 to top top prepreg, 0.2 mm in1, the plane core, 0.45 mm in2 prepreg, 0.2 mm bottom
The Folio stackup, to scale in thickness. The port sits where the trace ends at the cut, and its column spans the prepreg between the trace and in1.

Where to cut

Where to draw a section across a pair A differential pair runs from a connector on the left to a part on the right. The section rectangle crosses both lines where they run straight, a few line widths from the parts, and a port sits on each line at each cut edge. connector part section: cut across straight line ports at the cut ports at the cut
  1. Cut across the lines where they run straight, a few line widths away from the feature you care about. The new ports sit at the cut, and each port connection shows as a step at the ends of the TDR.
  2. The cut goes through every layer, so the plane under the section is kept with it.
  3. Anything that crosses the edge, such as a pour or a long trace, is clipped to it. Parts and vias outside are removed.
  4. Ask what the section is for. Skew and mode conversion from a local feature survive a tight crop. Impedance and loss need more line: the TDR reads a line only where its delay is longer than the rise time.

Does cropping change the answer?

To check, I solved the diff-pair-detour example in the workbench twice: whole, and cropped to a 10 mm section that keeps its length-matching detour. Each had its own four ports.

Both solved in the workbench on a laptop's NVIDIA GTX 1660 Ti, with the example's own mesh and 0.05 to 10 GHz band.
Differential tabWhole board, 18 mm of lineSection, 10 mm of line
Intra-pair skew10.56 ps11.03 ps
Delay, D1 to D2122.2 ps70.6 ps
Worst mode conversion, Scd21−10.1 dB−9.9 dB
Worst return loss, Sdd11−15.1 dB−16.9 dB
Differential impedance93.5 Ω (92.2 to 96.8)not read, line too short

The skew comes from the detour, and the section keeps the detour whole, so it reads the skew within 0.5 ps of the whole board. The delay drops with the shorter line, as it should, and the mode conversion, which the detour also causes, stays about the same.