merging multiple layouts

I'm trying to merge multiple layout files by reading multiple files into the same layout object. When using "GDS" files, this method works and the resulting layout is the merged copy; however when I'm using "OASIS" as input files, the output doesn't contain merged data.

Comments

  • No, there is no difference between both readers in terms of "read into" behaviour.

    There must be a different explanation.

    Matthias

  • edited March 2022

    Hi Matthias,

    So I re-opened and re-saved the OASIS files in klayout and then it has worked properly, so it looks like there is something unique w/ the original tool that wrote out the OASIS files. I'll see if I can create a simple test-case that you can review.

  • edited March 2022

    Hi Matthias,

    I was able to create a simple test-case (single rectangle in each file); it does seem like it has to do with the way properties are written in the OASIS file (if I re-save the file using klayout and re-write the properties, the merge operation seems to work properly). I sent you the testcases via PM.

  • Thanks a lot. I'll take a look!

    Matthias

  • @vvslavavv Thanks again for the test cases. However I have difficulties reproducing the issue.

    I downloaded the first two samples from your dropbox. These files download as CELLA_1.1.oas and CELLA_2.1.oas. The OASIS structure is that:

    000000000   25 53 45 4d 49 2d 4f 41  magic bytes
    000000008 + 53 49 53 0d 0a 
    000000013   01                       START
    000000014   03 31 2e 30              version ("1.0")
    000000018   00 a0 1f                 resolution (4000)
    000000021   01                       table flag (at end)
    000000022   07 0d 53 5f 43 45 4c 4c  PROPNAME ("S_CELL_OFFSET")
    000000030 + 5f 4f 46 46 53 45 54 
    000000037   07 0e 53 5f 47 44 53 5f  PROPNAME ("S_GDS_PROPERTY")
    000000045 + 50 52 4f 50 45 52 54 59 
    000000053   22                       CBLOCK (data will be expanded)
    000000054   00 2a 1a                 cblock-info (type=0, uncomp-bytes=42, comp_bytes=26)
    000000057   e3 e6 0b 0f 0f f1 0f 70  LAYERNAME ("TOPCELLBOUNDARY", layers=50..50, datatypes=99..99)
    000000065 + 76 f5 f1 71 f2 0f f5 73 
    000000073 + 71 0c 8a 64 54 4f 
    000000079   c1 0c 26                 LAYERNAME ("TOPCELLBOUNDARY", layers=50..50, datatypes=99..99)
    000000082   00 0d 00                 CELL (0)
    000000085   14 db                    RECTANGLE
    000000087   32                       layer=50
    000000088   63                       datatype=99
    000000089   80 a6 1d                 width=480000
    000000092   80 91 83 0b              x=11560000
    000000096   80 a1 ef 01              y=1960000
    000000100   03 05 43 45 4c 4c 41     CELLNAME ("CELLA")
    000000107   1c 17 00                 PROPERTY (id=0)
    000000110   08 53                    value[0]=83 (type 8)
    000000112   02                       END
    000000113   01                       tables entry (1)
    000000114   64                       tables entry (100)
    000000115   01                       tables entry (1)
    000000116   00                       tables entry (0)
    000000117   01                       tables entry (1)
    000000118   16                       tables entry (22)
    000000119   01                       tables entry (1)
    000000120   00                       tables entry (0)
    000000121   01                       tables entry (1)
    000000122   35                       tables entry (53)
    000000123   01                       tables entry (1)
    000000124   00                       tables entry (0)
    000000125   80 80 80 80 80 80 80 80  padding string ("")
    

    so eventually the cellname is declared after the cell is defined which I was suspecting to trigger the issue.

    However when I use this simple script:

    ly = RBA::Layout::new
    ly.read("CELLA_1.1.oas")
    ly.read("CELLA_2.1.oas")
    
    ly.write("CELLA_merged.oas")
    

    the output contains two rectangles which I think is the correct behaviour:

    Maybe you can give me some more details. Specifically: which is the version and OS you're using? Is the script identical to your application or are you using different modes maybe?

    Thanks,

    Matthias

Sign In or Register to comment.