DRC : NWell spacing with same/different potential

Hi,

In many Design rules, we have the 2 rules :

  • NWELL spacing with same potential : 0.5µm
  • NWELL spacing with different potential : 1.0µm

How to code those 2 rules ? how to gather the NWELL shapes connected together and check their spacing in between them and with another value with the other NWELL shapes ?

Laurent

Comments

  • Hi Laurent,

    that would be the "connected" case vs. "non-connected" one, right?

    That would require a net connectivity extraction in the first step. With this information, the check should basically feasible (although I assume that a certain level of flattening has to happen).

    The basic framework is there and already used for the antenna checks. But I have to implemented "connected" or "non-connected".

    If ultimate performance isn't required now, the following approach is a workaround: extract a netlist into a L2N database and check the unconnected space for all nwell shapes (using "space"). Then we probe the nets for each sides of the violation marker and report the error only if the nets on these sides are different:

    report("Connected/unconnected")
    
    # Read about DRC scripts in the User Manual in "Design Rule Check (DRC)"
    
    nwell       = input(61, 0)
    ntie        = input(37, 0)
    cont        = input(50, 0)
    metal1      = input(51, 0)
    via1        = input(55, 0)
    metal2      = input(53, 0)
    via2        = input(39, 0)
    metal3      = input(40, 0)
    via3        = input(57, 0)
    metal4      = input(101, 0)
    via4        = input(102, 0)
    metal5      = input(103, 0)
    
    # Inter-layer
    connect(cont,       ntie)
    connect(nwell,      ntie)
    connect(cont,       metal1)
    connect(metal1,     via1)
    connect(via1,       metal2)
    connect(metal2,     via2)
    connect(via2,       metal3)
    connect(metal3,     via3)
    connect(via3,       metal4)
    connect(metal4,     via4)
    connect(via4,       metal5)
    
    # Runs the extraction implicitly
    netlist
    
    # This will also include the unconnected errors
    connected_errors = nwell.space(20.um)
    connected_errors.output("Connected nwell distance >=20µm")
    
    unconnected_errors_unfiltered = nwell.space(40.um)
    
    # Filter out the errors arising from the same net
    unconnected_errors = DRC::DRCLayer::new(self, RBA::EdgePairs::new)
    
    unconnected_errors_unfiltered.data.each do |ep|
    
      net1 = l2n_data.probe_net(nwell.data, ep.first.p1)
      net2 = l2n_data.probe_net(nwell.data, ep.second.p1)
    
      if !net1 || !net2
        puts "Should not happen ..."
      # The Net object is not enabled for backannotation into script object space, otherwise
      # we could simply write:
      #   elsif net1 != net2
      # but for now we have to write:
      elsif net1.circuit != net2.circuit || net1.cluster_id != net2.cluster_id
        # unconnected
        unconnected_errors.data.insert(ep)
      end
    
    end
    
    unconnected_errors.output("Unconnected nwell distance >=40µm")
    

    Best regards,

    Matthias

Sign In or Register to comment.