.SES File Format

Specctra session file

Introduction

A Specctra session file carries the result of autorouting a printed circuit board back to the board editor: the routed wires and vias, the padstacks those vias use, and any changes to component placement or pin assignment. A router such as Freerouting reads a Specctra design file (.dsn) and writes the session, which an editor such as KiCad then imports. This page describes the format as the open source code of those two programs reads and writes it, so it covers what they handle rather than the whole language of the Cadence Specctra router.

The extension .ses is also used for saved sessions by unrelated programs.

Text rules

The syntax is that of the design file: nested lists written (keyword item …), with names quoted where they contain spaces or brackets, and shapes such as path, circle and qarc written the same way.

File layout

(session "board"
  (base_design "board")
  (placement
    (resolution um 10)
    (component "TE_1-84953-5:TE_1-84953-5"
      (place U1 1114100 -855500 front 90)
    )
  )
  (was_is
  )
  (routes
    (resolution um 10)
    (parser
      (host_cad "KiCad's Pcbnew")
      (host_version "5.1.5")
    )
    (library_out
      (padstack "Via[0-1]_800:400_um"
        (shape (circle F.Cu 8000 0 0))
        (shape (circle B.Cu 8000 0 0))
        (attach off)
      )
    )
    (network_out
      (net GND
        (wire (path F.Cu 2500  1070831 -865500  1070831 -835500))
        (via "Via[0-1]_800:400_um" 1156570 -920643)
      )
    )
  )
)
Item in sessionContents
namename of the session; KiCad accepts several words here, as some routers write them
base_design pathdesign that was routed
historyearlier files (ancestor) and this one (self), each with a created_time and comments
structureboard structure, written as in a design file
placementcomponent positions
was_ispin swaps
routesthe routing result

To import a session, KiCad requires the session list, its routes list and a library_out list inside that.

A time in history is the English short month name, day, hour, minute, second and year, with colons between the three parts of the clock time, as in Jan 5 14:30:00 2020.

Units and coordinates

placement and routes each begin with (resolution u n), where u is inch, mil, cm, mm or um. Coordinates, widths and diameters are counted in steps of one n-th of that unit: with (resolution um 10) a value of 1114100 is 111,410 µm. Design files written by KiCad give lengths in whole units with decimals, so the same point reads as 111410 there. The y axis points up, and KiCad negates y when it imports. Rotations are in degrees.

Placement and pin swaps

placement groups parts by footprint: a component list names the image and holds (place reference x y front|back rotation) for each instance. Freerouting adds (lock_type position) to a fixed part, except in files for KiCad. When KiCad imports a part on the back side, it adds 180 degrees to the rotation to get its own orientation.

was_is holds a (pins was is) entry for every swapped pin, each pin written as component-pin. The list is empty when nothing was swapped.

Routes

Item in routesContents
resolutionunit and steps for everything below
parserprogram that wrote the design, such as host_cad and host_version; KiCad allows for a second parser list, which some routers write
structure_outlayers and a rule
library_outdefinitions of the padstacks used by the vias
network_outone net list per routed net; the keyword also occurs capitalised as Net
test_pointstest points; KiCad accepts only an empty list

Padstacks

A padstack is written as in the design file, with one shape per layer and (attach off). KiCad accepts only circular shapes for vias, given as (circle layer diameter x y). It takes the drill size from names of its own form: in Via[0-1]_800:400_um the diameter is 800 µm and the drill 400 µm, between copper layers 0 and 1.

Nets, wires and vias

Item in netContents
net_number nnumber of the net
rulerules for the net
wire (path layer width x y x y …)connected straight track segments
wire (qarc layer width x1 y1 x2 y2 x3 y3)arc: start point, end point and centre
wire (polygon …) (window …)a net's copper area with holes, which Freerouting can write; KiCad skips it and keeps its own zones
via padstack x yvia of the named padstack at a point
supply_pin pin … [(net name)]pins connected to a supply

A wire or via may carry (type fix|route|normal|protect). Freerouting writes fix or protect for fixed items and no type for ordinary ones. KiCad imports a fix track as locked. On import it removes its unlocked tracks and adds those of the session; tracks that were already locked are kept.

Recognising the file

After any white space the file starts with (session, and a routing result contains a routes list.

Not described

The explorer has no Specctra viewer, so a dropped file shows as text.

Known, not yet covered

  • Reference: the full session syntax of the Specctra router, whose design language manual is proprietary and was not used here. Constructs that neither program handles completely include the floor plan, net pin change and swap history sections, filled test points, and the wire guide and bond shape entries of a routed net.
  • Reference: the remaining wire and via options, required order of items and differences between router versions.
  • Viewer: no board view.

Links

Software

  • Freerouting – open source autorouter that writes session files (Windows, macOS, Linux)
  • KiCad – open source circuit board editor that imports session files (Windows, macOS, Linux)

Developers

Reference