Home > Community > Forums > Custom IC SKILL > Add function into rodCreatePath

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: *

 Add function into rodCreatePath 

Last post Tue, Feb 1 2011 12:06 PM by johnmck. 7 replies.
Started by user002 27 Oct 2009 05:42 AM. Topic has 7 replies and 3078 views
Page 1 of 1 (8 items)
Sort Posts:
  • Tue, Oct 27 2009 5:42 AM

    • user002
    • Not Ranked
    • Joined on Tue, Oct 27 2009
    • Sevilla, Sevilla
    • Posts 3
    • Points 45
    Add function into rodCreatePath Reply

    Hi all, I've been reading your posts for about 2 months, I'm trying to learn skill and they're very useful! thanks.

    I'm asking for help here because I don't know how to do properly the next thing:

    I want to add for example 100 lines of subRects with a separation of 1 to my MultiPart Path, I've created this function:

    ;----------------Function------------------

    procedure(anillo(w puntos)
      cv = geGetEditCellView()
      mipath = rodCreatePath(
            ?layer           list("M1" "logic")
            ?width           w
            ?pts             puntos
            ?endType         "flush"
            ?cvId            cv
            ?encSubPath      list(
               list(
                 ?layer        list("XN" "logic")
                 ?enclosure    -0.22            
                 ?beginOffset  0.22
                 ?endOffset    if(pathstate~>closed then -0.22 else 0.22)
               );NWell
               list(
                 ?layer        list("ACTIVE" "logic")
                 ?enclosure    -0.04        
                 ?beginOffset  0.04
                 ?endOffset    if(pathstate~>closed then -0.04 else 0.04)
               );Active
            ) ;encpath
            for(i 0 99
              ?subRect         list(
                list(
                  ?layer      list("CS" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos
              );subrect
            );for
            
      ) ; end rodCreatePath
    );proc

    ;------------------EOFunction----------------

    But when I try to run it with my parameters OK it says: 

    ;--------------------CIW Window---------------

     *Error* rodCreatePath: extra arguments or keyword missing - (t)

    ;--------------------End of CIW Window-----------------

    It's just because the "for()" function returns "true" (t) . (I think.)

    What could I do to solve this? Any other good technique for doing this? Thanks in advance.

     

    • Post Points: 20
  • Tue, Oct 27 2009 6:07 AM

    Re: Add function into rodCreatePath Reply

    Yes, the problem is partly because for() returns t, and also because you've got the ?subRect within the for loop. 

    Easiest way to do this is probably to build a list of integers from 0 to 99, and then use foreach(mapcar) to transform this list of integers into the subRect entries.

    For example this modification to your code (I suspect you'll need to adjust it, because I think all the contacts aren't in the right place, but I'm sure you can take care of that part).

    procedure(abSequence(start stop)
      let((i seq)
        i=stop
        while(i>=start
          seq=cons(i-- seq)
        )
        seq
      )
    )
    
    procedure(anillo(w puntos)
      cv = geGetEditCellView()
      mipath = rodCreatePath(
            ?layer           list("M1" "logic")
            ?width           w
            ?pts             puntos
            ?endType         "flush"
            ?cvId            cv
            ?encSubPath      list(
               list(
                 ?layer        list("XN" "logic")
                 ?enclosure    -0.22            
                 ?beginOffset  0.22
                 ?endOffset    if(pathstate~>closed then -0.22 else 0.22)
               );NWell
               list(
                 ?layer        list("ACTIVE" "logic")
                 ?enclosure    -0.04        
                 ?beginOffset  0.04
                 ?endOffset    if(pathstate~>closed then -0.04 else 0.04)
               );Active
            ) ;encpath
    	?subRect
    	  foreach(mapcar i abSequence(0 99)
                list(
                  ?layer      list("CS" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos
              ); foreach abSequence
            
      ) ; end rodCreatePath
    );proc
    

    Regards,

    Andrew.

    • Post Points: 35
  • Tue, Oct 27 2009 8:20 AM

    • user002
    • Not Ranked
    • Joined on Tue, Oct 27 2009
    • Sevilla, Sevilla
    • Posts 3
    • Points 45
    Re: Add function into rodCreatePath Reply

     Thank you very much Andrew. It works nice.

    • Post Points: 5
  • Mon, Jan 31 2011 8:26 AM

    • johnmck
    • Not Ranked
    • Joined on Wed, Oct 27 2010
    • Posts 7
    • Points 95
    Re: Add function into rodCreatePath Reply

    Andrew, the code above was very helpful but I am having a syntax problem when I try to add a second layer into the foreach.  I couldn't add a second foreach loop either.  Here is an example of what I'm trying to do.  Thanks,  John

     ?subRect
      foreach(mapcar i abSequence(0 99)
                list(
                  ?layer      list("CS" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos

                list(
                  ?layer      list("V1" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos2

              ); foreach abSequence

    • Post Points: 20
  • Tue, Feb 1 2011 9:32 AM

    Re: Add function into rodCreatePath Reply

     Hi johnmick,

    I think it's because your argument for ?subRect is wrong, it is expecting a single list but you are giving him 2. the best way I guess is to form the list outside the rod function, let say you build the list and call it subrectlist then you can just simply write ?subRect subrectlist

    example

    list1 =   foreach(mapcar i abSequence(0 99)
                list(
                  ?layer      list("CS" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos

    );foreach

    list2 = foreach(mapcar i abSequence(0 99)
                list(
                  ?layer      list("CS" "logic")
                  ?width      0.22
                  ?length     0.22
                  ?endOffset  -0.06
                  ?beginOffset -0.06
                  ?space      0.28
                  ?sep        i  ;This gives me the separation.
                );contactos

    );foreach

    subrectlist = append(list1 list2)

    ?subRect  subrectlist

     of course this is just a quick and dirty solution to show what I mean but you can do it in more efficient way perhaps avoiding append function.

     

     

    • Post Points: 20
  • Tue, Feb 1 2011 10:58 AM

    • johnmck
    • Not Ranked
    • Joined on Wed, Oct 27 2010
    • Posts 7
    • Points 95
    Re: Add function into rodCreatePath Reply

    That works!  Thanks!  I knew it was a simple fix, I just couldn't find it.

    • Post Points: 20
  • Tue, Feb 1 2011 11:26 AM

    Re: Add function into rodCreatePath Reply
    The other way would be to do something like this (using foreach mapcan):

     ?subRect

      foreach(mapcan i abSequence(0 99)

    list(
                list(

                  ?layer      list("CS" "logic")

                  ?width      0.22

                  ?length     0.22

                  ?endOffset  -0.06

                  ?beginOffset -0.06

                  ?space      0.28

                  ?sep        i  ;This gives me the separation.

                );contactos

                list(

                  ?layer      list("V1" "logic")

                  ?width      0.22

                  ?length     0.22

                  ?endOffset  -0.06

                  ?beginOffset -0.06

                  ?space      0.28

                  ?sep        i  ;This gives me the separation.

                );contactos2
    )
              ); foreach abSequence

    Apologies for the formatting - replying from a hand-held device. Foreach mapcan will merge the lists in the body of the foreach as it proceeds.

    Regards,

    Andrew
    • Post Points: 20
  • Tue, Feb 1 2011 12:06 PM

    • johnmck
    • Not Ranked
    • Joined on Wed, Oct 27 2010
    • Posts 7
    • Points 95
    Re: Add function into rodCreatePath Reply

    Andrew, thanks for the help.  I had tried that but didn't change the mapcar to mapcan!!!

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by user002 at 27 Oct 2009 05:42 AM. Topic has 7 replies.