How to XOR two layers in different cells/layouts by DRC script?

edited March 10 in Layout

I'm very new to DRC script.
I have two layouts and I've loaded into same panel.
I want to do XOR on two layers which belong to layout1 & layout2 respectively.
I've tried below code in DRC script, but report showed no difference which was not right.(I know layer1 and layer2 are different)
Report only show the name of layout1, seems layout2 was not selected, but I don't know where went wrong?
Could someone help me,thanks.

cell1= layout("@1").select("Cell1Name")
cell2= layout("@2").select("Cell2Name")
report("test")
layer1=cell1.input(100,0)
layer2=cell2.input(200,0)
layer1.xor(layer2)

Comments

  • I somehow found why. I didn't output any results to the report("test")
    This works fine.

    cell1= layout("@1").select("Cell1Name")
    cell2= layout("@2").select("Cell2Name")
    report("test")
    layer1=cell1.input(100,0)
    layer2=cell2.input(200,0)
    layer1.xor(layer2).output("result")

  • I have another problem.
    If I execute below, DRC indeed check twice. (ie. check if width <3um,5um).
    But it seems that it only checks cells currently shown on top (layout("@1") cell1 is show on top) even if I have a commend to select "Cell2Name" in layout("@2").
    So the report show layer1,layer2 width test results, but it actually is testing layer1 twice.
    Is there anyway to workaround?

    cell1= layout("@1").select("Cell1Name")
    cell2= layout("@2").select("Cell2Name")
    report("test")
    layer1=cell1.input(100,0)
    layer2=cell2.input(200,0)
    layer1.width(3.um).output("layer1result")
    layer2.width(5.um).output("layer2result")

  • Hi @mpegwmvavi,

    "select" does not change the initial cell, but only switches on or off certain cells.

    The method you are looking for is "cell" - i.e.:

    cell1= layout("@1").cell("Cell1Name")
    cell2= layout("@2").cell("Cell2Name")
    ...
    

    Matthias

Sign In or Register to comment.