Loop over via/metal stack and do DRC

edited May 2021 in Verification

Hi,

I have a design rule check that involves a via layer, and the two connecting metal layers.
I want to do the same check on all vias in the stack.

Is there a way that I can create a function or loop, to avoid repeating the same lines many times.
Something in the lines of

via_stack = [2, 4, 6, 8]

def via_check(metal_below, via_layer, metal_above):
   Overlap =  metal_below & via_layer & metal_above
   Overlap.output(100, "via rule triggered")

for layers in via_stack:
   #Do design rule check
   via_check(input(layers-1), input(layers), input(layers+1))

Comments

  • Yes, that's exactly the idea.

    But DRC is Ruby, so the notation is this:

    via_stack = [2, 4, 6, 8]
    
    def via_check(metal_below, via_layer, metal_above)
       overlap =  metal_below & via_layer & metal_above
       overlap.output(100, "via rule triggered")
    end
    
    via_stack.each do |layers|
       #Do design rule check
       via_check(input(layers-1), input(layers), input(layers+1))
    end
    

    I'm just not sure what happens if you output multiple times to the same layer (here: 100).

    Matthias

Sign In or Register to comment.