|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
|
<html> |
|
|
<head> |
|
|
|
|
|
|
|
|
<meta name="Description" content="KLayout layout viewer and editor project page" /> |
|
|
<meta name="Keywords" content="KLayout OASIS GDS2 viewer editor layout semiconductor mask chip design" /> |
|
|
<meta name="abstract" content="KLayout is a free layout viewer and editor for several formats commonly used in the semiconductor industry to transfer layout data" /> |
|
|
<meta name="URL" content="https://www.klayout.de/" /> |
|
|
<meta name="Author" content="Matthias Koefferlein" /> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" /> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
|
|
|
|
<title>KLayout Layout Viewer And Editor</title> |
|
|
|
|
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.klayout.de/news.xml"/> |
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/format.css?v2.0"/> |
|
|
<link rel="shortcut icon" href="https://www.klayout.de/favicon.ico"/> |
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/fonts.css"/> |
|
|
|
|
|
|
|
|
<script src="https://www.klayout.de/jquery-3.4.1.min.js"></script> |
|
|
|
|
|
|
|
|
<link href="https://www.klayout.de/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
<script src="https://www.klayout.de/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<div class="klayout-header"> |
|
|
|
|
|
<div class="container mb-5"> |
|
|
|
|
|
<nav class="navbar navbar-dark navbar-expand-lg"> |
|
|
|
|
|
<a class="navbar-brand" href="https://www.klayout.de"><img src="https://www.klayout.de/klayout.png" srcset="https://www.klayout.de/klayout-x2.png 2x" alt="KLayout"></a> |
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbarToggleExternalContent"> |
|
|
|
|
|
<ul class="navbar-nav ml-auto mr-auto"> |
|
|
|
|
|
<li class="nav-item dropdown active mr-4"> |
|
|
<a class="nav-link dropdown-toggle klayout-menu" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
About |
|
|
</a> |
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/intro.html">KLayout Project</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/doc.html">Documentation</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/galleries.html">Galleries</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/credits.html">Credits</a> |
|
|
<div class="dropdown-divider"></div> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/contact.html">Contact</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/impressum.html">Impressum / Imprint</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/privacy_policy.html">Datenschutz / Privacy Policy</a> |
|
|
</div> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/build.html">Get KLayout</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://sami.klayout.org">Package Index</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-5"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/forum">Forum</a> |
|
|
</li> |
|
|
<li class="nav-item active"> |
|
|
<span class="nav-link klayout-menu"> |
|
|
<a href="https://f-si.org"><img src="https://www.klayout.de/f-si_logo_32h_w.png" border="0" title="Free Silicon Foundation" alt="F-Si"/></a> |
|
|
<a class="ml-4" href="https://github.com/KLayout"><img src="https://www.klayout.de/GitHub-Mark-32px-white.png" border="0" title="KLayout on GitHub" alt="GitHub"/></a> |
|
|
</span> |
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> |
|
|
<span class="navbar-toggler-icon"></span> |
|
|
</button> |
|
|
|
|
|
</nav> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="container"> |
|
|
|
|
|
<h1>RDB Format</h1> |
|
|
|
|
|
<p> |
|
|
This is a brief description of the report database format used by KLayout to represent the content of |
|
|
a report database. KLayout uses a report database to present results of checks or extraction operations. |
|
|
A report database can be viewed with the marker browser, available in the "Verification" menu. |
|
|
KLayout can import other report database formats. Writing is supported only in the format described here. |
|
|
This description covers the structure of the file. This structure closely matches the internal structure (for |
|
|
example accessible through RBA), and this document may be helpful to understand that internal API as well. |
|
|
</p> |
|
|
|
|
|
<h2>Basic structure</h2> |
|
|
|
|
|
<p> |
|
|
The suffix used by KLayout for report databases is ".lyrdb". The file format is XML representing the object |
|
|
structure of the report database. The root element is "report-database". This is an abbreviated sample file: |
|
|
</p> |
|
|
|
|
|
<pre> |
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
<report-database> |
|
|
<description>Diff of 'x.gds, Cell RINGO' vs. 'x.gds[1], Cell INV2'</description> |
|
|
<original-file/> |
|
|
<generator/> |
|
|
<top-cell>RINGO</top-cell> |
|
|
<tags> |
|
|
<tag> |
|
|
<name>red</name> |
|
|
<description>Red flag</description> |
|
|
</tag> |
|
|
... |
|
|
</tags> |
|
|
<categories> |
|
|
<category> |
|
|
<name>1/0</name> |
|
|
<description>Differences in layer 1/0</description> |
|
|
<categories> |
|
|
<category> |
|
|
<name>A</name> |
|
|
<description>Shapes in A but not in B, on Layer 1/0</description> |
|
|
</category> |
|
|
... |
|
|
</categories> |
|
|
</category> |
|
|
</categories> |
|
|
<cells> |
|
|
<cell> |
|
|
<name>RINGO</name> |
|
|
<variant>1</variant> |
|
|
<layout-name>RINGO$1</layout-name> |
|
|
<references> |
|
|
... |
|
|
</references> |
|
|
</cell> |
|
|
... |
|
|
</cells> |
|
|
<items> |
|
|
<item> |
|
|
<tags/> |
|
|
<category>'1/0'.A</category> |
|
|
<cell>RINGO:1</cell> |
|
|
<visited>true</visited> |
|
|
<multiplicity>1</multiplicity> |
|
|
<comment>A comment</comment> |
|
|
<image/> |
|
|
<values> |
|
|
<value>text: 'item: polygon'</value> |
|
|
<value>polygon: (1.4,1.8;-1.4,1.8;-1.4,3.8;1.4,3.8)</value> |
|
|
</values> |
|
|
</item> |
|
|
... |
|
|
</items> |
|
|
</report-database> |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
The components of a report database are: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>Items</b>: Items represent one basic element of the report. Usually an item represents a |
|
|
marker indicating a geometric entity with a shape. Items can also represent texts such |
|
|
as errors or warnings not related to geometry.<br/> |
|
|
Items carry information with a set of values. |
|
|
Values are the parts forming the information of an item. Currently, each item has an ordered |
|
|
list of values. KLayout does not make an assumption about the type or order of the values.<br/> |
|
|
Items can also be flagged with "tags" (see below) and have an image attached. Currently an |
|
|
image is a special property of the item, not part of the values. |
|
|
</li> |
|
|
<li><b>Values</b>: A value represents an information part of the database item. In the report database context, |
|
|
a value is a string encoding the type of the value and the actual value.</li> |
|
|
<li><b>Categories</b>: The report database defines a hierarchy of categories and sub-categories. Each database item is |
|
|
associated with a category or sub-category within that tree.</li> |
|
|
<li><b>Cells</b>: The report database also defines a hierarchy of cells. The cell hierarchy may be complete, i.e. |
|
|
a copy of a layout hierarchy or specify representative instances or no instances at all. |
|
|
Database items can be associated with a cell which allows KLayout to display a marker in the |
|
|
context of a certain cell.<br/> |
|
|
KLayout supports cell variants. A cell is not only identified with a name by may also |
|
|
carry a variant identifier. An item can be associated with a particular variant of a cell |
|
|
if necessary.</li> |
|
|
<li><b>Tags</b>: Tags are basically flags that can be attached to database items. KLayout uses tags to |
|
|
mark items as "waived" or "important".</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
The following figure shows how the marker databases' objects are related with elements of the marker browser dialog: |
|
|
</p> |
|
|
|
|
|
<img src="marker_browser_snapshot_annot.png"/> |
|
|
|
|
|
<h2>Detailed description</h2> |
|
|
|
|
|
<p> |
|
|
The marker databases' structure is conveniently described with a UML class diagram. It shows the objects of |
|
|
the database and their relationship. Aggregation in XML is implemented by including the object in the XML, association |
|
|
is implemented with an element carrying a suitable reference string. In the class diagram, some container classes |
|
|
appear (i.e. "Cells") which represent a list of individual objects (in that case "Cell"). They are present to |
|
|
match the XML structure, which uses an enclosing element around the list (in that example "<cells>...</cells>"). |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The attribute names in the UML class diagram match the XML element names where the underscore is replaced by the hyphen |
|
|
(i.e. attribute "top_cell" is represented in XML as "top-cell"). This convention is a tribute to the usual XML |
|
|
convention which contrasts with the attribute names used in the code. |
|
|
</p> |
|
|
|
|
|
<img src="rdb_uml.svg" width="100%"/> |
|
|
|
|
|
<p> |
|
|
The following is a detailed description of some classes and important attributes. As a general rule, the marker |
|
|
database uses micron units. It is independent of the layout database unit. |
|
|
</p> |
|
|
|
|
|
<h3>Class "Database" (element "report-database")</h3> |
|
|
|
|
|
<p> |
|
|
This is the root element of the XML file and the object representing the whole database. It has the following |
|
|
attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>description</b>: A general description text shown in the marker database browser for that database.</li> |
|
|
<li><b>original-file</b>: (optional) The file from which the report was generated.</li> |
|
|
<li><b>generator</b>: (optional) A string describing information about the module that generated the report database. |
|
|
It is intended to formalize the generator information so it is possible to re-run a reporting tool.</li> |
|
|
<li><b>top-cell</b>: The name of the top cell in the layout from which the report was created from.</li> |
|
|
<li><b>tags</b>: A list of Tag objects (child elements "tag") declaring the tag identifiers available.</li> |
|
|
<li><b>cells</b>: A list of Cell objects (child elements "cell") declaring the cells, optionally specifying a partial or complete hierarchy in the form of a cell graph.</li> |
|
|
<li><b>category</b>: A list of Category objects (child elements "category") declaring the first level of categories.</li> |
|
|
</ul> |
|
|
|
|
|
<h3>Class "Category" (element "category")</h3> |
|
|
|
|
|
<p> |
|
|
A Category object specifies one category and optional sub-categories forming a branch in the tree of categories. |
|
|
It has the following attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>name</b>: An arbitrary string identifying a category in a "category path" (see "Item" class). |
|
|
The name is also shown in the category tree. A category name must be unique in the |
|
|
context of the category list (not across the category hierarchy).</li> |
|
|
<li><b>description</b>: A description string shown in the title of the item panel.</li> |
|
|
<li><b>sub-categories</b>: An optional list of child categories (further Category objects).</li> |
|
|
</ul> |
|
|
|
|
|
<h3>Class "Tag" (element "tag")</h3> |
|
|
|
|
|
<p> |
|
|
A Tag object declares a tag for the items. |
|
|
It has the following attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>name</b>: An arbitrary string identifying a tag in item's tag list. The tag name must be unique in the context of the database.</li> |
|
|
<li><b>description</b>: An optional description string.</li> |
|
|
</ul> |
|
|
|
|
|
<h3>Class "Cell" (element "cell")</h3> |
|
|
|
|
|
<p> |
|
|
A Cell object declares a cell and optionally the cell's relationship, hence forming a cell graph. |
|
|
It has the following attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>name</b>: An arbitrary string identifying the cell. The cell name is matched against cell names in |
|
|
the layout when displaying geometrical markers to locate the marker in the layout. The |
|
|
instantiation information is used to locate the marker in the top-level context if the |
|
|
specific cell is not available. A geometrical marker is always specified in the context |
|
|
of the cell it refers to.</li> |
|
|
<li><b>variant</b>: An arbitrary string identifying the variant of the cell.</li> |
|
|
<li><b>references</b>: An list of Reference objects which specifies from which cells and how this cell is instantiated.</li> |
|
|
<li><b>layout-name</b>: (since version 0.29.1) If present and non-empty, the name of the layout cell corresponding to the variant.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
<b>Hint: </b> if a cell exists with an empty name, it is displayed as "All cells". All items which are not associated |
|
|
with a cell (i.e. global warning messages), can be associated with this special cell by specifying an empty |
|
|
cell name for that item. |
|
|
</p> |
|
|
|
|
|
<h3>Class "Reference" (element "reference")</h3> |
|
|
|
|
|
<p> |
|
|
A Reference object represents a cell reference and states parent cell and transformation. |
|
|
It has the following attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>parent</b>: The parent cell name. If multiple variants exist for a cell, this must be a qualified name: the cell name, a colon and the variant id (for example "A:1").</li> |
|
|
<li><b>trans</b>: The transformation by which this cell's content is transformed into the parent cell (??? correct?). |
|
|
The transformation is specified in KLayout's transformation notation.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
The transformation specification follows the standard notation in KLayout (see <a href="transformations.html">Transformations in KLayout</a>). |
|
|
For example, "r90 *1 17.5,-25" describes a rotation by 90 degree (in the mathematical sense), no scaling and a displacement of |
|
|
17.5 micron in x-direction and -25 micron in y direction. Since "*1" is the default, this is equivalent to "r90 17.5,-25". |
|
|
Also, the order of the parts is not important, so "17.5,-25 r90" gives the same results. |
|
|
</p> |
|
|
|
|
|
<h3>Class "Item" (element "item")</h3> |
|
|
|
|
|
<p> |
|
|
Items are the basic elements of the report database. |
|
|
An Item class has the following attributes (the XML element names are shown): |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li><b>tags</b>: A comma-separated list of tag names attached to this item.</li> |
|
|
<li><b>category</b>: A category path describing the category this item is attached to. A category path |
|
|
is a list of category names joined with dots. For example "A.B" is the "B" sub-category |
|
|
of the "A" category. The category path notation allows to quote category names by |
|
|
single or double quotes so that category names can also contain dots.</li> |
|
|
<li><b>cell</b>: The cell that this item is associated with. The cell name can be empty indicating that |
|
|
the item is not associated with a specific cell. In that case, the item is listed under "All cells". Currently, in that case a |
|
|
dummy cell declaration is required that declares a cell without a name (see "Cell" class).<br/> |
|
|
The cell name is a "qualified name". That means it consists of a cell name, optionally followed by a colon and the variant string. |
|
|
For example, "A:1" is the "1" variant of the "A" cell. This specification is only required if |
|
|
there are cell variants. |
|
|
</li> |
|
|
<li><b>visited</b>: A value indicating whether the item has been visited already ("true" or "false").</li> |
|
|
<li><b>multiplicity</b>: This value specifies if an item represents multiple actual instances of an item. This value can be used to compute |
|
|
total number of markers within a category for example. The value can be necessary if for example |
|
|
the cell given by the "cell" attribute has just one reference instantiation but in reality |
|
|
represents a large number of actual instances. By specifying the multiplicity, the item |
|
|
is given the appropriate weight.</li> |
|
|
<li><b>comment</b>: (since version 0.29.1) A user comment attached to the item.</li> |
|
|
<li><b>image</b>: An optional image attached to the item. This string is a text representation of a image file |
|
|
in one of the standard formats supported by KLayout (preferred format is PNG) in base64 encoding.</li> |
|
|
<li><b>values</b>: The list of values for this item.</li> |
|
|
</ul> |
|
|
|
|
|
<h3>Class "Value" (element "value")</h3> |
|
|
|
|
|
<p> |
|
|
A value is not class for it's own, although in the code, values are represented by specific classes. |
|
|
In the report database, a value is simply a string representing various types of values. The general format |
|
|
is a type code, followed by a colon and a specific value string. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If a value represents a geometrical object, the coordinates are given in micron units and the object is |
|
|
located inside the associated cell and is transformed by the marker browser into the currently active cell using the reference information |
|
|
derived from the database or the current layout. This implies that all values with geometric interpretation must be |
|
|
associated with a cell. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Currently these value formats are supported: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>"<b>text: </b><text>": A message text (no geometry).</li> |
|
|
<li>"<b>box: (</b><x1><b>,</b><y1><b>;</b><x2><b>,</b><y2><b>)</b>": A box (geometrical object).</li> |
|
|
<li>"<b>edge: (</b><x1><b>,</b><y1><b>;</b><x2><b>,</b><y2><b>)</b>": An edge (geometrical object).</li> |
|
|
<li>"<b>polygon: (</b><x><b>,</b><y><b>;</b>...<b>)</b>": A polygon (geometrical object). The points in brackets form the polygons' outline.<br/> |
|
|
"<b>polygon: (</b><x><b>,</b><y><b>;</b>...<b>/</b><x><b>,</b><y><b>;</b>...<b>/</b>...<b>)</b>": A polygon with holes. The points in brackets before the slash form the polygons' outline, the point sequences after the slash form the hole contours. Each slash enters a new hole. |
|
|
</li> |
|
|
<li>"<b>label: ('</b><text><b>',</b><trans><b>)</b>": A text (geometrical object). "trans" is the text transformation in KLayout's transformation notation.</li> |
|
|
<li>"<b>path: (</b><x><b>,</b><y><b>;</b>...<b>) w=</b><width><b> bx=</b><begin-ext><b> ex=</b><end-ext><b> r=</b><round-flag>": A path (geometrical object). The points in brackets form the path's center line. "ex" and "bx" specify begin and end extension, "w" specifies the width and "r" is "true", if the path has round ends.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
The value string of the geometrical objects is derived from KLayout's string representation which |
|
|
can be created within RBA with the "to_s" method for example. |
|
|
</p> |
|
|
|
|
|
|
|
|
</div> |
|
|
</body> |
|
|
</html> |
|
|
|
|
|
|