Configuration

Configuration

A single simulation configuration file in JSON is required to for gerber2ems.

An example of a configuration file can be found here: simulation.json

Signal properties

FieldTypeDefaultDescription
frequency.startfloat0.5e6Start frequency of Gaussian pulse in Hz
frequency.stopfloat10e6Stop frequency of Gaussian pulse in Hz

Simulation settings

FieldTypeDefaultDescription
max_stepsintNoneMaximum number of simulation time steps. If nothing is provided then simulation continues until total energy in system approaches -60dB.
margin.xyfloat3000Distance of air gap around x and y axis in microns
margin.zfloat3000Distance of air gap around z axis in microns
offset.xfloat0Distance to offset port locations along x axis in millimeters
offset.yfloat0Distance to offset port locations along y axis in millimeters

Via properties

FieldTypeDefaultDescription
via.filling_epsilonfloat1Dielectric constant of dielectric material that fills vias
via.plating_thicknessfloat50Thickness of via electro-deposited coating in microns

PCB mesh properties

FieldTypeDefaultDescription
meshobject
mesh.xyfloat200Distance between mesh lines along x and y axis for PCB in microns
mesh.inter_layersint5Number of default mesh lines along z axis for PCB in microns
mesh.smoothing_ratiofloat2Factor to ease between differently spaced mesh lines
mesh.margin.xyfloat200Distance in microns from x and y axis to add a mesh line
mesh.margin.zfloat200Distance in microns from z axis to add a mesh line

Configuring nanomesh

  • Nanomesh is the python package that converts image files into a mesh to import into openEMS.
  • Image files are generated by gerbv from Gerber files.
  • Done since we cannot directly convert Gerber files into mesh data.
  • Useful links to relevant library documentation.
FieldTypeDefaultDescription
nanomeshobject
nanomesh.thresholdint127Threshold to take for gerbv when determining regions.
nanomesh.precisionint10Maximum distance error of each vertex position in microns.
nanomesh.max_edge_distancefloat10Maximum distance of a triangle edge in cm.
nanomesh.minimum_angleint20Minimum angle in triangle for entire mesh in degrees.
nanomesh.max_triangle_areafloat100Maximum area for a triangle in the mesh in cm².

Simulation ports

  • Define list of simulation ports.
  • Simulation ports are labelled SP{number} in exported component placement file (*-pos.csv).
  • The index of the port (starting from 0) in this list corresponds to the exported simulation port.
FieldTypeDefaultDescription
portslist
ports.namestr“Unnamed”Name of port
ports.widthfloatRequiredWidth of port in microns
ports.lengthfloatRequiredLength of port in microns
ports.impedancefloat50Impedance of simulation port in ohms
ports.layerintRequiredMetal layer starting from top down where signal trace is (0 indexed)
ports.planeintRequiredMetal layer starting from top down where reference plane is (0 indexed)
ports.exciteboolfalseShould the port be simulated with an excitation pulse?
ports.dB_marginfloat-15S11 margin of port in decibels

Differential pairs

  • Define list of differential pairs based on pairs of two simulation ports.
  • Automatically calculate and generate graphs for that differential pair.
  • All simulation port indices start from 0.
FieldTypeDefaultDescription
differential_pairslist
differential_pairs.namestr“{start_p}{stop_p}{start_n}{stop_n}”Name of differential pair
differential_pairs.start_pintRequiredIndex of simulation port for start of positive trace
differential_pairs.stop_pintRequiredIndex of simulation port for end of positive trace
differential_pairs.start_nintRequiredIndex of simulation port for start of negative trace
differential_pairs.stop_nintRequiredIndex of simulation port for end of negative trace

Signal traces

  • Define list of signal traces based on two simulation ports.
  • Automatically calculate and generate graphs for that signal trace.
  • All simulation port indices start from 0.
FieldTypeDefaultDescription
traceslist
traces.namestr“{start}{stop}”Name of signal trace
traces.startintRequiredIndex of simulation port for start of trace
traces.stopintRequiredIndex of simulation port for end of trace

Stackup layers

  • Define list of layers that make up the PCB stackup.
  • Includes copper and dielectric layers.
FieldTypeDefaultDescription
layerslist
layers.namestrNoneName of layer
layers.typestrRequiredType of layer: [copper, core]
layers.filestrNoneName of Gerber file without extension and prefix (*-{name}.gbr)
layers.thicknessfloat0Thickness of layer in millimeters
layers.export_fieldboolfalseExport field if --export-field was provided to gerber2ems
layers.z_mesh_countintNoneOverride the default number of z-mesh lines to add to layer
layers.epsilonfloatRequiredDielectric constant required for dielectric layers
layers.priorityintDefaultsPriority of layer (higher priorities override lower priorities). By default metal layers have higher priority and override dielectric layers.

Default material priorities

Higher priority means it overrides lower priority materials.

NamePriority
Simulation port200
Via dielectric101
Via metal100
Metal layer51
Dielectric layer50