KiCad PCB EDA Suite
Loading...
Searching...
No Matches
Hierarchical Schematics

KiCad supports nesting schematics hierarchically to simplify the creation of complex schematics designs.

KiCad supports nesting schematics hierarchically to simplify the creation of complex schematics designs.

A hierarchical schematic uses hierarchical sheets (SCH_SHEET objects) to reference a given schematic file (SCH_SCREEN objects). Each SCH_SHEET corresponds to a schematic file handled by a SCH_SCREEN object. A SCH_SCREEN object contains schematic drawings and has a filename to read/write its data.

In simple hierarchies one SCH_SHEET object is linked to one SCH_SCREEN object.

In complex hierarchies the a SCH_SCREEN object shared by more than one SCH_SHEET object. Therefore all sub-sheets can also be shared. So the same SCH_SCREEN must handle different symbol references and unit selections depending on which sheet is currently selected, and how a given subsheet is selected. SCH_SHEET objects share the same SCH_SCREEN object if they have the same schematic file.

In KiCad each SCH_SYMBOL and SCH_SHEET receives a UUID when created. These UUIDs are chained together to form SCH_SHEET_PATH objects that allow access of instance data in the hierarchy. The sheet paths have the form /ROOT_SHEET_UUID/SHEET_UUID/SUB_SHEET_UUID/...

For a given SCH_SCREEN SCH_SHEET_PATH objects must: 1) Handle all SCH_SYMBOL references and unit instance data. 2) Handle all SCH_SHEET page number instance data. 2) Update the currently displayed sheet SCH_SYMBOL references and SCH_SHEET page numbers.

The class SCH_SHEET_PATH handles paths used to access a sheet. The class SCH_SHEET_LIST allows one to handle the full (or partial) list of sheets and their paths in a complex hierarchy. The class SCH_SCREENS allows one to handle a list of SCH_SCREEN objects. It is useful to clear or save data, but is not suitable to handle the full complex hierarchy possibilities (usable in flat and simple hierarchies).