找回密码
 注册
关于网站域名变更的通知
查看: 2943|回复: 13
打印 上一主题 下一主题

谁能写个比较器的SKILL。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-7-9 09:31 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

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

x
比如:比较上版BRD与下版BRD的NET变化,零件变化。测试点变化,等等。

该用户从未签到

2#
发表于 2010-7-11 15:05 | 只看该作者
帮顶

该用户从未签到

3#
发表于 2010-7-13 10:04 | 只看该作者
顶顶顶顶顶

该用户从未签到

4#
发表于 2010-7-13 13:13 | 只看该作者
本帖最后由 ginooolu 于 2010-7-15 11:41 编辑

夹错文件,请至六楼下载


初學skill,請大家多多指教。

Dccrpt.zip

36.59 KB, 下载次数: 43, 下载积分: 贡献 -30 , 威望 -10

该用户从未签到

5#
发表于 2010-7-13 14:50 | 只看该作者
楼上的字看不懂噢,我从小没文化,哎。。。

该用户从未签到

6#
发表于 2010-7-13 15:46 | 只看该作者

跟五楼道歉一下,因为用繁体输入的关系。上面的文字是:

前阵子在下写的比较程序,如果有兴趣可以试用看看,也请帮忙提供意见及抓错。
比对项目不多,仅包含组件,连接点,及拉线。ETCH shape也想检查,可是不知道怎么写。
但程序写得不好,比对过程颇费时,实际测试一片主板约花3~10分钟。
不知大家平常还用甚么方法做比较呢?

附檔:DccrptCN.zip;包含说明,主程序及窗体文件。 解压密码:dccrpt
DccrptCN.zip (47.54 KB, 下载次数: 120)


初学skill,请大家多多指教。

该用户从未签到

7#
发表于 2010-7-13 16:46 | 只看该作者

该用户从未签到

8#
 楼主| 发表于 2010-7-14 15:49 | 只看该作者
(defun Compare_List_Builder ()

   ;############################
   ;### Define the variables ###
   ;############################
   Design=axlDBGetDesign() ; This represents the current design
   Function_List=nil ; This list stores all the function designators
   Function_Name=nil ; This holds the working function designator
   Device_Name=nil ; This holds the working Device Name
   ;Value=nil ; This will hold the working Value (not currently available)
   ;Tolerance=nil ; This will hold the working Tolerance (not currently available)
   Ref_Des=nil ; This holds the working Reference Designator
   Pin_Number=nil ; This holds the working Pin Number
   Pin_Use=nil ; This holds the working Pin Use code
   Net_Name=nil ; This holds the working Net Name
   Pin_Use_Prop_Set=nil ; This is used to override the function->pinuse definition
   Compare_List_File=nil ; This holds the name of the output file

   ;### Open the output file and read in the data fields ###
   Compare_List_File=outfile("./Compare_List_File" "w")

   ;### Get each component contained  in the design ###
   (foreach Component Design->components
      Function_List=cons(Component->functions Function_List)
   ); end foreach Component Design->components

   ;### Get each Function defined for each component in the design ###
   (foreach Function Function_List
      Function_Name=car(Function)->name
      Device_Name=car(Function)->type
      Ref_Des=car(Function)->parent->name

      ;### Get each pin for each function for each component in the design ###
      (foreach Pin car(Function)->pins
         Pin_Number=Pin->pin->number
         Pin_Use=Pin->use
         Net_Name=Pin->pin->net->name

         ;### Check if the pinuse property is set, it overrides the function->pinuse ###
         (foreach Prop Pin->pin->prop->??
            (if Pin_Use_Prop_Set == "yes" then
               Pin_Use=Prop
            ); end if Pin_Use_Prop_Set == "yes"
            (if Prop="PINUSE" then
               Pin_Use_Prop_Set="yes"
            ); end if Prop="PINUSE"
         ); end foreach Prop Pin->pin->prop->??

         ;### This if substitutes Not_Connected for blank net names ###
         (if Net_Name == "" then Net_Name="Not_Connected")

         ;### Write the data to the output file ###
         fprintf(Compare_List_File "%s %s %s %s %s %s\n"
            Function_Name Ref_Des Device_Name Pin_Number Pin_Use Net_Name)
      ); end foreach Pin Function->pin
   ); end foreach Function Function_List
   close(Compare_List_File)

   ;### Sort the file and add the end of file (EOF) marker ###
   shell("sort -n +0.3 Compare_List_File > CompareListFile.txt;
       echo \"EOF\" >> CompareListFile.txt;
       rm Compare_List_File")
); end defun Compare_List_Builder
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun Compare_Logic_Changes_And_Renames ()

   ;############################
   ;### Define the variables ###
   ;############################
   Report=nil ; This holds the output file name
   String_Pre=nil ; This holds the current string of data from the pre-change comparision list
   String_Post=nil ; This holds the current string of data from the post-change comparision list
   Comparing=nil ; This specifies if all changes are captured
   Function_Name_Pre=nil ; This holds the current function designator from the pre-change list
   Function_Name_Post=nil ; This holds the current function designator from the post-change list
   Delete_List=nil ; This holds all pins/functions deleted from the post-change design
   Function_Name_Pre_Last=nil ; This holds the previous records function designator
   Function_Name_Pre_Current=nil ; This holds the current records function designator
   Ref_Des_Pre=nil ; This holds current record reference designator from the pre-change list
   Ref_Des_Post=nil ; This holds current record reference designator from the post-change list
   Device_Name_Pre=nil ; This holds current record device name from the pre-change list
   Device_Name_Post=nil ; This holds current record device name from the post-change list
   Pin_Number_Pre=nil ; This holds current record pin number from the pre-change list
   Pin_Number_Post=nil ; This holds current record pin number from the post-change list
   Pin_Use_Pre=nil ; This holds current record pin use code from the pre-change list
   Pin_Use_Post=nil ; This holds current record pin use code from the post-change list
   Net_Name_Pre=nil ; This holds current record net name from the pre-change list
   Net_Name_Post=nil ; This holds current record net name from the post-change list
   Function_Name_Post_Current=nil ; This holds the current records function designator
   Function_Name_Post_Last=nil ; This This holds the previous records function designator
   Modify_List=nil ; This holds all pins/functions changed in the post-change design
   Add_Mode=nil ; This specifies if all additions have been captured
   Add_List=nil ; This holds all pins/functions added to the post-change design

   ;########################################################
   ;### Open the output file and read in the data fields ###
   ;########################################################
   Pre_Change_List=infile("./CompareListFilePreChange.txt")
   Post_Change_List=infile("./CompareListFile.txt")
   Report=outfile("./DeleteModifyAdd.rpt" "w")
   fprintf(Report "\n\n\t\t************ 3rd Party Netin ************\n")
   fprintf(Report "\t\t******* Back Annotation TO-DO List ******\n")
   fprintf(Report "\t\t*****************************************\n")
   fprintf(Report "\n\t\tPre-Change Design = %s.brd\n" getShellEnvVar("CHK_BRD"))
   fprintf(Report "\t\tPost-Change Design = %s.brd\n" getShellEnvVar("NEW_BRD"))
   fprintf(Report "\n\t\t%s\n" getCurrentTime())
   fprintf(Report "\n\n\t\t************* Modifications *************\n\n")
   String_Pre=parseString(gets(S Pre_Change_List))
   String_Post=parseString(gets(S Post_Change_List))

   ;### Start the comparison loop ###
   (while Comparing != "finished"

      ;### This if check for the end of file record in the pre-change list ###
      (if car(String_Pre) != "EOF" then
         Function_Name_Pre=car(String_Pre)
         Function_Name_Post=car(String_Post)

         ;### This if compares the FuncDes, if their differant the Function_Name_Pre was deleted ###
         (if Function_Name_Pre != Function_Name_Post then
            Delete_List=cons(String_Pre Delete_List)
            Function_Name_Pre_Last=Function_Name_Pre

            ;### This if eliminates multiple entries of the same RefDes in the deletion section ###
            (if Function_Name_Pre_Last != Function_Name_Pre_Current then
               fprintf(Report "\n\t*** Delete function %s, Ref %s\n"
                  Function_Name_Pre car(cdr(String_Pre)))
            ); end if Function_Name_Pre_Last != Function_Name_Pre_Current
            String_Pre=parseString(gets(S Pre_Change_List)) ; get the next pre-change record
            Function_Name_Pre=car(String_Pre)
            Function_Name_Pre_Current=Function_Name_Pre
         else

            ;### This if checks for differances between the pre and post designs ###
            (if String_Pre != String_Post then
               Function_Name_Post=car(String_Post)
               Ref_Des_Pre=car(cdr(String_Pre))
               Ref_Des_Post=car(cdr(String_Post))
               Device_Name_Pre=car(cdr(cdr(String_Pre)))
               Device_Name_Post=car(cdr(cdr(String_Post)))
               Pin_Number_Pre=car(cdr(cdr(cdr(String_Pre))))
               Pin_Number_Post=car(cdr(cdr(cdr(String_Post))))
               Pin_Use_Pre=car(cdr(cdr(cdr(cdr(String_Pre)))))
               Pin_Use_Post=car(cdr(cdr(cdr(cdr(String_Post)))))
               Net_Name_Pre=car(cdr(cdr(cdr(cdr(cdr(String_Pre))))))
               Net_Name_Post=car(cdr(cdr(cdr(cdr(cdr(String_Post))))))
               Function_Name_Post_Current=Function_Name_Post

               ;### This if eliminates multiple entries of RefDes and DeviceName ###
               (if Function_Name_Post_Last != Function_Name_Post_Current then
                  fprintf(Report "\n\t*** Modify Function %s: Refdes=%s, Device=%s ***\n"
                  Function_Name_Post Ref_Des_Pre Device_Name_Pre)

                  ;### This if compares the RefDes ###
                  (if Ref_Des_Pre != Ref_Des_Post then
                     fprintf(Report "\tRefdes was=%s, is=%s\n" Ref_Des_Pre Ref_Des_Post)
                  ); end if Ref_Des_Pre != Ref_Des_Post

                  ;### This if compares the RefDes ###
                  (if Device_Name_Pre != Device_Name_Post then
                     fprintf(Report "\tDevice was=%s, is=%s\n" Device_Name_Pre Device_Name_Post)
                  ); end if Device_Name_Pre != Device_Name_Post
               ); end if Function_Name_Post_Last != Function_Name_Post_Current

               ;### This if compares the RefDes ###
               (if Pin_Number_Pre != Pin_Number_Post then
                  fprintf(Report "\tPin was=%s, is=%s\n" Pin_Number_Pre Pin_Number_Post)
               ); end if Pin_Number_Pre != Pin_Number_Post

               ;### This if compares the RefDes ###
               (if Pin_Use_Pre != Pin_Use_Post then
                  fprintf(Report "\tNew pin %s; Use was=%s, is=%s\n"
                     Pin_Number_Post Pin_Use_Pre Pin_Use_Post)
               ); end if Pin_Use_Pre != Pin_Use_Post

               ;### This if compares the RefDes ###
               (if Net_Name_Pre != Net_Name_Post then
                  fprintf(Report "\tNew pin %s; Net was=%s, is=%s\n"
                     Pin_Number_Post Net_Name_Pre Net_Name_Post)
               ); end if Net_Name_Pre != Net_Name_Post
               Modify_List=cons(String_Post Modify_List)
               Function_Name_Post_Last=Function_Name_Post_Current
               String_Pre=parseString(gets(S Pre_Change_List))
               String_Post=parseString(gets(S Post_Change_List))

               ;### This if checks for the end of file record in the pre-change list ###
               (if car(String_Pre) == "EOF" then
                  Modify_Mode="finished"
               ); if car(String_Post) != "EOF"
            else
               String_Pre=parseString(gets(S Pre_Change_List))
               String_Post=parseString(gets(S Post_Change_List))

               ;### This if checks for the end of file record in the pre-change list ###
               (if car(String_Pre) == "EOF" then
                  Modify_Mode="finished"
               ); if car(String_Post) != "EOF"
            ); end if String_Pre != String_Post
         ); end if Function_Name_Pre != Function_Name_Post
      else

         ;##########################################
         ;### Start the additions recording loop ###
         ;##########################################
         fprintf(Report "\n\n\t\t************* Additions *************\n")
         (while Add_Mode != "finished"

            ;### This if checks for the end of file record in the post-change list ###
            (if car(String_Post) != "EOF" then
               Function_Name_Post=car(String_Post)
               Function_Name_Post_Current=Function_Name_Post
               Ref_Des_Post=car(cdr(String_Post))
               Device_Name_Post=car(cdr(cdr(String_Post)))
               Pin_Number_Post=car(cdr(cdr(cdr(String_Post))))
               Pin_Use_Post=car(cdr(cdr(cdr(cdr(String_Post)))))
               Net_Name_Post=car(cdr(cdr(cdr(cdr(cdr(String_Post))))))

               ;### This if eliminates duplicate ref des entries in the additions section ###
               (if Function_Name_Post_Current != Function_Name_Post_Last then
                  fprintf(Report "\n\t*** Add Function %s: Refdes=%s, Device=%s ***\n"
                     Function_Name_Post Ref_Des_Post Device_Name_Post)
               ); end if Function_Name_Post_Current != Function_Name_Post_Last
               fprintf(Report "\tPin=%s, Use=%s, Net=%s\n" Pin_Number_Post Pin_Use_Post Net_Name_Post)
               Function_Name_Post_Last=Function_Name_Post_Current
               Add_List=cons(String_Post Add_List)
               String_Post=parseString(gets(S Post_Change_List))
            else
               Add_Mode="finished"
               Comparing="finished"
            ); end if car(String_Post) != "EOF"
         ); end while Add_Mode != "finished"
      ); end if car(String_Pre) != "EOF"
   ); end while Comparing != "finished"
   close(Report)
); end defun Compare_Logic_Changes_And_Renames

该用户从未签到

9#
 楼主| 发表于 2010-7-15 11:19 | 只看该作者
解压缩后为三个文件,Dccrpt.doc,DCCRPT.form,rulerpt.ile。怎么和你所说的

加载程序:
1.        将DCCRPT.form档案拷贝到 cadence程序主目录下的\share\pcb\text\forms。
2.        将dccrpt.il档案拷贝到 home folder 的\pcbenv目录内。
3.        用文书软件编辑Allero.ilinit (home folder 的\pcbenv目录内),加入load(“dccrpt.ile” “skill”)
4.        完成后重开Allegro增加以下指令dcc
不对呀????????

该用户从未签到

10#
发表于 2010-7-15 12:21 | 只看该作者
再道歉一次,四楼夹错档案,请至六楼下载

该用户从未签到

11#
发表于 2010-12-10 11:37 | 只看该作者
用不了

该用户从未签到

12#
发表于 2010-12-14 01:53 | 只看该作者
小弟前天也写了个,需要给我邮件evel.evel@gmail.com。等改进好了寄给大伙用。

  • TA的每日心情
    擦汗
    2020-1-21 15:53
  • 签到天数: 8 天

    [LV.3]偶尔看看II

    13#
    发表于 2011-5-2 20:10 | 只看该作者
    好东东

    该用户从未签到

    14#
    发表于 2012-3-29 11:46 | 只看该作者
    学习
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-6-14 11:05 , Processed in 0.093750 second(s), 28 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

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