DRC create GDS layer from "holes" DRC results

I'm trying to create a script which will find holes below a certain area and output them to a GDS layer so I can fill the holes. Unfortunately when I try to run a DRC script to do this I get an error:
"Can't convert Fixnum into String in Macrointerpreter::execute"
BUT when I run a similar command which outputs the results to a report database the holes are properly identified. Here are my two DRC commands:

layer.holes.with_area(0, 0.14).output(69, 98) Results in the above error
layer.holes.with_area(0, 0.14).output("holes", "sub minimum hole found") Results in the holes properly identified in the report database.

Am I missing something to convert the results of the holes command into a format compatible with the output to a GDS layer?


  • Hi,

    "output" takes different arguments depending on whether the output is to a report (a results database) or a layout. If sent to a layout, the arguments are layer, datatype (numbers) while for a report, the arguments are category name and description.

    Both cannot be converted into each other. That's why you get the error message.

    Usually you'd either want output to layout or database. If you want both, use this scheme for your DRC file:

    report("My report")
    ... statements where the output needs to go to the report database ...
    ... statements where the output goes to "myfile.gds" ...

    The order is not important - report can go before or after the file. You can even put in multiple files for output using multiple "target" calls.

    For details about "target" see: https://www.klayout.de/doc-qt4/about/drc_ref_global.html#target



  • Matthias:

    I guess I was unclear. I'm not attempting to perform both at the same time. When my first attempt to get the DRC deck to work "met4.holes.with_area(0, 0.14).output(68, 98)" resulted in the stated error, I replaced the output(68, 98) portion of the statement with output("error name", "error statement") and the statement worked just fine.

    The issue appears to be that "met4.holes.with_area(0, 0.14)" results in a result that can be sent to a results database but attempting to send it to a GDS layer instead results in the error.

  • Matthias:

    Update. After your reply I went back and looked at my DRC deck again and found I had inserted the met4.holes.with_area(0, 0.14).output(68, 98) well below a line which read: "report("report database")" which I had forgotten was near the beginning of my script.

    Moving the holes output to a gds layer before the report("report database") line fixed the issue.

  • Good :-)

    That's what I actually wanted to say: "report" switches to "report" mode and the arguments to "output" are different ones.

    "target" switches back to "file mode" and the arguments of "output" are numbers for GDS and OASIS.



Sign In or Register to comment.