• 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 Design
  3. function call is some how retaining previous call values...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 126
  • Views 15891
  • 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

function call is some how retaining previous call values in SKILL

RFStuff
RFStuff over 12 years ago

 Dear All,

I am calling function as below:-

       guardring(L_cell W_cell clearance W_guard Space_NTAP_PATAP First_type_tap).

      When I call second time this function in CIW, it some how retaining the previous call vlaues. So the outcome result is wrong.

       However when I call it 2nd time it gives me dsired result. It looks like the variable is NOT prempted after function call is over.

   Can anybody please tell why it happening. It looks like to me a file open/close problem.

My code is as below:

procedure( guardring(L_cell W_cell clearance W_guard Space_NTAP_PATAP First_type_tap)
xPitch=0.16+0.2
yPitch=0.16+0.2
;row=5
;column=20

    if( (First_type_tap=="N") then

        ; For Creating  NTAP
         
            NTAP_CONT_NO_IN_THICKNESS=car(guardtapsize( (W_guard+0.64) "NTAP" ))
                printf("NTAP_CONT_NO_IN_THICKNESS=%d",NTAP_CONT_NO_IN_THICKNESS)
            NTAP_THICKNESS= (NTAP_CONT_NO_IN_THICKNESS*0.36) +0.56
            printf("NTAP_THICKNESS=%f\n",NTAP_THICKNESS)
            NTAP_LENGTH=(2*(NTAP_THICKNESS+clearance))+L_cell
            NTAP_CONT_NO_IN_LENGTH=car(guardtapsize( NTAP_LENGTH "NTAP" ))
            NTAP_LENGTH= (NTAP_CONT_NO_IN_LENGTH*0.36) +0.56
            printf("NTAP_LENGTH=%f",NTAP_LENGTH)
            row=NTAP_CONT_NO_IN_THICKNESS
            column=NTAP_CONT_NO_IN_LENGTH
            xOffset=0
            yOffset=0
        guardlayercreate( "NTAP" xPitch yPitch row column xOffset yOffset "Y" )
           ...................................................................



 ....................................................................

) /*End of procedure*/  

procedure( guardtapsize( width type )
             ;declare(a[2])
             if( (type=="NTAP") then

               
             N_width=  ceiling(((width-0.56)/0.36))
             ;actual_width=( (N_width*0.36) +0.56)
                 printf("N_width=%d\n",N_width)
                     ;printf("actual_width=%f\n",actual_width)
                     ;a[0]=N_width
                     ;a[1]=actual_width
            else
                     
              N_width=  ceiling(((width-0.24)/0.36))
              ;actual_width=( (N_width*0.36) +0.24)
                      printf("N_width=%d\n",N_width)
                  ;printf("actual_width=%f\n",actual_width)
                      ;a[0]=N_width
                      ;a[1]=actual_width
             )
               list(N_width)    
          )

  • Cancel
Parents
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    Sorry, I did some mistakes in the code. After fixing them the issue got resolved though it was not pertaing to Global/Local variable type.

    Since you have pointed out about the variable types, it creats some ambiguities for me.

    1) : It looks like SKILL does not require special command for Global variables rather it requires for loacal variable

          Suppose a function is as follows:

                    procedure( funct(x,y))


                        a=x

                       b=y

                      c=a+b

                   )

                c is a global variable.

              After calling this function in CIW funct(2,3), if I type a= , I should get a=2, if I type c= , I should get c=5

             But I am NOT getting it

    2)   SKILL Lint in the SKILL Development Tools (from the CIW Tools menu) has many options, is tere any document which tells how to use it

    Kind Regards

                                           

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • RFStuff
    RFStuff over 12 years ago

    Dear Andrew,

    Sorry, I did some mistakes in the code. After fixing them the issue got resolved though it was not pertaing to Global/Local variable type.

    Since you have pointed out about the variable types, it creats some ambiguities for me.

    1) : It looks like SKILL does not require special command for Global variables rather it requires for loacal variable

          Suppose a function is as follows:

                    procedure( funct(x,y))


                        a=x

                       b=y

                      c=a+b

                   )

                c is a global variable.

              After calling this function in CIW funct(2,3), if I type a= , I should get a=2, if I type c= , I should get c=5

             But I am NOT getting it

    2)   SKILL Lint in the SKILL Development Tools (from the CIW Tools menu) has many options, is tere any document which tells how to use it

    Kind Regards

                                           

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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