ROOM (Python)

Reusable Open Object Model · import room · CLI room

The Python API exposes the same design database as the C++ room:: library: libraries, cells, layers, shapes, and instances in portable .room files. You do not need C++ to script ROOM.

Data hierarchy

Database # room.open / room.create / room.from_gds … +-- Lib (via Database) # lib_name, layers[], cells[] +-- layers[] # room.Layer +-- Cell[] # room.Cell +-- CellContent[] # layout / schematic / symbol / abstract +-- Block # shapes[] + instances[] + bbox +-- Rect / Instance

Quick start

pip install ./python

import room
db = room.open("design.room")
print(db.cell_names())
for cell in db.cells():
    layout = cell.layout()
    if layout:
        print(cell.name(), len(layout.shapes()), layout.bbox())

Install

pip install ./python
# or editable:
pip install -e ./python[test]

Builds the native room_c library via CMake on first install. On Windows, MinGW64 (C:\msys64\mingw64) is used automatically when present.

CLI

room info design.room
room ls design.room
room convert chip.gds chip.room
room convert --tool qucs rc.sch rc.room --view schematic

API reference

Class pages follow the same layout as the C++ docs. Start from the sections in the left sidebar, or open the class index.

Classes

Examples

GDS layout import · Qucs schematic import · Xschem schematic import

C++ API: Overview · package sources in python/.