Home > Community > Forums > Custom IC SKILL > creating list of celviews

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

 creating list of celviews 

Last post Mon, Dec 17 2012 3:01 AM by Andrew Beckett. 3 replies.
Started by sanramz 16 Dec 2012 07:42 AM. Topic has 3 replies and 635 views
Page 1 of 1 (4 items)
Sort Posts:
  • Sun, Dec 16 2012 7:42 AM

    • sanramz
    • Not Ranked
    • Joined on Sun, Oct 16 2011
    • Posts 9
    • Points 135
    creating list of celviews Reply

    Hi,

       I am trying to create multiple new layouts from a list unix file in to one library. In each cell Iam also trying to create a PR boundary with the coordinates that are present in the unix file.

     

    The list file contains the cell name and PR boundary coordinates as shown below. 

    cell_name                       llx    lly    urx       ury

    BUF                                0     0     4.448    4.424

    AND                                0     0     4.448    4.424 

     My code for this is as shown below.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 

    ListPath = "/home/san/tiler/cell_list"

    ;lib_name="test"

    inPort = infile( ListPath )

    when( inPort

    while( gets( line inPort )

    ;println( nextLine )

     

    lineData = parseString(line " ")

            ;portTable[car(lineData)] = evalstring(cadr(lineData))

    ;cell_name=car(lineData)

    cell_name=nth(0 lineData)

    llx=nth(1 lineData)

    lly=nth(2 lineData)

    urx=nth(3 lineData)

    ury=nth(4 lineData)

    create_boundary(cell_name llx lly urx ury)

    )

    close( inPort )

    )

    procedure(create_boundary(cell_name llx lly urx ury)

    let (cv)

    cv=dbOpenCellViewByType("test" "cell_name" "layout" "maskLayout" "w")

    dbCreateRect(cv list("prBoundary" "drawing") list(llx:lly urx:ury))

    dbSave(cv)

    );procedure

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     
    For this code, I am getting the following error.
     
    *Error* eval: undefined function - create_boundary
    *Error* load: error while loading file - "create_cell.il" at line 20 

      Kindly help me to solve this.

    Is it because of the "parsing", as i expect \n is coming for the "urx" variable when I try to access it??

     Regards,

    santhosh. 

    • Post Points: 20
  • Sun, Dec 16 2012 9:59 PM

    • sanramz
    • Not Ranked
    • Joined on Sun, Oct 16 2011
    • Posts 9
    • Points 135
    Re: How to parse the contents of a file? Reply

    Hi,

       I am trying to create multiple new layouts from a list unix file in to one library. In each cell Iam also trying to create a PR boundary with the coordinates that are present in the unix file.

     

    The list file contains the cell name and PR boundary coordinates as shown below. 

    cell_name                       llx    lly    urx       ury

    BUF                                0     0     4.448    4.424

    AND                                0     0     4.448    4.424 

     My code for this is as shown below.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 

    ListPath = "/home/san/tiler/cell_list"

    ;lib_name="test"

    inPort = infile( ListPath )

    when( inPort

    while( gets( line inPort )

    ;println( nextLine )

     

    lineData = parseString(line " ")

            ;portTable[car(lineData)] = evalstring(cadr(lineData))

    ;cell_name=car(lineData)

    cell_name=nth(0 lineData)

    llx=nth(1 lineData)

    lly=nth(2 lineData)

    urx=nth(3 lineData)

    ury=nth(4 lineData)

    create_boundary(cell_name llx lly urx ury)

    )

    close( inPort )

    )

    procedure(create_boundary(cell_name llx lly urx ury)

    let (cv)

    cv=dbOpenCellViewByType("test" "cell_name" "layout" "maskLayout" "w")

    dbCreateRect(cv list("prBoundary" "drawing") list(llx:lly urx:ury))

    dbSave(cv)

    );procedure

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     
    For this code, I am getting the following error.
     
    *Error* eval: undefined function - create_boundary
    *Error* load: error while loading file - "create_cell.il" at line 20 

      Kindly help me to solve this.

    Is it because of the "parsing", as i expect \n is coming for the "urx" variable when I try to access it??

     Regards,

    santhosh. 

    • Post Points: 5
  • Sun, Dec 16 2012 11:07 PM

    Re: How to parse the contents of a file? Reply
    Two problems (at least, may be more because I didn't try the code)

    1. The function create_boundary is not defined until after it's called, which is why you have the problem you're seeing. If the main bit of the code had been contained within a function definition, that would have been OK, because loading the file would have defined the functions rather than executing them. In other words, if you'd put procedure(createBoundaryFromFile(ListPath)... around your main code, the forward reference would have been fine because you would not have been calling create_boundary before it had been defined. Then after loading the code, you'd do createBoundaryFromFile("/path/to/the/file")
    2. The coordinates will all be strings, so you should do atof(nth(1 lineData)) etc.

    Note too that if this is for IC61, you'd have to use dbCreatePRBoundary rather than creating a shape on the PRBoundary/drawing LPP.

    Regards,

    Andrew
    • Post Points: 5
  • Mon, Dec 17 2012 3:01 AM

    Re: How to parse the contents of a file? Reply

    I saw (now that I'm on the network) that you'd both posted this as a separate question, and as an append to an old thread. So I've split off your append to the old thread (together with my reply above) and merged it with your standalone question.

    The forum guidelines advise against double posting and also against appending old threads.

    Andrew.

     

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by sanramz at 16 Dec 2012 07:42 AM. Topic has 3 replies.