• 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. linereadstring() function problem

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 14876
  • 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

linereadstring() function problem

tyanata
tyanata over 14 years ago

 Hello,

I have such problem in my SKILL code. In one of the routines of it I create list of strings. And after that read them one by one and transform to symbols with the linereadstring()  function.

 

I have such a proble for example:

llinereadstring("x") 

returns  ->(x)

 

llinereadstring("X") 

returns  ->(X)

 

llinereadstring("9") 

returns  ->(9)

 

llinereadstring("X9") 

returns  ->(X9)

 

llinereadstring("9X") 

returns  ->

SYNTAX ERROR found at line 1 column 2 of file *string*
*Error* lineread/read: syntax error encountered in input

 

My question is how can I overcome this problem if some of the strings in the list is starting with digit and ends with letter as "9X" in the example above.

 

Best regards,

 

tyanata

 

 

 

 

 

  • Cancel
Parents
  • tyanata
    tyanata over 14 years ago

     Hello Andrew,

     

    Here I post routine similar to the original  routine in my script. In this routine you can select which from the available in the certain project libraries to be included in the output procedure: DIG, IO, ANA and 90123AATOP in the example. In this example the output procedure is just printing: printf("List of libraries to be skipped:%s\n" xxx).

    To execute the routine start the function:  Choose_skip_lib()

    You can see that you can select and unselect each library except  90123AATO. If you select or unselect it error message appear:

     SYNTAX ERROR found at line 1 column 38 of file *string*
    *Error* lineread/read: syntax error encountered in input


    procedure( Choose_skip_lib()

    ;       Description
    ;       Available project libraries: DIG, IO, ANA and 90123AATOP

            lib_list = list("DIG" "IO" "ANA" "90123AATOP")


            lib_list_length = length(lib_list)
            count_mem_list = 0
            l_libs=list()

            while( count_mem_list != lib_list_length

                    lib_member = car(lib_list)
                    lib_list = cdr(lib_list)

                    lib_member_symbol=list(stringToSymbol(lib_member))
                    l_libs=append1(l_libs lib_member_symbol)

                    count_mem_list++
            ) ;; close while

            l_fields_skip = list()

            l_TField1_skip = list( hiCreateToggleField(
            ?name 'TField1_skip
            ?prompt ""
            ?choices l_libs
            ?itemsPerRow 2
            ?value '(nil nil nil nil)
            ;?numSelect 6
            ?callback list("" "" "" "")
            ) 10:10 30:20 0)
            l_fields_skip=append1(l_fields_skip l_TField1_skip)


            hiCreateAppForm(                ;create Form
            ?name 'SkipLibForm
            ?formTitle "Choose lybraries to be skipped"
            ?fields l_fields_skip
            ?buttonLayout  'OKCancel
            ?buttonDisabled '(Defaults Apply Help)

    ;        ?initialSize '(560 630)
    ;        ?initialSize t
            ?minSize '(300 120)
            ?callback '( "CCSskip_lib_app_formApplyCB(l_libs)")
            )

            hiSetFormPosition(  (xCoord(hiGetMaxScreenCoords())/2)-560/2 :
                                                    (yCoord(hiGetMaxScreenCoords())/2)-200  )

            hiDisplayForm(SkipLibForm)

    )


    procedure( CCSskip_lib_app_formApplyCB(SkipLibForm_lib_name)
       let( ()

        SkipLibForm_lib_op = SkipLibForm->TField1_skip->value
        SkipLibForm_lib_name_length = length(SkipLibForm_lib_name)
        count_mem_lib_name_list = 0
        temp_lib_str_list=list()
        while( count_mem_lib_name_list != SkipLibForm_lib_name_length

                t_key = car(SkipLibForm_lib_name)
                SkipLibForm_lib_name=cdr(SkipLibForm_lib_name)
                t_val = car(SkipLibForm_lib_op)
                SkipLibForm_lib_op = cdr(SkipLibForm_lib_op)
                t_key_i = car(t_key)
                if( t_val==t then
                temp_lib_str_list=append1(temp_lib_str_list t_key_i)
            )
            count_mem_lib_name_list++
            ) ;; close while
       
       
        skip_lib_final_string = buildString(temp_lib_str_list)
        printf("List of libraries to be skipped:%s\n" skip_lib_final_string)
       
       ) ;let
    ) ;procedure
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • tyanata
    tyanata over 14 years ago

     Hello Andrew,

     

    Here I post routine similar to the original  routine in my script. In this routine you can select which from the available in the certain project libraries to be included in the output procedure: DIG, IO, ANA and 90123AATOP in the example. In this example the output procedure is just printing: printf("List of libraries to be skipped:%s\n" xxx).

    To execute the routine start the function:  Choose_skip_lib()

    You can see that you can select and unselect each library except  90123AATO. If you select or unselect it error message appear:

     SYNTAX ERROR found at line 1 column 38 of file *string*
    *Error* lineread/read: syntax error encountered in input


    procedure( Choose_skip_lib()

    ;       Description
    ;       Available project libraries: DIG, IO, ANA and 90123AATOP

            lib_list = list("DIG" "IO" "ANA" "90123AATOP")


            lib_list_length = length(lib_list)
            count_mem_list = 0
            l_libs=list()

            while( count_mem_list != lib_list_length

                    lib_member = car(lib_list)
                    lib_list = cdr(lib_list)

                    lib_member_symbol=list(stringToSymbol(lib_member))
                    l_libs=append1(l_libs lib_member_symbol)

                    count_mem_list++
            ) ;; close while

            l_fields_skip = list()

            l_TField1_skip = list( hiCreateToggleField(
            ?name 'TField1_skip
            ?prompt ""
            ?choices l_libs
            ?itemsPerRow 2
            ?value '(nil nil nil nil)
            ;?numSelect 6
            ?callback list("" "" "" "")
            ) 10:10 30:20 0)
            l_fields_skip=append1(l_fields_skip l_TField1_skip)


            hiCreateAppForm(                ;create Form
            ?name 'SkipLibForm
            ?formTitle "Choose lybraries to be skipped"
            ?fields l_fields_skip
            ?buttonLayout  'OKCancel
            ?buttonDisabled '(Defaults Apply Help)

    ;        ?initialSize '(560 630)
    ;        ?initialSize t
            ?minSize '(300 120)
            ?callback '( "CCSskip_lib_app_formApplyCB(l_libs)")
            )

            hiSetFormPosition(  (xCoord(hiGetMaxScreenCoords())/2)-560/2 :
                                                    (yCoord(hiGetMaxScreenCoords())/2)-200  )

            hiDisplayForm(SkipLibForm)

    )


    procedure( CCSskip_lib_app_formApplyCB(SkipLibForm_lib_name)
       let( ()

        SkipLibForm_lib_op = SkipLibForm->TField1_skip->value
        SkipLibForm_lib_name_length = length(SkipLibForm_lib_name)
        count_mem_lib_name_list = 0
        temp_lib_str_list=list()
        while( count_mem_lib_name_list != SkipLibForm_lib_name_length

                t_key = car(SkipLibForm_lib_name)
                SkipLibForm_lib_name=cdr(SkipLibForm_lib_name)
                t_val = car(SkipLibForm_lib_op)
                SkipLibForm_lib_op = cdr(SkipLibForm_lib_op)
                t_key_i = car(t_key)
                if( t_val==t then
                temp_lib_str_list=append1(temp_lib_str_list t_key_i)
            )
            count_mem_lib_name_list++
            ) ;; close while
       
       
        skip_lib_final_string = buildString(temp_lib_str_list)
        printf("List of libraries to be skipped:%s\n" skip_lib_final_string)
       
       ) ;let
    ) ;procedure
    • 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