在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 879|回复: 7

[求助] 如何提取版图中所有cell4个点坐标?

[复制链接]
发表于 2025-3-18 14:53:46 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
如何提取版图中所有cell4个点坐标? 用skill写函数还是有candence有自带的工具 麻烦告知
发表于 2025-3-18 15:34:48 | 显示全部楼层
你这种只能skill最方便了
 楼主| 发表于 2025-3-18 16:54:00 | 显示全部楼层


   
Quinn714 发表于 2025-3-18 15:34
你这种只能skill最方便了


skill函数该怎么写? 谢谢
发表于 2025-3-18 17:43:55 | 显示全部楼层


   
冯阳阳 发表于 2025-3-18 16:54
skill函数该怎么写? 谢谢


用skill语言和cadence提供的函数,选中窗口的cell,每个cell的坐标在参数信息里,用skill筛出来,大致思路这样,具体功能实现,你自己会skill的话,不难
发表于 2025-3-18 17:49:07 | 显示全部楼层
geGetSelSet()~>BBox可以查选中的,自动化的还需要写脚本完成
发表于 2025-3-18 17:49:56 | 显示全部楼层
geGetSelSet()~>BBox可以查选中的,自动化的还需要写脚本完成
1111.png
发表于 2025-3-19 16:42:21 | 显示全部楼层
/*-----------------------------------------------------------*
* 脚本功能:导出当前CellView中所有Instance的四个角点坐标       *
* 使用说明:在Virtuoso CIW中加载并执行此脚本                 *
*-----------------------------------------------------------*/

procedure(GetAllInstanceCoordinates()
    let((cv instances outfile)
        ; 获取当前打开的CellView
        cv = geGetEditCellView()
        unless(cv
            error("Error: No CellView is opened!")
            return()
        )

        ; 创建输出文件
        outfile = outfile("./instance_coordinates.txt" "w")
        unless(outfile
            error("Error: Failed to create output file!")
            return()
        )

        ; 遍历所有Instance
        instances = cv~>instances
        foreach(instance instances
            ; 获取Instance的边界框(已考虑旋转/镜像后的坐标)
            bBox = instance~>bBox
            x1 = bBox~>x1
            y1 = bBox~>y1
            x2 = bBox~>x2
            y2 = bBox~>y2

            ; 计算四个角点坐标
            lowerLeft  = list(x1 y1)  ; 左下角
            lowerRight = list(x2 y1)  ; 右下角
            upperRight = list(x2 y2)  ; 右上角
            upperLeft  = list(x1 y2)  ; 左上角

            ; 写入文件(可选:单位转换)
            fprintf(outfile "Instance Name: %s\n" instance~>name)
            fprintf(outfile "Master Cell: %s\n"   instance~>cellName)
            fprintf(outfile "Lower Left  : %7.4f, %7.4f\n" x1 y1)
            fprintf(outfile "Lower Right : %7.4f, %7.4f\n" x2 y1)
            fprintf(outfile "Upper Right : %7.4f, %7.4f\n" x2 y2)
            fprintf(outfile "Upper Left  : %7.4f, %7.4f\n\n" x1 y2)
        )

        ; 关闭文件
        close(outfile)
        printf("坐标已导出至:./instance_coordinates.txt\n")
    )
)

; 执行函数
GetAllInstanceCoordinates()
 楼主| 发表于 2025-4-1 10:07:55 | 显示全部楼层


   
manfengxue 发表于 2025-3-19 16:42
/*-----------------------------------------------------------*
* 脚本功能:导出当前CellView中所有In ...


谢谢大佬
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-5-28 18:30 , Processed in 0.139377 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表