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

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4780|回复: 6

[求助] hierarchy 修改cdf参数

[复制链接]
发表于 2018-5-9 15:32:24 | 显示全部楼层 |阅读模式
100资产
本帖最后由 以真2012 于 2018-5-9 15:34 编辑

请教如何hierarchy 修改cdf参数,本人目前只会针对某个library下的cell批量修改参数
.procedure( CCSchangeParam( libname cellname viewname findInstCellName paramName newValue "tttttg")
let( (cv)
   cv = dbOpenCellViewByType(libname cellname viewname nil "a")
   ; find instance param
   foreach(inst cv~>instances
      if( inst~>cellName == findInstCellName
      then
     printf("Inst %s  %s\n" inst~>name inst~>cellName)
     foreach(param cdfGetInstCDF(inst)~>parameters
        if( param~>name == paramName
        then
          printf("           %s [old]: %L\n" param~>name param~>value)
          param~>value = newValue
          printf("           %s [new]: %L\n" param~>name param~>value)
        );if
     ) ;foreach
      );if
   );foreach
   dbSave(cv)
   dbClose(cv)
) ;let
); end procedure CCSchangeParam

上述可以实现cell批量修改参数,请问下如何hierarchy修改参数
是修改为cv = dbOpenHier()嘛?这个函数试了几遍都不对。麻烦各位大侠帮帮忙,

发表于 2018-5-27 21:21:38 | 显示全部楼层
需要递归函数来实现
发表于 2018-6-28 14:30:05 | 显示全部楼层
Sorry, no Chinese input at this computer.
The code in the attachment from Cadence Customer Support for finding the specified parameter in schematic, where "config" (hierarchy) is also supported. You can derive the code for modifying the parameter easily from it.

Hope this helps, and have fun.

P.S By the Way, this procedure does not using iteration/recursion, the "hdbTraverseConfigCellViews" function simply returna all the views which have been used in the specified design. So this is fine for your application. But if you want to trace the net connection, or derive the hierarchical instance name in the netlist, then this function is not suitable. You still need some code to descend into the configuration, using iteration/recursion.

CCSFindSchematicInstParam.txt

3.15 KB, 下载次数: 104 , 下载积分: 资产 -2 信元, 下载支出 2 信元

发表于 2018-7-13 16:40:25 | 显示全部楼层
问题分析:你目前的脚本没能hier 遍历需要修改的cell,你只打开了最顶层的cell,所以你这个脚本应该只能对最顶层这个cell生效。
解决方案:需要使用递归调用的方法来从最开始打开的cell遍历到每个intance的底层去。
注意事项:调试的时候要注意cellview的关闭时间,要确保每个打开的instance在遍历完所有符合条件的对象以后才关闭。
参考案例:针对你的问题我写了一个Hier 修改“n50_ckt”这种pcell的S/D metal宽度(sdMtlWidth)的脚本供你参考。
比如:cdfHierChange(“test_lib” “test_xf”  “layout” "n50_ckt" 300n);会打开test_lib这个lib里面test_xf这个cell,然后从最顶层一直到底层所有的n50_ckt这种instance的s/d得metal都会改到300n。
参考skill:
procedure(cdfHierChange(libName cellName viewType findInstCellName newValue)
let((cv num)
      cv=dbOpenCellViewByType(libName cellName viewType  ""  "a")
      num=1
      ;cv~>cellName;for Debug
     foreach(one cv~>instances
                   if(one~>prop!=nil && one~>cellName==findInstCellName then
                          one~>sdMtlWidth=newValue
                       else if(one~>prop=nil;one is a instance which is not a Pcell
       cdfHierChange(one~>libName one~>cellName viewType findInstCellName newValue);recursive call
                              );if
                    )if;
                    if(num==length(cv~>instances) then;make sure after traversing all instances, close data
                       dbSave(cv)
                       dbClose(cv)
                    else
                    num++
                    );if
                 );foreach
        );let
);pro
发表于 2018-7-20 15:13:08 | 显示全部楼层
学习了
发表于 2019-1-15 17:43:58 | 显示全部楼层
回复 4# cillman


   用dbProduceOverlapInst这个函数,找到hier的instance然后再赋值。这样是不是更简单?
发表于 2023-4-21 11:35:21 | 显示全部楼层
试试,谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-26 17:09 , Processed in 0.025858 second(s), 6 queries , Gzip On, Redis On.

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