• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Error in addvia code

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 13230
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error in addvia code

brittooo
brittooo over 13 years ago

 Hi

I would really appreciate if you could take a look at my code copied below and let me know the reasons for the 2 bugs mentioned: 

;PROCEDURE TO ADD VIA1,VIA2,TV AT THE DESIRED POINT IN THE LAYOUT
;AUTHOR:SwK
;CREATED:8 SEP 2011
;***********************************************************************
;BUG1: does not work unless the contact form is opened atleast once after the
;cadence is initiated.
;BUG2: Via1/Via2 are sometimes placed with TV dimensions
;***********************************************************************

procedure(addVia(var)
       let((cv tid via1W via1S via2W via2S tvW tvS )
       cv=geGetWindowCellView()
       tid=techGetTechFile(cv)
      

       via1W=techGetSpacingRule(tid "minWidth" "Via1")
       via1S=techGetSpacingRule(tid "minSpacing" "Via1")
      
       via2W=techGetSpacingRule(tid "minWidth" "Via2")
       via2S=techGetSpacingRule(tid "minSpacing" "Via2")
      
       tvW=techGetSpacingRule(tid "minWidth" "TV")
       tvS=techGetSpacingRule(tid "minSpacing" "TV")
      
      
        unless(boundp('leOcontactForm)       
        le0ContactForm->contactType->value = var
        hiRegTimer("cancelEnterFun(le0ContactForm)" 1)
        leHiCreateContact()
        );unless ends
 
  if(var=="M2_M1"
    then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" via1W via1W 2 1  via1S via1S "center" "center")
    );if ends
   
  if(var=="M3_M2"
    then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" via2W via2W 2 1  via2S via2S "center" "center")
     );if ends
    
   if(var=="TM_M3"
      then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" tvW tvW 2 1  tvS tvS "center" "center")
     );if ends
   
      
       );let ends
       
       );EOP    
      
       
      
;BINDKEYS FOR CALLING THE PROCEDURE:
;**********************************
;hiSetBindKey("Layout" "Alt<Key>z" "addVia(\"M2_M1\")")
;hiSetBindKey("Layout" "Alt<Key>x" "addVia(\"M3_M2\")")
;hiSetBindKey("Layout" "Alt<Key>c" "addVia(\"TM_M3\")")

 

 

Also whenever a wrong dimension via is placed, the following 3 lines appear in the CIW :

*WARNING* techGetTechLibName: argument must be dbCellViewId or techFileId or ddId for cell, library, etc - nil
*WARNING* ddGetObj: invalid libId ((nil)).
*Error* _leIsContactCdsVia: argument #1 should be a database object (type template = "dt") - nil

Regards

Brittoo

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Brittoo,

    First of all, this bit of code doesn't add any value, and is probably the cause of the first bug:

             unless(boundp('leOcontactForm)       
            le0ContactForm->contactType->value = var
            hiRegTimer("cancelEnterFun(le0ContactForm)" 1)
            leHiCreateContact()
            );unless ends

    I removed it, and the code places vias OK. There's no need to invoke the form when you're using the non-UI leCreateContact function. However, you're passing the wrong values to leCreateContact for the "pitch" parameters. Currently you're passing the spacing, rather than the pitch. You should be having:

       if(var=="M2_M1"
        then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" via1W via1W 2 1  via1S+via1W via1S+via1W "center" "center")
        );if ends
       
      if(var=="M3_M2"
        then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" via2W via2W 2 1  via2S+via2W via2S+via2W "center" "center")
         );if ends
        
       if(var=="TM_M3"
          then leCreateContact(cv var hiGetPoint(hiGetCurrentWindow()) "R0" tvW tvW 2 1  tvS+tvW tvS+tvW "center" "center")
         );if ends

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • brittooo
    brittooo over 13 years ago

    Hello Andrew

     Thanks for looking into the code. I reran the script after making the changes suggested by you. However, now the vias placed by calling the addVia() function retain the values of the last placed via. For e.g. if a TV was placed before placing a Via2/Via3, then the via2/via3 would be placed with the dimensions of the TV. Same happens the other way around when a via2/via3 was placed before the TV.

    Inspite of this bug, the variables assigned to minWidth,pitch show the correct values in the CIW.

    Is there a way to fix this bug ?

     FYI, I am working on IC5141.

    Thanks in advance,

    Brittoo 

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information