本文主要是介绍luceda ipkiss教程 42:获取版图所有的电端口,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
通过判断版图端口的domain.name,可以知道端口是电端口还是光端口:
如:
可以通过如下代码获取两个电端口(anode和cathode)的信息:
from si_fab import all as pdkdef get_electrical_ports(layout):ports = layout.portselectrical_ports = []for port in ports:if port.domain.__name__ == 'ElectricalDomain':electrical_ports.append(port)return electrical_portsphase_shfter = pdk.PhaseShifterWaveguide()
phase_shfter_lv = phase_shfter.Layout()
phase_shfter_lv.visualize(annotate=True)
electrical_ports = get_electrical_ports(phase_shfter_lv)
for x, port in enumerate(electrical_ports):print("The name of electrical port_{} is: {}".format(x, port.name))print("The position of electrical port_{} is: {}".format(x, port.position))print("The angle of electrical port_{} is: {}".format(x, port.angle))print("The layer of electrical port_{} is: {}".format(x, port.layer))print("The trace template of electrical port_{} is: {}".format(x, port.trace_template.name))
得到所有电端口electrical_ports 后,就可以输入端口名称、端口位置、端口角度、端口图层、端口迹线横截面等信息:
这篇关于luceda ipkiss教程 42:获取版图所有的电端口的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!