General Structure and Miscellaneous Utilities
File system hierarchy
High level annotated picture of KQCircuits repository’s different subdirectories:
KQCircuits Git repository root
│ └── python Salt package
│ ├── console_scripts
│ ├── drc Design Rule Checks
│ ├── kqcircuits PyPI package
│ │ ├── chips
│ │ ├── elements Basic Elements
│ │ └── ...
│ └── scripts
│ ├── macros
│ ├── masks
│ └── simulations
├── docs Documentation sources
├── tests Pytest files
│ ├── chips
│ ├── elements
│ ├── ...
├── util Utility scripts
In the KQCircuits root folder the most important folder for most users is the
klayout_package folder, which is also all that is included in the Salt
package. Other folders are mainly for automatic tests and documentation.
KQCircuits code is divided into the kqcircuits and
scripts folders in klayout_package/python.
These two folders are also (after installation process) linked as symbolic links
kqcircuits_scripts in the
kqcircuits folder contains all the KQCircuits PCell classes and many
other modules used by them or by scripts. Folders directly under
kqcircuits containing PCell classes correspond to different PCell
libraries such as elements, chips, or test structures.
scripts folder contains macros to be run in KLayout GUI and
scripts for generating simulation files or mask files. The files there are in
general not meant to be imported in other Python files. The outputs of
simulation or mask scripts can be found in the
tmp folder below the main
util folder contains stand alone, self documenting scripts for various practical use cases:
check_layer_propsCheck or update the layer properties file against values taken from KQCircuits’ default_layers variable.
create_element_from_pathCreate a KQCircuits element in KLayout by specifying the path to the file containing the element. This script can be used to integrate with external editors.
gdiffCompares a pair of .oas or .gds files or directories containing such files and informs you about differences.
netlist_as_graphDraw a graph based on a chip’s generated netlist file.
oas2dxfConvert .oas to .dxf or the other way around. DXF files are more human readable and may be edited with scripts.