bbFlexWrapper
Define Flex-wrapper.The BB's flex-wrapper is used for standardizing the port names (mask::setLayoutPort()) so we can use them consistently in the bus-routers, back-annotation of layouts back into schematic (for pose-layout simulation).
Structure
The attributes and elements are shown below, in a sorted per type fashion.In case a list is printed after an element, it indicates that you can have many, otherwise it should be a single element. With a optional it tells the element is not required.
<bbFlexWrapper pathLength="..." reverseName="..." ... > ...
<sptFooter> ... </sptFooter> optional
<sptHeader> ... </sptHeader> optional
</bbFlexWrapper>
XSD The schema file can be downloaded or viewed at xPDK_OptoDesigner.
Details
pathLength
If used, it will drop the equation below the layout_extends() and before the sptFooter() as athis{"centerPathLength"}=..
reverseName
Use if you want the in/out swapped BB also; this is typical for waveguide transitions.sptFooter
Code after the layout_extends(), before mask::port2layout() Type sptFooter documentation: This section will be put at the end of a definition via XSLT.Tech/02 definition
This section is copied into the '02' file just before the function export()The typical use is for backward compatability (for example mapping older mcs names) or some custom tech functions that need access to most of the tech-file.
Using this element instead of the TechFooter is easier in case of enriching the design kit via the C++ or Python library.
pdaSingleLayerOPS
This section is copied into the '02' file below the (gds/mcs) layer definitions in the single-layer operation block. It is intended for more complex single/multi layer derived operations or DRC.Download the xsl/xml/xsd's and run the (bash) command line below to convert the XML to a SPT example in OptoDesigner (see short docu):
xsltproc --xinclude -stringparam standalone true -stringparam example drc0 xPDK_toOptoDesigner02.xsl layer_singleSpt.xml
full file
<gds_datatype>0</gds_datatype>
<grid>0.001</grid>
<purpose>Waveguide layer</purpose>
<color R="100" G="200" B="255"/>
<visible>true</visible>
<fillstyle>NOFILL</fillstyle>
<linestyle>fill</linestyle>
</layer>
<layer name="layer2">
<gds_number>2</gds_number>
<gds_datatype>0</gds_datatype>
<grid>0.001</grid>
<purpose>Waveguide layer</purpose>
<color R="255" G="20" B="20"/>
<visible>true</visible>
<fillstyle>NOFILL</fillstyle>
<linestyle>fill</linestyle>
<od:sptFooter>
// println("hi");
</od:sptFooter>
</layer>
Spt:
xsection
This section is copied into the '02' file below the mcs definition and is intended for more complex properties like waveguide models and so on.It provides also for less common mcsSet*() functions or feeding them with values that xPDK does not support.
</doc>
<xsection name="WG">
<od:sptHeader>// This section does some special OptoDesigner things.
mcsSetCurveCheck();
mcsSetAltWG("WGhigh","WGlow");
</od:sptHeader>
</xsection>
BB definition
This section is copied into the '04' file inside the layout definition and is intended for fine-tuning behavior, giving control over returned attributes and so on. In typical cases it is not needed.Use this field in case the xPDK format does not have all the fields you need for your BB in OptoDesigner. For example this is possible for returning more layout attributes or supporting more complex design rule checking.
<bb name="myBB">
<port label="in0">
<position>
<x>0</x>
</position>
</port>
<od:sptFooter>
ml::Straight(cin-> this@in0:wfix(1),20) elm;
this{"elm"}=elm;
this{"L"}=20;
</od:sptFooter>
</bb>
BB boundary
This section is copied into the '04' file into the layout itself and can be used to mark up complex boundaries. Also the use of multiple mcs/gds layers for DRC can be simpler this way.Instead of using spt, you can also use the xsection for typical cases and reduce vendor dependence for this section.
</doc>
<bb name="myBB">
<port label="in0">
<position>
<x>0</x>
</position>
</port>
<boundary>
<od:sptHeader>
ml::Straight(cin-> this@in0 : wopar(1,3),20);
</od:sptHeader>
</boundary>
</bb>