Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 2.81 KB

File metadata and controls

44 lines (36 loc) · 2.81 KB

vyges-layout — kernel notes & scope vs KLayout-db / gdstk

vyges-layout is a layout-geometry library (with a CLI), the same role as KLayout's database or gdstk — not an end-user product. The difference is clean-room, memory-safe Rust, std-only, so the Vyges layout tools share one auditable base.

What v0 does

Capability vyges-layout v0 KLayout-db / gdstk
GDSII read/write (round-trip) ✅ BOUNDARY/PATH/SREF/AREF/BOX ✅ full
OASIS write ✅ RECTANGLE/POLYGON/PLACEMENT subset (GDS↔OASIS convert) ✅ full
OASIS read (third-party) ✅ full record set: RECTANGLE/POLYGON(+manhattan closure)/PATH/TRAPEZOID/CTRAPEZOID/CIRCLE/TEXT/PLACEMENT + repetitions + properties/name-tables + CBLOCK (DEFLATE via miniz_oxide); validated on real sky130 (gdstk, compressed+raw) == GDS. Gap: rare CTRAPEZOID 20–23 (error, not guessed) ✅ full
Per-layer stats (info)
Boolean AND/OR/NOT/XOR ✅ Manhattan rectilinear polygons (scanline) ✅ general polygons (Vatti/edge)
Hierarchy flatten ✅ SREF/AREF, composed transforms
Spatial index (region / overlap / spacing-halo queries) ✅ uniform-grid RegionIndex ✅ (R-tree)
Sizing + DRC width·spacing rules ❌ (depth — on top of the index)
Net tracing / device extraction ❌ Phase 2 (the vyges-lvs seam) ◐ (KLayout LVS)

Boolean: the Manhattan scanline (v0)

The boolean runs a vertical scanline: for each x-slab between consecutive rectangle edges, the y-coverage of A and of B is an interval set; the op is applied on those intervals and emitted as rectangles, then merged horizontally across slabs. Integer coordinates make it exact. v0 inputs are axis-aligned rectangles; a non-rectangle boundary is bbox-approximated and counted in the report (no silent caps).

Depth pass

  1. Rectilinear-polygon decomposition → run the same scanline on L-shapes etc.
  2. General-angle clipping (Vatti / Greiner-Hormann) for non-Manhattan geometry.
  3. DRC width/spacing rules on top of the RegionIndex region/overlap/halo queries (the spatial-index primitive itself has landed); plus rectangle sizing (grow/shrink). RegionIndex is a candidate for extraction into a shared geometry crate once a second engine consumes it directly.
  4. Net tracing + device recognition → the vyges-lvs Phase-2 extraction seam.
  5. Full third-party OASIS ingest (TRAPEZOID/CTRAPEZOID/PATH/CBLOCK/properties, modal compaction, matrix repetitions) on top of the v0 RECTANGLE/POLYGON/PLACEMENT subset; per-layer render hooks for the chip viewer.

Honest bound: v0 is a real GDSII and OASIS kernel with exact Manhattan boolean and flatten — a solid base for the layout tools — with general geometry, full OASIS ingest, and extraction on the path above.