SES

Spectra Session File (SES)

A Spectra Session File (extension .ses) is the result of a Specctra-style PCB autorouter. It records how components were placed and how nets were wired after routing. The matching input to that router is a DSN (Spectra Design File). Together they form the classic Cadence Specctra / Electra exchange: the layout tool writes DSN, the router reads DSN and writes SES, and the layout tool reads SES back.

The format is an ASCII S-expression language (Lisp-style parentheses), the same family as DSN. It is widely used by PCB routers such as Cadence Specctra, Electra, and FreeRouting. It is not an IC mask format (unlike GDSII) and it is not LEF/DEF, which are the digital-IC pair used with OpenROAD.

LayoutEditor reads SES with Open, Import and Update, and does not write it. Saving as SES reports that the format cannot be saved. To feed a router, export DSN instead.

Typical use is: prepare the cell with a netlist, placed components (cell references with a device name), and conductor and via layers in the layer setup. Export the current cell as DSN, or run Auto-Router, which writes DSN for you. The router — for example FreeRouting, shipped with the LayoutEditor — produces a .ses next to the .dsn. LayoutEditor then imports that SES: component positions are updated and routed wires and vias are added to the cell.

LayoutEditor --DSN--> autorouter --SES--> LayoutEditor
 (geometry, (places & (wires, vias,
 nets, pads) routes) placements)

Using SES in the LayoutEditor

Open creates a new cell named after the file (without the .ses extension) and makes it current. Components are placed into it if matching library cells exist. Routes are added as paths and via shapes. Import / Attach applies the SES to the current cell: existing cell references whose device name matches a place instance are moved and rotated, and new wires and vias are added. Auto-Router uses Import. Update reads the same way as Open into a temporary cell, then merges with the usual Update into the design. Save is not supported; choose GDSII, DSN, DEF, or another writable format.

The file dialog lists the type as Spectra Session File (.ses).

Under Place & Route, Autoroute can call an external tool. A typical setup uses input format dsn, output format ses, and the FreeRouting executable included in the LayoutEditor package. The editor writes a .dsn named after the cell in a temporary folder, runs the tool, then imports the matching .ses into the current cell. Hold Shift and press Auto-Router to change that setup. The interface also supports DEF in and out (for example OpenROAD). The internal native router, available when compiled in with the use_router qmake option, does not use DSN or SES; it works on the LayoutEditor database directly.

FreeRouting can also be run by hand: open the .dsn, autoroute, save the session as .ses, then Import in the LayoutEditor.

SES does not contain footprints, layer colours, or a full technology deck. On import the LayoutEditor therefore needs layer names in the current setup that match the names in each path record. Unknown layer names are skipped and no path is created. Via layers and the global via layer must have the same type parameters (size, enclosure, round or square) as when DSN was exported. Via padstack names from the LayoutEditor DSN writer are via_ plus the via layer name plus _layout, and via_global_via_layout. Component cells must already be in the design or loadable by name. A place record looks up a cell reference by device name. If the instance is missing but a cell with the package name exists, a new cell reference is created. Otherwise a text on layer 9 is added: device is missing, followed by the name.

File syntax

A SES file is UTF-8 or ASCII text. Parentheses group a scope; the first token after the opening parenthesis is the keyword. Tokens are separated by space, tab, or newline. Names with spaces or special characters are written in double quotes, for example NET CLK in quotes. Comments are not part of the Specctra session grammar in the usual DSN sense; keep files free of extra text outside scopes. Coordinates and widths are numbers, integer or floating. Units are declared with a resolution line (see Units).

A scope may contain nested scopes. Unknown scopes should be skipped by a reader. The LayoutEditor skips any inner parenthesis group it does not handle.

Units and coordinates

DSN files from the LayoutEditor use resolution um 1 and unit um. FreeRouting copies resolution um 1 into the SES placement and routes scopes.

LayoutEditor SES import always treats numbers as micrometres and converts them with the current database unit. It does not read the resolution line. Files that use a different resolution than the LayoutEditor DSN export will come in at the wrong scale.

X and Y are in the board coordinate system of the DSN (the same origin as the exported cell). Rotation in a place record is in degrees, counter-clockwise, as an integer.

Reference — session file

The top-level scope is session, named after the SES file (for example board.ses). The LayoutEditor checks that the first scope is session and then walks the children. base_design is the path or name of the DSN this session belongs to and is ignored. placement holds component locations after routing and is read. was_is records pin swaps and is ignored. routes holds wires, vias and via padstacks; the LayoutEditor reads the network_out child. Other vendor extensions are skipped.

A base_design line such as board.dsn documents which design was routed. It is not used on import.

placement contains an optional resolution, then one component group per footprint (the DSN image name, which in the LayoutEditor is the cell name of the device layout). Each place record has the instance id (matched to a cell-reference device name), X and Y of the placement origin in session units (micrometres for LayoutEditor files), side front or back, and an integer rotation in degrees. An optional lock_type position means the component was locked in the router.

On import, if a cell reference with that device name exists, its origin is set to the given X and Y, its strans angle is adjusted to the rotation, and if the side does not match the cell’s PCB front or back, the cell is flipped and the instance is rotated by 180°. If no instance exists, a new cell reference to the image cell is created at that location, or the device-is-missing text is written. resolution inside placement is not applied (see Units).

was_is lists pin pairs that the router swapped. The LayoutEditor does not apply pin swaps from SES.

The routes scope may repeat resolution and parser (quote rules and host CAD name); both are ignored. library_out lists via padstack shapes used in this session and is ignored: vias are rebuilt from the layer setup. network_out lists routed nets and is read.

A padstack in library_out has one shape per copper layer of the via stack — circle, rect, or polygon on a named layer, coordinates relative to the via centre — and an attach flag (on or off) for whether traces may attach off-pad. The LayoutEditor does not instantiate geometry from library_out. Via size and enclosure come from the via layer type parameters, the same values that were written into the DSN padstacks.

Each net in network_out may contain wire and via records. A path inside a wire is the centreline of a trace: layer name, full width, then X Y pairs. The LayoutEditor creates a path on that layer with that width and round caps. The layer must exist by name. circle, rect and polygon inside a wire are area copper (pour); circle is skipped and the other shapes are skipped as well. type protect means pre-existing copper that must not be duplicated; that wire is not inserted. type fix means locked by the router and is treated as a normal wire (inserted).

A via record has a padstack name, X and Y, and an optional type protect. Name via_global_via_layout draws the global via layer at that point (circle or box from type parameters) and enclosure pads on all conductor layers. A name of the form via_ plus a layer name plus _layout uses that layer as the via cut and draws enclosures on the conductor layers above and below it (by layer level). Any other padstack name produces no via geometry; it does not match the DSN export convention. type protect skips the via. Via shape (round versus square) follows type parameter 5 of the via layer (2 or 1 means circle, otherwise box). Diameter and enclosure follow type parameters 1 to 3, the same as DSN export.

Example

Minimal session with two parts and one net (units: micrometres), as produced by FreeRouting from a LayoutEditor DSN:

(session example.ses
 (base_design example.dsn)
 (placement
 (resolution um 1)
 (component RES_0805
 (place R1 800 1500 front 0)
 (place R2 3200 1500 front 90)
 )
 )
 (was_is
 )
 (routes
 (resolution um 1)
 (parser
 (host_cad LayoutEditor)
 (host_version 20260828)
 )
 (library_out
 (padstack via_Via1_layout
 (shape (circle top 400 0 0))
 (shape (circle bottom 400 0 0))
 (attach off)
 )
 )
 (network_out
 (net N1
 (wire
 (path top 200
 800 1500
 2000 1500
 )
 )
 (via via_Via1_layout 2000 1500)
 (wire
 (path bottom 200
 2000 1500
 3200 1500
 )
 )
 )
 )
 )
)

After Import, R1 and R2 are moved if those device names exist, a path appears on layer top, a via stack at (2000, 1500) if Via1 is a via layer, and a path on bottom.

What is not imported

Writing SES is always an error; use DSN to talk to the router. The resolution line is not applied: scale is fixed to micrometres. Pin swaps from was_is are ignored. Padstack geometry from library_out is ignored; via size comes from the layer setup. Area fills (circle, polygon, rect inside a wire) are skipped, as are wires and vias marked type protect. Layers that have no matching name in the current layer setup produce no path. Via padstack names that are not via_ plus layer plus _layout or via_global_via_layout produce no via.

The Cadence Specctra manuals describe further session keywords used by some commercial routers. The LayoutEditor skips unknown scopes so those files can still load for the placement and network_out parts described above.

See also

  • DSN — Specctra design file (router input; LayoutEditor export)
  • DEF / LEF — IC place-and-route exchange (OpenROAD)
  • Place & Route — Auto-Router dialog