mirror of https://github.com/KLayout/klayout.git
Merge branch 'lefdef-enhancments' of https://github.com/KLayout/klayout into lefdef-enhancments
This commit is contained in:
commit
70d8334f8c
|
|
@ -770,15 +770,70 @@ DEFImporter::read_nets (db::Layout &layout, db::Cell &design, double scale, bool
|
||||||
|
|
||||||
nondefaultrule = get ();
|
nondefaultrule = get ();
|
||||||
|
|
||||||
} else if ((was_shield = test ("SHIELD")) == true || test ("NOSHIELD") || test ("ROUTED") || test ("FIXED") || test ("COVER")) {
|
} else {
|
||||||
|
|
||||||
if (was_shield) {
|
bool prefixed = false;
|
||||||
take ();
|
|
||||||
|
if ((was_shield = test ("SHIELD")) == true || test ("NOSHIELD") || test ("ROUTED") || test ("FIXED") || test ("COVER")) {
|
||||||
|
if (was_shield) {
|
||||||
|
take ();
|
||||||
|
}
|
||||||
|
prefixed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
read_single_net (nondefaultrule, layout, design, scale, prop_id, specialnets);
|
bool any = false;
|
||||||
|
|
||||||
if (in_subnet) {
|
if (test ("POLYGON")) {
|
||||||
|
|
||||||
|
std::string ln = get ();
|
||||||
|
|
||||||
|
db::Polygon p;
|
||||||
|
read_polygon (p, scale);
|
||||||
|
|
||||||
|
std::pair <bool, unsigned int> dl = open_layer (layout, ln, Routing);
|
||||||
|
if (dl.first) {
|
||||||
|
if (prop_id != 0) {
|
||||||
|
design.shapes (dl.second).insert (db::object_with_properties<db::Polygon> (p, prop_id));
|
||||||
|
} else {
|
||||||
|
design.shapes (dl.second).insert (p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
any = true;
|
||||||
|
|
||||||
|
} else if (test ("RECT")) {
|
||||||
|
|
||||||
|
std::string ln = get ();
|
||||||
|
|
||||||
|
db::Polygon p;
|
||||||
|
read_rect (p, scale);
|
||||||
|
|
||||||
|
std::pair <bool, unsigned int> dl = open_layer (layout, ln, Routing);
|
||||||
|
if (dl.first) {
|
||||||
|
if (prop_id != 0) {
|
||||||
|
design.shapes (dl.second).insert (db::object_with_properties<db::Polygon> (p, prop_id));
|
||||||
|
} else {
|
||||||
|
design.shapes (dl.second).insert (p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
any = true;
|
||||||
|
|
||||||
|
} else if (prefixed) {
|
||||||
|
|
||||||
|
read_single_net (nondefaultrule, layout, design, scale, prop_id, specialnets);
|
||||||
|
any = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// lazily skip everything else
|
||||||
|
while (! peek ("+") && ! peek ("-") && ! peek (";")) {
|
||||||
|
take ();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (any && in_subnet) {
|
||||||
|
|
||||||
in_subnet = false;
|
in_subnet = false;
|
||||||
|
|
||||||
|
|
@ -792,42 +847,6 @@ DEFImporter::read_nets (db::Layout &layout, db::Cell &design, double scale, bool
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (test ("POLYGON")) {
|
|
||||||
|
|
||||||
std::string ln = get ();
|
|
||||||
|
|
||||||
db::Polygon p;
|
|
||||||
read_polygon (p, scale);
|
|
||||||
|
|
||||||
std::pair <bool, unsigned int> dl = open_layer (layout, ln, Routing);
|
|
||||||
if (dl.first) {
|
|
||||||
if (prop_id != 0) {
|
|
||||||
design.shapes (dl.second).insert (db::object_with_properties<db::Polygon> (p, prop_id));
|
|
||||||
} else {
|
|
||||||
design.shapes (dl.second).insert (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (test ("RECT")) {
|
|
||||||
|
|
||||||
std::string ln = get ();
|
|
||||||
|
|
||||||
db::Polygon p;
|
|
||||||
read_rect (p, scale);
|
|
||||||
|
|
||||||
std::pair <bool, unsigned int> dl = open_layer (layout, ln, Routing);
|
|
||||||
if (dl.first) {
|
|
||||||
if (prop_id != 0) {
|
|
||||||
design.shapes (dl.second).insert (db::object_with_properties<db::Polygon> (p, prop_id));
|
|
||||||
} else {
|
|
||||||
design.shapes (dl.second).insert (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
while (! peek ("+") && ! peek ("-") && ! peek (";")) {
|
|
||||||
take ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1398,6 +1417,8 @@ DEFImporter::do_read (db::Layout &layout)
|
||||||
|
|
||||||
if (! groups.empty () && options ().separate_groups ()) {
|
if (! groups.empty () && options ().separate_groups ()) {
|
||||||
|
|
||||||
|
db::LayoutLocker locker (&layout);
|
||||||
|
|
||||||
others_cell = &layout.cell (layout.add_cell ("NOGROUP"));
|
others_cell = &layout.cell (layout.add_cell ("NOGROUP"));
|
||||||
design.insert (db::CellInstArray (others_cell->cell_index (), db::Trans ()));
|
design.insert (db::CellInstArray (others_cell->cell_index (), db::Trans ()));
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -16,8 +16,9 @@ VIAS 1 ;
|
||||||
END VIAS
|
END VIAS
|
||||||
SPECIALNETS 1 ;
|
SPECIALNETS 1 ;
|
||||||
- dummy
|
- dummy
|
||||||
|
+ ROUTED RECT M2 ( 350 0 ) ( 200 100 )
|
||||||
+ POLYGON M1 ( 300 0 ) ( 300 50 ) ( 350 50 ) ( 400 100 ) ( 400 0 )
|
+ POLYGON M1 ( 300 0 ) ( 300 50 ) ( 350 50 ) ( 400 100 ) ( 400 0 )
|
||||||
+ POLYGON M2 ( 300 150 ) ( 300 200 ) ( 350 200 ) ( 400 250 ) ( 400 150 )
|
+ ROUTED POLYGON M2 ( 300 150 ) ( 300 200 ) ( 350 200 ) ( 400 250 ) ( 400 150 )
|
||||||
+ RECT M1 ( 0 0 ) ( 100 200 )
|
+ RECT M1 ( 0 0 ) ( 100 200 )
|
||||||
+ ROUTED M1 30 ( 0 0 15 ) ( 100 0 0 ) VIA1_dummy ( 100 100 10 )
|
+ ROUTED M1 30 ( 0 0 15 ) ( 100 0 0 ) VIA1_dummy ( 100 100 10 )
|
||||||
+ ROUTED M2 50 + SHAPE RING + STYLE 1 ( 0 100 ) ( 100 200 ) ( 200 200 )
|
+ ROUTED M2 50 + SHAPE RING + STYLE 1 ( 0 100 ) ( 100 200 ) ( 200 200 )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue