Home > Community > Forums > Custom IC SKILL > question about loading functions

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 question about loading functions 

Last post Thu, Jun 7 2007 2:12 PM by archive. 4 replies.
Started by archive 07 Jun 2007 02:12 PM. Topic has 4 replies and 1625 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Jun 7 2007 2:12 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    question about loading functions Reply

    Hi,all: I am new to Cadence, and right now I am learning how to use skill language. I typed one file I found online and saved it to /home/user/1.il. The file is as following: procedure( rectanglefury( num_rect ) cvID = geGetWindowCellView() for( i 1 num_rect llx = random( 1000 ) lly = random( 1000 ) urx = random( 1000 ) ury = random( 1000 ) x = random( 10 ) if( ( x > 6 ) dbCreateRect(cvID list("L0" ) list( llx:lly urx:ury ) ) ) if( ( x>3 && x<6 ) dbCreateRect(cvID list("L1" ) list( llx:lly urx:ury ) ) ) if( ( x < 3 ) dbCreateRect(cvID list("L2" ) list( llx:lly urx:ury ) ) ) ) ) then I go back to load this to cadence,using: >load( "/home/user/1.il") but I always got error as following: if( ( x > 6 ) dbCreateRect(cvID list("L0" ) list( llx:lly urx:ury ) ) ) SYNTAX ERROR found at line9 column 26 of file /home/user/1.il *Error*lineread/read:syntax error encountered in input ***Error in rountine load: Entering new debug toplevel due to error Can anyone tell me what is wrong with this?Thanks in advance! --sophia


    Originally posted in cdnusers.org by sophia_song
    • Post Points: 0
  • Fri, Jun 8 2007 12:53 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: question about loading functions Reply

    Rather hard to tell, since the formatting has got completely messed up.

    If I cut and paste the above, into a file, I don't get any syntax errors, Did you try looking at line 9 column 26 of your file?

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Post Points: 0
  • Fri, Jun 8 2007 6:45 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: question about loading functions Reply

    Hello,Andrew:
    Thanks for your response.
    Yes, I did. Line 9 column 26 is this line : if( ( x > 6 ) dbCreateRect(cvID list("L0" ) list( llx:lly urx:ury ) ) ) and the column is ' ( ' inbetween ' dbCreateRect(cvID ' . Can you check on this again? ----sophia


    Originally posted in cdnusers.org by sophia_song
    • Post Points: 0
  • Fri, Jun 8 2007 8:07 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: question about loading functions Reply

    That looks perfectly OK. Is there a space between the dbCreateRect and the open parenthesis?

    The other thing to try is to do (in UNIX):

    cat -vet code.il

    to look if there are any strange characters in the file.

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Post Points: 0
  • Wed, Jun 13 2007 4:51 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: question about loading functions Reply

    1.
    if( x > 6 then
    dbCreateRect(cvID "L0" list(llx:lly urx:ury))
    ); if

    2.
    if( x > 3 && x < 6 then
    dbCreateRect(cvID "L1" list(llx:lly urx:ury))
    ); if

    if there is only one condition, change it to when instead of if.

    Try to see if it works.


    Originally posted in cdnusers.org by mvu
    • Post Points: 0
Page 1 of 1 (5 items)
Sort Posts:
Started by archive at 07 Jun 2007 02:12 PM. Topic has 4 replies.