• 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. The label of created pin disappeared

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 13860
  • 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

The label of created pin disappeared

bobbygang
bobbygang over 12 years ago

Hi Andrew,

Haven't seen you for a long time because I changed to a customer support post.

However,sometimes I still need to help coworker do some software support work.

We met a strange problem,

I create a script like following to create pin in schematic:

 

 

/**********************************************************************

 

* Customized REDS Schematic Menu Generate Symbol

 

 

* Source: ~/menus/schematic_geSym.il,v

 

* Ver        1.0

* Author     Andy Zhu

* Group      AOC1 , Ricoh Electronic Design Shanghai Systems Ltd .

* Language   CSHELL

* Date       Nov 04, 2011

* Modified   Sep 20, 2011

 

**********************************************************************/

 

;******************************************************************************

; The following define the sliders that appear in more than one pulldown

; menu set. They are defined here to avoid incorrectly changing one instance

; of a menu item without changing all instances.

;******************************************************************************

 

procedure(Ch_Str(in_String type)

   case(type 

         (stRlen  if(length(parseString(in_String))>1 then

                    nil 

                  else t

                    ) ;end if 

         )

         (stRlet  rexMatchp("[a-zA-Z]" in_String)  

                )  

         (stRnumb rexMatchp("[0-9]" in_String )  

                )

       ) ;end case

) ;end procedure   

 

procedure( rSI1LibBrowser( )

ddsSyncWithForm( reds_SchM_It2_Form 'browse 'rSI1_libname 'rSI1_cellname)

) ;end procedure

 

procedure(rSI1_ErrorDBox(errorText)

hiDisplayAppDBox(

?name gensym( 'rSI1_errorDialogBox ) ; unique variable

?dboxBanner "Put Pin Info"

?dboxText strcat(errorText " Error ! ")

?dialogType hicErrorDialog

?dialogStyle 'modal

?buttonLayout 'Close

) 

) ;end procedure

 

procedure(rSI1_CompleteDBox(completeCellText completeLibText)

hiDisplayAppDBox(

?name gensym( 'rSI1_completeDialogBox ) ; unique variable

?dboxBanner "Put Pin Info"

?dboxText strcat("Put Pin in Cell " completeLibText " -> " completeCellText " Completed ! ")

?dialogType hicInformationDialog

?dialogStyle 'modal

?buttonLayout 'Close

) 

) ;end procedure

 

procedure(reds_SchM_It1_Put_Pin()

let((rSI1PFB rSI1PFBrBn rSI1LibName rSI1CellName rSI1LibBrowserBn rSI1PinLength rSI1PinSpace rSI1FontSize

    rSI1default_file rSI1PFB_filename_Def rSI1_libname_Def rSI1_cellname_Def rSI1_pinspace_Def rSI1_pinlen_Def rSI1_fontsize_Def)

    rSI1_window=hiGetCurrentWindow()

    rSI1_cellViewId=deGetCellView(rSI1_window 0)

    rSI1F_lib=rSI1_cellViewId~>libName

    rSI1F_cell=rSI1_cellViewId~>cellName 

    

    rSI1default_file=infile("~/menus/.REDSPutPin_list")

    fileSeek(rSI1default_file 13 0)

    fscanf(rSI1default_file "%s" rSI1PFB_filename_Def)

    fileSeek(rSI1default_file 14 1) 

    fscanf(rSI1default_file "%s" rSI1_pinspace_Def)

    fileSeek(rSI1default_file 15 1)

    fscanf(rSI1default_file "%s" rSI1_pinlen_Def)

    fileSeek(rSI1default_file 8 1)

    fscanf(rSI1default_file "%s" rSI1_fontsize_Def)

    close(rSI1default_file) 

    if(rSI1_pinlen_Def == "nAn" then

      rSI1wireenbtn_Def=nil

      rSI1_pinlen_en=nil

    else

      rSI1wireenbtn_Def=t

      rSI1_pinlen_en=t

    ) ;end if

    rSI1PFB = hiCreateStringField(

    ?name 'rSI1PFB_filename

    ?prompt "Pin List File"

    ?value rSI1PFB_filename_Def

    ?callback "rSI1PFB_callback(hiGetCurrentForm() 'strFileNameField)" 

    )

    rSI1PFBrBn = hiCreateFormButton(

    ?name 'rSI1PFB_btn

    ?buttonText "Browse..."

    ?callback "ddsFileBrowseCB( hiGetCurrentForm() 'rSI1PFB_filename \"*.txt\" 'existingFile)"

    )

    rSI1WireEnBn = hiCreateBooleanButton(

    ?name 'rSI1wireen_btn

    ?buttonText "Add wire"

    ?value rSI1wireenbtn_Def

    ?callback "rSI1WireEnBn_callback(hiGetCurrentForm())"

    )

    rSI1PinLength = hiCreateStringField(

    ?name 'rSI1_pinlen

    ?prompt "Pin Wire Length"

    ?value rSI1_pinlen_Def

    ?callback "" 

    ?enabled rSI1_pinlen_en

    )

    rSI1PinSpace = hiCreateStringField(

    ?name 'rSI1_pinspace

    ?prompt "Pin Space"

    ?value rSI1_pinspace_Def 

    ?callback "" 

    )

    rSI1FontSize = hiCreateStringField(

    ?name 'rSI1_fontsize

    ?prompt "Symbol Font Size"

    ?value rSI1_fontsize_Def 

    ?callback "" 

    )

    hiCreateAppForm(

    ?name    'reds_SchM_It1_Form

    ?formTitle "Put Pin From Pin List File"

    ?callback   "rSI1PFB_callback(hiGetCurrentForm() 'Ok)"   

    ?fields list(

              list(rSI1PFB 0:0 560:35 110)

              list(rSI1PFBrBn 560:0 80:35)

              list(rSI1WireEnBn 0:35 140:35 )

              list(rSI1PinLength 0:70 320:35 110)

              list(rSI1PinSpace 320:70 320:35 110)

              list(rSI1FontSize 0:105 320:35 110)

                )

    ?attachmentList list( 

                     hicTopPositionSet | hicLeftPositionSet  | hicRightPercentSet   

                     hicTopPositionSet | hicLeftPercentSet   | hicRightPositionSet  

                     hicTopPositionSet | hicLeftPositionSet     

                     hicTopPositionSet | hicLeftPositionSet  | hicRightPercentSet   

                     hicTopPositionSet | hicLeftPercentSet   | hicRightPositionSet  

                     hicTopPositionSet | hicLeftPositionSet  | hicRightPercentSet   

                       ) 

    ?initialSize list( 640 140)

    ?buttonLayout '(Empty (Create\ and\ Cancel "hiFormApply(hiGetCurrentForm()) hiFormCancel(hiGetCurrentForm())")  (Create hiFormApply) (Cancel hiFormCancel) (Default hiFormDefaults)) 

    )

    hiDisplayForm(reds_SchM_It1_Form)

    ddsEndSyncWithForm()

))   

procedure(rSI1WireEnBn_callback(theForm )

if(theForm->rSI1wireen_btn->value == t then

   println("Add Wire Enabled")

   hiSetFieldEnabled(

             rSI1PinLength

             t

             ) 

else 

   println("Add Wire Disabled")

   hiSetFieldEnabled(

             rSI1PinLength

             nil

             )

) ;end if

) ;end procedure 

 

 

procedure(rSI1PFB_callback( theForm actionOrField)

let( (rSI1_fileInt rSI1_PinLenInt rSI1_PinSpInt rSI1_FSInt

      rSI1PFB_path rSI1PFB_dir rSI1PFB_file rSI1PFB_out rSI1PFB_lib rSI1PFB_cell rSI1PFB_out2 rSI1_Errortext)

 

case( actionOrField

  ;;; checking if the file exists

      ( strFileNameField

        if( isFile( theForm->rSI1PFB_filename->value ) then

           println("Pin List File Exists")

           t

        else

           println("Pin List File Does Not Exist, Try Again")

           nil

          ) ;end if

      ) ;end strFileNameField

      ( Ok 

            rSI1_fileInt  =not(null( rSI1PFB_callback( theForm 'strFileNameField )))

            rSI1_PinLenInt=not(null( rSI1PFB_callback( theForm 'strPinLenField )))

            rSI1_PinSpInt =not(null( rSI1PFB_callback( theForm 'strPinSpaceField )))

            rSI1_FSInt    =not(null( rSI1PFB_callback( theForm 'strSymFontSizeField )))

            if(rSI1_fileInt && rSI1_PinLenInt && rSI1_PinSpInt && rSI1_FSInt then   

               

                rSI1PFB_path=theForm->rSI1PFB_filename->value

                rSI1PFB_path=simplifyFilename(rSI1PFB_path)

                rSI1PFB_dir=strcat("/" buildString(reverse(cdr(reverse(parseString(rSI1PFB_path "/")))) "/"))

                rSI1PFB_file=car(reverse(parseString(rSI1PFB_path "/")))

                rSI1PFB_out=outfile("~/menus/.putPin_P" "w")

                fprintf(rSI1PFB_out "%s\n" rSI1PFB_path ) 

                fprintf(rSI1PFB_out "%s\n" rSI1PFB_dir )  

                fprintf(rSI1PFB_out "%s" rSI1PFB_file)  

                close(rSI1PFB_out)

                rSI1PFB_out2=outfile("~/menus/.REDSPutPin_list" "w")

                fprintf(rSI1PFB_out2 "Pinlist_Path=%s\n" rSI1PFB_path)

                fprintf(rSI1PFB_out2 "symwireSpace=%s\n" rSI1F_pinsp)

                if(theForm->rSI1wireen_btn->value then

                  fprintf(rSI1PFB_out2 "symwireLength=%s\n" rSI1F_pinlen)

                else

                  fprintf(rSI1PFB_out2 "symwireLength=nAn\n" )

                ) ;end if

                fprintf(rSI1PFB_out2 "sym_fH=%s\n" rSI1F_fz)

                close(rSI1PFB_out2)

                csh("~/menus/csh/putPin.il")

                rSI1F_input=infile("~/menus/.rSI1_Pin")

                rSI1F_pinX=0

                rSI1F_pinY=0

                rSI1F_cyle=0  

                while(fscanf(rSI1F_input "%s" rSI1F_pinname)!=nil

                  cond((rSI1F_cyle==0

                        rSIF_pinNAME_L=rSI1F_pinname)

                       (rSI1F_pinname=="rSI1_Input_Pin"&&rSI1F_cyle>0 

                        rSI1F_pinSym="ipin"

                        rSI1F_pinmode="input")

                       (rSI1F_pinname=="rSI1_Output_Pin" &&rSI1F_cyle>0

                        rSI1F_pinX=rSI1F_pinX+2*evalstring(rSI1F_fz)+0.125

                        rSI1F_pinY=0

                        rSI1F_pinSym="opin"

                        rSI1F_pinmode="output")

                       (rSI1F_pinname!="rSI1_Input_Pin" &&rSI1F_pinname!="rSI1_Output_Pin" &&rSI1F_cyle>0

                        rSI1F_pinCVId=dbOpenCellViewByType( "basic" rSI1F_pinSym "symbol" "" 'r )

                        rSI1F_pinXY=list(rSI1F_pinX rSI1F_pinY) 

                        rSI1F_pinId=schCreatePin( rSI1_cellViewId rSI1F_pinCVId rSI1F_pinname rSI1F_pinmode nil rSI1F_pinXY "R0" )

                        rSI1F_pinId~>children~>font="roman"

                        rSI1F_pinId~>children~>height=evalstring(rSI1F_fz)

                        if(abs(rSI1F_pinY)>=20*evalstring(rSI1F_pinsp)  then

                          rSI1F_pinX=rSI1F_pinX+(1+evalstring(rSIF_pinNAME_L))*evalstring(rSI1F_fz)+0.125

                          rSI1F_pinY=0

                        else 

                          rSI1F_pinY=rSI1F_pinY-evalstring(rSI1F_pinsp)

                          ) ;end if

                       )

                       ) ;end cond

                   rSI1F_cyle=rSI1F_cyle+1

                ) ;end while                                        

                close(rSI1F_input) 

                rSI1_CompleteDBox(rSI1F_cell rSI1F_lib)

            else

                rSI1_Errortext=nil

                if(rSI1_fileInt==nil then

                  rSI1_Errortext=tconc(rSI1_Errortext "Pin List File")

                ) ;end if

                if(rSI1_PinLenInt==nil then

                  rSI1_Errortext=tconc(rSI1_Errortext "Pin Wire Length")

                ) ;end if

                if(rSI1_PinSpInt==nil then

                  rSI1_Errortext=tconc(rSI1_Errortext "Pin Space")

                ) ;end if

                if(rSI1_FSInt==nil then

                  rSI1_Errortext=tconc(rSI1_Errortext "Symbol Font Size")

                ) ;end if

                rSI1_Errortext=buildString(car(rSI1_Errortext) " & ") 

                rSI1_ErrorDBox(rSI1_Errortext)

              ) ;end if 

      )

  ;;; checking the Pin Length 

      (strPinLenField

        if(theForm->rSI1wireen_btn->value then

          rSI1F_pinlen=theForm->rSI1_pinlen->value

          if((rSI1F_pinlen != "") && Ch_Str(rSI1F_pinlen 'stRlen) && Ch_Str(rSI1F_pinlen 'stRlet)==nil && Ch_Str(rSI1F_pinlen 'stRnumb)  then

             println("Pin Wire Length Ok")

             t

          else

             println("Pin Wire Length Error, Try Again")

            nil

            ) ;end if

        else

          t   

          ) ;end if

      ) ;end strPinLenField

  ;;; checking the Pin Space 

      (strPinSpaceField

        rSI1F_pinsp=theForm->rSI1_pinspace->value

        if((rSI1F_pinsp != "") && Ch_Str(rSI1F_pinsp 'stRlen) && Ch_Str(rSI1F_pinsp 'stRlet)==nil && Ch_Str(rSI1F_pinsp 'stRnumb)  then

           println("Pin Space Ok")

           t

        else

           println("Pin Space Error, Try Again")

           nil

          ) ;end if

      ) ;end strPinSpaceField

  ;;; checking the Font Size 

      (strSymFontSizeField

        rSI1F_fz=theForm->rSI1_fontsize->value

        if((rSI1F_fz != "") && Ch_Str(rSI1F_fz 'stRlen) && Ch_Str(rSI1F_fz 'stRlet)==nil && Ch_Str(rSI1F_fz 'stRnumb)  then

           println("Symbol Font Size Ok")

           t

        else

           println("Symbol Font Size Error, Try Again")

           nil

          ) ;end if

      ) ;end strSymFontSizeField

      ( t

        error( "Illegal action or unknown field: %L" actionOrField )

      )

    ) ; end case

) ;end let

) ;end procedure

It can create pin easily but when I move the pin and save the schematic, sometimes the label will disappear.

What's the possible reason?

 Looking forward to your reply!

Thank you! 

BR, 

Bobby 

 

 

 

 

  • 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