ROOM » Utilities » XschemImporter
XschemImporter Class
Imports Xschem .sch / .sym into a Database. More…
| Header: | #include "xschem_importer.h" |
|---|---|
| CMake: | target_link_libraries(mytarget PRIVATE ROOM::room_utils) |
Public Types
| struct Options | Library name, cell override, update flag. |
Public Functions
| Database importFile(path) const | New database from file. |
| Database importFileInto(db, path) const | Merge into existing database. |
| warnings(), errors() | Messages from last import. |
Detailed Description
Parsing uses room::xschem::readRecords / importRecords (xschem_io). Sets dbuPerEditorUnit = 1000 and SourceInfo with format = xschem. Schematic wires map to Net/Term; instances use Shape::Arc where applicable. See coordinate scale.
CLI: xschem_to_room — see Xschem example.
struct Options
| Member | Default | Description |
|---|---|---|
libName | "xschem" | Output library name. |
cellName | empty | Override cell name (else from filename). |
updateExisting | true | Replace cell when merging. |
Example
room::XschemImporter importer;
room::Database db = importer.importFile("test.sch");
db.saveToFile("test.schematic.room", room::ViewType::Schematic);