名词解释
IPKISS 中以下两种类型的文本 TEXT:
- PolygonText:在给定图层的掩模版上绘制 TEXT,该文本信息会出现在加工完成的芯片上。
- Label:用于在版图中标记、查看各个端口的信息,可以为其指定一个没有实际加工过程的图层。简单来说,就是这个文本信息不会出现在最终的芯片上。
代码举例
1. i3.PolygonText
因为 TEXT 是一个元素(更多信息可见官网技术文档 Elements),所以需要添加在 i3.PCell - Layout - generate_elements() 这个函数下。我们以这个多边形举例:
import si_fab.all as pdk
import ipkiss3.all as i3
class Enterprise(i3.PCell):
class Layout(i3.LayoutView):
def _generate_elements(self, elems):
coordinates = i3.Shape([(-179, 54), (101, 54), (101, 149), (59, 149), (-11, 172), (-39, 209),
(-11, 246), (59, 268), (696, 268), (768, 246), (795, 209), (768, 172),
(696, 149), (147, 149), (147, 54), (186, 54), (238, 31), (258, -5),
(238, -42), (186, -65), (147, -65), (147, -139), (696, -139),
(768, -161), (795, -198), (768, -235), (696, -258), (59, -258),
(-11, -235), (-39, -198), (-11, -161), (59, -139), (101, -139),
(101, -65), (-179, -65), (-179, -100), (-297, -262), (-487, -323),
(-678, -262), (-795, -100), (-795, 100), (-678, 262), (-487, 323),
(-297, 262), (-179, 100)],
closed=True
)
coordinates.magnify((0.0, 0.0), 0.1)
coordinates.rotate((0.0, 0.0), -45.0)
coordinates.move((100, 0))
elems += i3.Boundary(layer=i3.TECH.PPLAYER.SI, shape=coordinates)
elems += i3.PolygonText(layer=i3.TECH.PPLAYER.TEXT,
coordinate=(70.0, 100.0),
text="Welcome to the Enterprise",
alignment=(i3.TEXT.ALIGN.CENTER, i3.TEXT.ALIGN.TOP),
font=i3.TEXT.FONT.DEFAULT,
height=8,
transformation=i3.Rotation((0.0, 0.0), 5.0))
return elems
layout = Enterprise().Layout()
layout.visualize(annotate=True)
layout.write_gdsii("layout_with_PolygonText.gds")
注:PolygonText 元素中有几个可以调整的参数,如文本放置的坐标、坐标的对齐方式(水平和垂直)、要使用的字体和字体高度。在这个例子中,我们还将文本旋转了 5 度。
将 PCell 可视化及输出 GDS Ⅱ 版图:
2. i3.Label
使用方法及可调的参数与 PolygonText 同理:
import si_fab.all as pdk
import ipkiss3.all as i3
class Enterprise(i3.PCell):
class Layout(i3.LayoutView):
def _generate_elements(self, elems):
coordinates = i3.Shape([(-179, 54), (101, 54), (101, 149), (59, 149), (-11, 172), (-39, 209),
(-11, 246), (59, 268), (696, 268), (768, 246), (795, 209), (768, 172),
(696, 149), (147, 149), (147, 54), (186, 54), (238, 31), (258, -5),
(238, -42), (186, -65), (147, -65), (147, -139), (696, -139),
(768, -161), (795, -198), (768, -235), (696, -258), (59, -258),
(-11, -235), (-39, -198), (-11, -161), (59, -139), (101, -139),
(101, -65), (-179, -65), (-179, -100), (-297, -262), (-487, -323),
(-678, -262), (-795, -100), (-795, 100), (-678, 262), (-487, 323),
(-297, 262), (-179, 100)],
closed=True
)
coordinates.magnify((0.0, 0.0), 0.1)
coordinates.rotate((0.0, 0.0), -45.0)
coordinates.move((100, 0))
elems += i3.Boundary(layer=i3.TECH.PPLAYER.SI, shape=coordinates)
elems += i3.Label(text="port1",
layer=i3.TECH.PPLAYER.DOC,
height=20,
coordinate=(42.724, 11.597))
return elems
layout = Enterprise().Layout()
layout.visualize(annotate=True)
layout.write_gdsii("layout_with_label.gds")
将 PCell 可视化及输出 GDS Ⅱ 版图后,可以看到文本 "port1" 的位置,在 GDSⅡ 文件中也有对应的图层: