mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-30 09:49:21 +02:00
Merge pull request #877 from KLayout/drc-extent-of-cells
Implemented extent(cell_filter) for DRC, added Layout#cells with name…
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
|
||||
source $drc_test_source
|
||||
target $drc_test_target
|
||||
|
||||
extent.output(2000)
|
||||
extent("PMOS*").output(2001)
|
||||
extent("NMOS*").output(2002)
|
||||
|
||||
deep
|
||||
|
||||
extent.output(2100)
|
||||
extent("PMOS*").output(2101)
|
||||
extent("NMOS*").output(2102)
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
|
||||
source $drc_test_source
|
||||
target $drc_test_target
|
||||
|
||||
clip(7.0, -1.0, 15.0, 10.0)
|
||||
|
||||
extent.output(2000)
|
||||
extent("PMOS*").output(2001)
|
||||
extent("NMOS*").output(2002)
|
||||
|
||||
deep
|
||||
|
||||
extent.output(2100)
|
||||
extent("PMOS*").output(2101)
|
||||
extent("NMOS*").output(2102)
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
+18
@@ -79,6 +79,7 @@ class DBLayout_TestClass < TestBase
|
||||
assert_equal( ly.cell_name(ci), "new_cell" )
|
||||
|
||||
assert_equal( ly.cell_by_name("new_cell"), ci )
|
||||
assert_equal( ly.cells("A*"), [] )
|
||||
assert_equal( ly.cell("new_cell").name, "new_cell" )
|
||||
assert_equal( ly.cell("x").inspect, "nil" )
|
||||
|
||||
@@ -1175,6 +1176,23 @@ class DBLayout_TestClass < TestBase
|
||||
|
||||
end
|
||||
|
||||
# Layout#cells
|
||||
def test_15
|
||||
|
||||
g = RBA::Layout::new
|
||||
c1 = g.create_cell("B1")
|
||||
c2 = g.create_cell("B2")
|
||||
c0 = g.create_cell("A")
|
||||
c0.insert(RBA::CellInstArray::new(c1.cell_index, RBA::Trans::new))
|
||||
c0.insert(RBA::CellInstArray::new(c2.cell_index, RBA::Trans::new))
|
||||
|
||||
assert_equal(g.cells("B*").collect(&:name).join(","), "B1,B2")
|
||||
assert_equal(g.cells("*").collect(&:name).join(","), "A,B1,B2")
|
||||
assert_equal(g.cells("A").collect(&:name).join(","), "A")
|
||||
assert_equal(g.cells("X").collect(&:name).join(","), "")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
load("test_epilogue.rb")
|
||||
|
||||
Reference in New Issue
Block a user