Solved : DRC Error : Can't convert String into Integer (Class TypeError)

edited February 2014 in General
Hi Matthias,

I have a drc.lydrc file that I run on a GDSII file.

When I use a string in output function I have a TypeError that can't convert string into Integer.
I use the last version of Klayout (0.23.2) on Win 7 64bit.
I also Tested Klayout 32bit, and Klayout on Linux and I have the same problem.

How I can solve this problem ?
Thanks, Best regards,
Euzada

Comments

  • edited November -1

    Hi Euzada,

    do you have some sample code that illustrates the problem? Which function reports that error?

    Matthias

  • edited February 2014
    Hello Matthias,

    I solved my problem by adding at the beginning of the document the DRC command: report("name of report").

    It was my fault because I did not read all the documentation form the begening. Excuse me!

    Now it works correctly, and I am very pleased by the efficiency, speed and simplicity of Klayout and above all it's free and open source. Thank you.

    I have another question :

    Is that I can run the DRC file on a very specific part of a cell on layout as example like this?

    Top cell
    -Cell_1
    --SubCell_1a
    --Subcell_1b
    -Cell_2
    --SubCell_2a
    -Cell_3
    --Subcell_3a

    Can I scan with DRC file the SubCell_1a, the Cell_2 and SubCell_3a on the same time???

    I know how to scan all cells (Top Cell) but not a combination of Cells.


    Thank you,

    Best regards,
    Euzada
  • edited November -1

    Hi Euzada,

    Without further specifications, KLayout will run the DRC on the current cell shown in the view. If that is the top cell, all child cells will be included.

    You can however include and exclude parts of that hierarchy. Excluding something from the hierarchy will basically blank out a cell and it's possible to include child cells again. The command to do that is "select". In your case, that would be

    select("-TopCell")   # deselect Top cell and all cells below (for now)
    select("+Cell_1")    # include Cell_1
    select("+Cell_2")    # include Cell_2
    select("+Cell_3")    # include Cell_3 
    

    Is that what you are looking for?

    Matthias

  • edited November -1
    Hi Matthias,

    It's not exactely what I want.

    If I have to run the DRC on a cell, I can select cell in the view (Ctr+S), That is ok for me.
    But if I wnat to run DRC on this cell but not on a part of a subcell, example:

    If my selected cell in the view is Topcell and sub-cells are cell1, cell2 and cell3, like this:

    Topcell
    -cell1
    -cell2
    -cell3

    If I want to run the DRC on TopCell but without cell2. How should I set the condition?

    If I write in the begening of DRC file :
    select("+TopCell")
    select("-cell2")

    this doesn't work with me, because Marker Database Browser, will affiche a mark on cell2 also.

    Thanks, Best regards,
    Euzada
  • edited February 2014

    Hi Euzada,

    I can't confirm that. Let me explain, how I tested it:

    • I create a new layout with cell "TOP"
    • I create a new layer (1/0)
    • I create a new cell "cell1" and draw a rectangle on layer 1
    • I create a new cell "cell2" and do the same
    • I place "cell1" in "TOP" and do the same for "cell2"
    • From "TOP" I run the DRC script below
    • The marker browser pops up and shows me the rectangle of "cell1", but not the one contained inside "cell2"

    Here is the DRC script:

    select("+TOP")   # this line is optional 
    select("-cell2")
    report("Test")
    input(1).output("Layer 1")
    

    I'm using 0.23.2. Are you observing or expecting a different behavior?

    Matthias

  • edited November -1
    Hi Matthias,

    It's working.
    My only error is that I don't put the select commande on the top of DRS script.
    When I Put the code before Report("test"), it's working correctely.

    Thank you for your help.
    Best Regards,
    Euzada
  • edited November -1

    Oh yes ... maybe I forgot to mention that. The order of the commands is important. "select" is effective for subsequent input statements. Once a layer is created by "input", changing the cell selection (as well as layout, top cell ...) does not have an effect and those layers.

    Matthias

Sign In or Register to comment.