Project configuration

Complete reference for rosette.toml project, layer, DRC, DFM, check, and snapshot settings.

rosette.toml is the project configuration file for Rosette. It records project metadata, names GDS layers, and configures verification and snapshot behavior. This page is the canonical reference for its supported sections and keys.

Config discovery

An explicit config_path passed to a Python loader or CLI command always wins. Otherwise:

  • Commands operating on a design search from the design file's directory toward the filesystem root and use the nearest rosette.toml.
  • Direct calls to load_layer_map, load_drc_rules, load_dfm_config, and load_checks_config search from the current directory upward.
  • rosette update must run from the project directory containing rosette.toml.

Rosette recognizes six top-level sections:

SectionPurpose
[project]Project name and template provenance.
[layers]Named GDS layers and viewer display properties.
[drc]Per-layer and inter-layer design rules.
[dfm]Manufacturability prediction settings.
[checks]Connectivity and bend-radius checks.
[snapshots]rosette shot retention.

Unknown keys produce warnings rather than errors. Valid settings in the same section still load, so warnings can catch typos without breaking existing projects.

Project

rosette init writes project metadata used by rosette update:

[project]
name = "my-chip"
template = "generic"
KeyTypeDefaultMeaning
namestringProject directory nameProject name substituted into managed template files during rosette update.
templatestring"blank"Template whose managed references and agent files rosette update refreshes. Built-in values are "blank" and "generic".

Layers

Each child table under [layers] assigns a semantic name to one GDS layer/datatype pair:

[layers.silicon]
number = 1
datatype = 0
color = "#ff69b4"
fill = "solid"
opacity = 0.7
description = "Silicon waveguides"
KeyTypeDefaultMeaning
numberintegerRequiredGDS layer number from 0 through 999.
datatypeinteger0GDS datatype from 0 through 999.
colorstring"#808080"Six-digit hexadecimal viewer color.
fillstring"solid""solid", "hatched", "crosshatched", or "dotted".
opacitynumber0.7Viewer opacity from 0.0 through 1.0.
descriptionstring""Human-readable layer description.

Layer names must map to unique (number, datatype) pairs. If [layers] is absent or empty, Rosette provides silicon as 1/0 and text as 10/0.

Layer references

DRC and DFM settings accept any of these forms:

FormExampleMeaning
Semantic name"silicon"Resolves through [layers.silicon]. Recommended.
Number/datatype"1/0"Uses GDS layer 1, datatype 0.
Number"1"Shorthand for GDS layer 1, datatype 0.

Design rule checking

DRC supports global settings, per-layer rules, and typed inter-layer rules. See Design rule checking for workflows and result handling.

Global DRC settings

[drc]
warning_margin = 0.01
KeyTypeDefaultMeaning
warning_marginnumber0Absolute margin in design units for downgrading near-threshold length violations to warnings. Values at or below zero disable downgrading.
layerstable{}Parent table for per-layer rules.
rulesarray of tables[]Inter-layer rules declared with [[drc.rules]].

An absent [drc] section loads an empty rule set.

Per-layer rules

[drc.layers.silicon]
min_width = 0.12
min_spacing = 0.13
acute_angle = 60
no_overlap = true

Dimensions use design units, normally micrometers. Angles use degrees.

KeyTypeMeaning
min_widthnumberMinimum feature width.
max_widthnumberMaximum feature width.
min_spacingnumberMinimum spacing between polygons on this layer.
min_areanumberMinimum polygon area in squared design units.
min_edge_lengthnumberMinimum polygon edge length.
anglesarray of numbersAllowed edge angles.
acute_anglenumberMinimum convex interior angle.
no_overlapbooleanForbid overlapping polygons on this layer.
no_self_intersectionbooleanForbid self-intersecting polygons.
snap_to_gridnumberManufacturing grid pitch.
densitytableSliding-window density constraints.

Density is a nested table:

[drc.layers.silicon.density]
min = 0.20
max = 0.80
window = 100.0
step = 50.0
region_layer = "chip_boundary"
KeyTypeDefaultMeaning
minnumberNoneMinimum fill fraction. At least one of min or max is required.
maxnumberNoneMaximum fill fraction. Must be greater than or equal to min when both are set.
windownumberRequiredPositive square window size in design units.
stepnumberHalf of windowPositive distance between windows.
region_layerlayer referenceNoneMarker layer whose union limits the checked region. The design bounding box is used when omitted.

Inter-layer rules

Every [[drc.rules]] entry requires type, accepts an optional name, and supports only the fields associated with that type.

TypeRequired fieldsMeaning
spacinglayer1, layer2, min_spacingRequire minimum spacing between two layers.
enclosureinner, outer, min_enclosureRequire the outer layer to enclose the inner layer by a minimum distance.
require_overlaplayer1, layer2Require the two layers to overlap.
forbid_overlaplayer1, layer2Forbid overlap between the two layers.
not_insideinner, outerForbid inner-layer shapes from sitting fully inside the outer layer.
[[drc.rules]]
type = "spacing"
layer1 = "p_doping"
layer2 = "n_doping"
min_spacing = 0.5
name = "PN_SPC"

Design for manufacturability

DFM prediction is disabled when [dfm] is absent or empty. Once the section contains settings, layers is required and must contain at least one explicit layer reference.

[dfm]
resolution = 0.01
padding = 1.0
model = "gaussian"
sigma = 0.08
threshold = 0.5
keep_raster = false
layers = ["silicon"]
max_area_deviation = 0.10
severity = "warning"
KeyTypeDefaultMeaning
resolutionnumber0.01Positive raster pixel size in design units.
paddingnumber1.0Margin around the cell bounding box in design units.
modelstring"gaussian"Prediction model. Only "gaussian" is currently supported.
sigmanumber0.08Non-negative Gaussian blur sigma in design units.
thresholdnumber0.5Binarization threshold from 0.0 through 1.0.
contour_thresholdnumber0.5Compatibility spelling for threshold. If both differ, threshold wins and Rosette warns.
keep_rasterbooleanfalseRetain raster data in prediction results.
layersarray of layer referencesRequiredNon-empty list of layers to predict. There is no implicit "all layers" mode.
max_area_deviationnumberNonePositive relative area-deviation tolerance. Omit for informational prediction without this violation check.
severitystring"error""error" or "warning" for configured tolerance violations.
layertable{}Parent table for per-layer overrides.

Per-layer tables override model or tolerance settings for one layer:

[dfm.layer.silicon]
sigma = 0.05
max_area_deviation = 0.05
severity = "warning"
KeyTypeMeaning
sigmanumberGaussian sigma override.
max_area_deviationnumberRelative area-deviation tolerance override.
severitystring"error" or "warning" override.

Design checks

[checks] configures connectivity and route bend-radius checks. If the section or file is absent, the defaults below apply.

[checks]
position_tolerance = 0.001
angle_tolerance = 0.1
width_tolerance = 0.000001
check_widths = true
min_bend_radius = 5.0
severity = "error"
KeyTypeDefaultMeaning
position_tolerancenumber0.001Maximum port-center gap in design units for ports to count as connected.
angle_tolerancenumber0.1Maximum angular deviation from anti-parallel, in degrees.
width_tolerancenumber0.000001Maximum absolute connected-port width difference in design units.
check_widthsbooleantrueReport width mismatches between connected ports.
min_bend_radiusnumberNoneMinimum bend radius in design units. Omit to skip bend-radius threshold checks.
severitystring"error""error" or "warning" for configurable violations.

Numeric tolerances must be finite and nonnegative; angle_tolerance cannot exceed 180 degrees, and min_bend_radius must be positive. Warning-only runs pass while retaining their diagnostics.

Snapshots

[snapshots] controls pruning for snapshots written to the default .rosette/snapshots/ directory:

[snapshots]
retain = 50
KeyTypeDefaultMeaning
retaininteger20Number of newest PNG snapshots to keep. Zero or a negative value disables pruning.

An invalid non-integer value falls back to 20. The rosette shot --retain option overrides the config for one invocation. See Snapshots for output and pruning details.

Unsupported historical settings

[build] and [project].version are not part of the schema. Build output is controlled by command options such as rosette build --output; package version information belongs to the installed Rosette package rather than a project file.

On this page