当前位置: 首页 > news >正文

LUCEDA IPKISS Tutorial 77:在版图一定范围内填充dummy

案例分享:在给定的Shape内填充dummy
在这里插入图片描述
所有代码如下:

from si_fab import all as pdk
from ipkiss3 import all as i3
from shapely.geometry import Polygon, MultiPolygon
import numpy as np
import matplotlib.pyplot as pltclass CellFilledWithContacts(i3.PCell):contact_size = i3.PositiveNumberProperty(default=1.5, doc="width and height of the contact box")contact_pitch = i3.PositiveNumberProperty(default=2, doc="contact pitch")class Layout(i3.LayoutView):def _generate_elements(self, elems):elems += i3.Boundary(layer=i3.TECH.PPLAYER.SI,shape=[(0, 0), (7.7, -23.7),(32.6, -23.7), (12.4, -38.4),(20.1, -62.1), (0, -47.4),(-20.1, -62.1), (-12.4, -38.4),(-32.6, -23.7), (-7.7, -23.7)])s = elems.size_info()polygons = [Polygon(el.shape) for el in elems]region = MultiPolygon(polygons).buffer(-2.0)plt.show()no_of_contacts_row = int((s.east - s.west - self.contact_pitch) / self.contact_pitch)no_of_contacts_col = int((s.north - s.south - self.contact_pitch) / self.contact_pitch)print('number of contacts in each row of along the whole cell =', no_of_contacts_row)print('number of contacts in each column of along the whole cell =', no_of_contacts_col)contact_regions = []# set the x and y coordinates for each contact via a for-loopfor cnt, i in enumerate(np.linspace(s.west, s.east, no_of_contacts_row)):for cn, j in enumerate(np.linspace(s.north, s.south, no_of_contacts_col)):contact = i3.Rectangle(layer=i3.TECH.PPLAYER.SI,center=(i, j),box_size=(self.contact_size, self.contact_size))contact_region = Polygon(contact.shape)contact_regions.append(contact_region)# only add the contacts when they are not in the cellif contact_region.intersects(region):elems += contactreturn elemsif __name__ == '__main__':lay = CellFilledWithContacts().Layout()lay.write_gdsii("demo.gds")

dummy的大小可以调节:

    contact_size = i3.PositiveNumberProperty(default=1.5, doc="width and height of the contact box")contact_pitch = i3.PositiveNumberProperty(default=2, doc="contact pitch")

可以通过:

shape=[(0, 0), (7.7, -23.7),(32.6, -23.7), (12.4, -38.4),(20.1, -62.1), (0, -47.4),(-20.1, -62.1), (-12.4, -38.4),(-32.6, -23.7), (-7.7, -23.7)]

来调节shape

http://www.lryc.cn/news/458412.html

相关文章:

  • TON生态小游戏开发:推广、经济模型与UI设计的建设指南
  • Python 量子机器学习:基础概念、关键算法与应用实践
  • 信息安全数学基础(29) x^2 + y^2 = p
  • ChatGPT国内中文版镜像网站整理合集(2024/10/06)
  • 图文深入理解Oracle DB Scheduler
  • gin如何具体利用Server-Send-Events(SSE)实时推送技术实现消息推送
  • 写端口-tcp udp不同方式发包和接包
  • 计算机的错误计算(一百二十)
  • Spring Boot 中使用 JSON Schema 来校验复杂 JSON 数据
  • QT实现Opencv图像处理
  • 刚转Mac的新手如何卸载不需要的应用程序
  • Unity 3d 继承MonoBahaviour的单例
  • grafana version 11.1.0 设置Y轴刻度为1
  • Elasticsearch的安装与配置
  • win0删除 Windows.old
  • 常见IDE及其编译器的讲解
  • 用SQLyog连接mysql提示2058错误
  • Web集群服务-Nginx
  • 获取时隔半个钟的三天
  • 构建可以ssh连接的容器镜像
  • 数据库中JOIN的用法?
  • java项目之纺织品企业财务管理系统源码(springboot+vue+mysql)
  • C语言 编程练习:解决五个有趣的问题
  • 二、安装vmtools
  • 用echarts画天气预报
  • 如果要存IP地址,用什么数据类型比较好?(java)
  • LinkedList源码解读
  • springboot feign-httpclient 连接池配置
  • 电汽车充电革命:充电桩的过去现在与未来
  • windows server 2019中安装.net framework 3.5功能出错