xbei86的个人空间 https://blog.eetop.cn/?1796328 [收藏] [复制] [分享] [RSS]

日志

EditVia51.il

已有 18 次阅读| 2023-11-6 16:50 |系统分类:芯片设计

/*
    Function:	"Ctrl" or "Shift" + mouse wheel to modify the horizontal or vertical number of through holes(via)

    Instructions:
		1.In the CIW window, load this il file
		2.In the layout window, after selecting via, hold down "Ctrl" or "Shift" and slide the mouse wheel

    Note:
	    When selecting via, you may accidentally select other devices.
	    This script only modifies via parameters, not other device parameters.
*/

procedure(EditVia(dir num)
    let((instList viaList rotation org)	    
	instList=geGetSelSet()
	viaList=setof(obj instList obj~>objType=="inst")
	rotation=list("R90" "R270" "MYR90" "MXR90")
	foreach(via viaList
	    when(dir==1
		if(member(via~>orient rotation)==nil then
		    org=via~>row
		    if(org!=1 || num!=-1 then via~>row=apply('plus list(org num)));end if
		else
		    org=via~>column
		    if(org!=1 || num!=-1 then via~>column=apply('plus list(org num)));end if
		);end if
	    );end when
	    when(dir==2
		if(member(via~>orient rotation)==nil then
		    org=via~>column
		    if(org!=1 || num!=-1 then via~>column=apply('plus list(org num)));end if
		else
		    org=via~>row
		    if(org!=1 || num!=-1 then via~>row=apply('plus list(org num)));end if
		);end if
	    );end when
	);end foreach
    );end let
);end procedure


hiSetBindKeys("Layout" list(
    list("Shift<Btn4Down>" "EditVia(1 1)")
    list("Shift<Btn5Down>" "EditVia(1 -1)")
    list("Ctrl<Btn4Down>" "EditVia(2 1)")
    list("Ctrl<Btn5Down>" "EditVia(2 -1)")
    )
)

用途:用在IC51的环境下,修改via的row和column

用法:在CIW窗口load EditVia_51.il脚本,然后用绑定的快捷键调用。(Shift+鼠标滚轮上下是改row,ctrl+鼠标滚轮上下是改column)

有个小问题是IC51环境下用o创建的via的属性属于inst,如果row和column都设为1,这时候创建出来的via没有row和column这两个属性(不知道为什么,也访问不到row和column的值),只有把row或column手动改为2及以上时,才会具备row或column这个属性(两个属性彼此独立,只要没手动改就不具备这个属性,怪得很)。


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 3

    关注
  • 0

    粉丝
  • 0

    好友
  • 0

    获赞
  • 0

    评论
  • 20

    访问数
关闭

站长推荐 上一条 /3 下一条


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

GMT+8, 2025-9-6 03:09 , Processed in 0.012101 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部