File: drcSimpleTests_120.drc

package info (click to toggle)
klayout 0.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292,204 kB
  • sloc: cpp: 2,068,428; ruby: 47,823; xml: 26,924; python: 14,404; sh: 1,812; tcl: 212; perl: 170; makefile: 112; ansic: 42
file content (52 lines) | stat: -rw-r--r-- 809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

source $drc_test_source
target $drc_test_target

deep

l1 = input(1, 0)
l2 = input(2, 0)
l3 = input(3, 0)

name(l1, "l1")
name(l2, "l2")
name(l3, "l3")

connect(l1, l2)
connect(l2, l3)

netlist 

l1_out = polygons
l2_out = polygons
l3_out = polygons

output_layers = {
  "l1" => l1_out,
  "l2" => l2_out,
  "l3" => l3_out
}

[ "A", "B", "C" ].each do |n|

  net = l2n_data.netlist.circuit_by_name("TOP").net_by_name(n)
  if net
  
    net.each_subcircuit_pin do |pin|
      shapes = l2n_data.shapes_of_pin(pin, RBA::Trans::new(RBA::Vector::new(100, 200)))
      shapes.keys.each do |li|
        output_layers[l2n_data.layer_name(li)].data.insert(shapes[li])
      end
    end
    
  end

end

l1.output(1, 0)
l2.output(2, 0)
l3.output(3, 0)
l1_out.output(101, 0)
l2_out.output(102, 0)
l3_out.output(103, 0)