Cadence Skill 论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3006|回复: 2

询问修改叠构里的参数语法

[复制链接]
发表于 2024-4-12 10:19:00 | 显示全部楼层 |阅读模式
开发手册中只有纪载这个函数,但这函数只能增叠构不能改参数

  1. axlLayerCreateCrossSection()
复制代码


-> 而以下语法虽能改参数 但效率挺差的

  1. xsec_list = axlGetXSection();获取所有叠构资讯list

  2. ;--- 针对list内容修改 ---
  3. (略过)
  4. ;----------

  5. _fpBioImportXSection(xsec_list_new) ;把叠构重写回去
复制代码


想问版上的大佬们是否有更高效的语法
 楼主| 发表于 2024-4-12 14:09:07 | 显示全部楼层
自己找到Bug了 給有需要的大佬參考

原本是這樣,Layer有設PLANE Type但原先我只設CONDUCTOR Type,
導致寫回疊構時遇到PLANE Type會有Bug

if(Layer_Function == "CONDUCTOR" then ... )


  1. xsec_list = axlGetXSection()
  2. xsec_list_new = nil

  3. foreach(s_xsec xsec_list

  4. Layer_name = nth(0 s_xsec)
  5. Layer_Function = nth(1 s_xsec)
  6. Layer_Th_Val = nth(3 s_xsec)

  7. when(Layer_Th_Val == "0 mil"
  8. Layer_Th_Val = "3.90 mil"
  9. )


  10. if(Layer_Function == "SURFACE" then
  11. xsec_list_new = cons(s_xsec xsec_list_new)
  12. )

  13. if(Layer_Function == "DIELECTRIC" then
  14. xsec_list_new = cons(list("" "DIELECTRIC" "FR-4" Layer_Th_Val "0 w/cm-degC" "0 mho/cm" "4.200000" nil nil "0.02" "" nil nil nil "0.000000")  xsec_list_new)
  15. )

  16. if(Layer_Function == "CONDUCTOR" then
  17. xsec_list_new = cons(list(Layer_name "CONDUCTOR" "COPPER" Layer_Th_Val "0 w/cm-degC" "595900 mho/cm" "4.200000" nil nil "0.02" "" "4.200000" "0.02" nil "90.000000") xsec_list_new)
  18. )

  19. )

  20. xsec_list_new = reverse(xsec_list_new) ;反轉整個list

  21. _fpBioImportXSection(xsec_list_new)
复制代码



修正過後如下

if(Layer_Function == "CONDUCTOR" || Layer_Function == "PLANE" then ...)

  1. xsec_list = axlGetXSection()
  2. xsec_list_new = nil

  3. foreach(s_xsec xsec_list

  4. Layer_name = nth(0 s_xsec)
  5. Layer_Function = nth(1 s_xsec)
  6. Layer_Th_Val = nth(3 s_xsec)

  7. when(Layer_Th_Val == "0 mil"
  8. Layer_Th_Val = "3.90 mil"
  9. )


  10. if(Layer_Function == "SURFACE" then
  11. xsec_list_new = cons(s_xsec xsec_list_new)
  12. )

  13. if(Layer_Function == "DIELECTRIC" then
  14. xsec_list_new = cons(list("" "DIELECTRIC" "FR-4" Layer_Th_Val "0 w/cm-degC" "0 mho/cm" "4.200000" nil nil "0.02" "" nil nil nil "0.000000")  xsec_list_new)
  15. )

  16. if(Layer_Function == "CONDUCTOR" || Layer_Function == "PLANE" then
  17. xsec_list_new = cons(list(Layer_name "CONDUCTOR" "COPPER" Layer_Th_Val "0 w/cm-degC" "595900 mho/cm" "4.200000" nil nil "0.02" "" "4.200000" "0.02" nil "90.000000") xsec_list_new)
  18. )

  19. )

  20. xsec_list_new = reverse(xsec_list_new) ;反轉整個list

  21. _fpBioImportXSection(xsec_list_new)
复制代码



有62層CONDUCTOR 原先要耗時7分鐘,修正後目前只需13秒
发表于 2024-5-8 11:47:34 | 显示全部楼层
历害,学习一下
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号 )

GMT+8, 2024-11-23 19:34 , Processed in 0.122059 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表