ROOM

Reusable Open Object Model · Cap'n Proto · C++17

ROOM — Reusable Open Object Model — is a teaching and application API (room::) for storing chip design topology: libraries, cells, layers, shapes, instances, and nets. Layout and schematic data share one model; the view kind (layout, schematic, symbol, abstract) lives in CellContent. Data is serialized to a binary .room file through Cap'n Proto.

The project is part of the IHP open-source IC design flow. Design data is kept in a format-neutral internal model so tools can load, edit, and save the same representation without tying the database to a single exchange format. Cap'n Proto is built locally under third_party/capnp-install/ (CMake runs scripts/mkcapnp.cmd or scripts/mkcapnp.sh automatically on first configure).

Data hierarchy

On disk (.room, format v1.0), each view stores geometry in CellContent.payload — not a top-level block field. The C++ API exposes the same topology via CellContent::block().

Database +-- Lib +-- layers[] -> LayerSpec table (library-global) +-- index -> LibIndex (derived, persisted) +-- Cell[] +-- CellContent[] -> viewType, dbuPerMicron, dbuPerEditorUnit, properties +-- payload -> ViewPayload (on disk) +-- layout | schematic | symbol | abstract | +-- layers[] (per-view on disk) | +-- block -> Shape[], Instance[], Net[] +-- opaque (unknown / future views)

Format v1.0 stores only payload on CellContent (no legacy top-level block field).

Quick start (VS Code)

Ctrl+Shift+B → Example: Build & Run Full Demo

Or build static libraries only: Build: Static Libraries (.a)

Quick start (command line)

cmake -S . -B build -G "MinGW Makefiles"
cmake --build build

.\build\make_sample_gds.exe testdata\sample.gds
.\build\gds_to_room.exe examples\gds_to_room\data\sg13g2_stdcell.gds out\layout.room

.\build\qucs_to_room.exe examples\qucs_to_room\data\rc_lowpass.sch out\schematic.room

Python API

Script ROOM from Python without rebuilding C++ (or reading C++ docs). See the Python API docs for install, CLI, converters, and the full class reference (Database, Cell, types).

pip install ./python
room info design.room
python -c "import room; print(room.open('design.room').cell_names())"

API reference

Class pages follow a Qt-style layout: brief summary, Header/CMake, Public Types/Functions tables, detailed member docs, private members, examples, and an on-page table of contents. See docs/DOCUMENTATION_STYLE.md in the repository for authoring rules.

Classes

Examples

GDS layout import · Qucs schematic import · Xschem schematic import

Sniff and file naming

sniffRoomFile() reads .room headers without geometry. View-specific names: <cell>.schematic.room — see ROOM path helpers and docs/SNIFF.md.

Project layout

PathPurpose
src/Core C++ API (Database, Cell, Shape, …)
src/point.h, box.h, box.cpp, …Basic geometry and metadata types
src/types.hUmbrella include for basic types
src/enums.hViewType, Orient, SigType, string helpers
utils/GdsImporter, QucsImporter/Exporter, PrimitiveResolver, pin_retarget, XschemImporter/Exporter, xschem_bridge, TextDumper
schema/Cap'n Proto schemas
third_party/capnp-install/Cap'n Proto compiler and libraries
scripts/mkcapnp.cmdOptional manual Cap'n Proto build (CMake runs it automatically if needed)
examples/gds_to_room/GDS import demo
examples/qucs_to_room/Qucs schematic demo
examples/xschem_to_room/Xschem schematic demo
python/Python package + CLI (import room, pip install ./python)
docs/html/This documentation (logo.svg, room-logo.png)
LICENSEGNU GPL v3.0

Licensed under GNU GPL v3.0 (see repository LICENSE).